1. 11 Sep, 2018 2 commits
    • Oren Shomron's avatar
      Refactor override handling · 1e768930
      Oren Shomron authored
      
      
      * baseApp.load() / baseApp.save() are override-aware
      * app.read() / app.write() (schema.go) are not - they only serialize/deserialize app.yaml
      * baseApp.load() / baseApp.save() now call app.read() / app.write() instead of duplicating serialization logic
      * Removed isOverride flag from EnvironmentConfig, RegistryConfig
      * Removed override logic from app.Load() - this is handled in baseApp.load() now
      * env set command now respects the --override flag to indicate where to write changes
      
      Closes #830
      Signed-off-by: default avatarOren Shomron <shomron@gmail.com>
      1e768930
    • Oren Shomron's avatar
      Refactor schema to support explicit migrations · 3d8b3758
      Oren Shomron authored
      
      
      * Dropped support for 0.0.1 apps
      * Versioning has been pushed up into the Schema types instead of App.
      * Added migrations framework for migrating schema versions, one hop at time
      
      Closes #849
      Signed-off-by: default avatarOren Shomron <shomron@gmail.com>
      3d8b3758
  2. 07 Sep, 2018 2 commits
  3. 04 Sep, 2018 1 commit
  4. 27 Aug, 2018 1 commit
  5. 21 Aug, 2018 1 commit
  6. 20 Aug, 2018 2 commits
  7. 15 Aug, 2018 1 commit
  8. 14 Aug, 2018 1 commit
  9. 13 Aug, 2018 2 commits
  10. 06 Aug, 2018 1 commit
    • bryanl's avatar
      Allow showing only env set parameters · 49a682d5
      bryanl authored
      
      
      When listing parameters for an environment, add an option that only
      shows parameters set in the environment itself. This will allow ks users
      to show only the differences. The new option is `--without-modules`.
      
      example:
      
      ```
       $ ks param list --env default
      COMPONENT     PARAM   VALUE
      =========     =====   =====
      nested.redis3 envset  1
      redis         envset  1
      redis2        envset  1
      redis2        name    'redis2'
      redis2        values  {}
      redis2        version '3.7.3'
      $ ks param list --env default --without-modules
      COMPONENT     PARAM  VALUE
      =========     =====  =====
      nested.redis3 envset 1
      redis         envset 1
      redis2        envset 1
      ```
      
      Fixes #747
      Signed-off-by: default avatarbryanl <bryanliles@gmail.com>
      49a682d5
  11. 30 Jul, 2018 1 commit
  12. 16 Jul, 2018 1 commit
    • bryanl's avatar
      Updating e2e tests/output · 7db6597f
      bryanl authored
      
      
      * package versions are SHA1 instead of tag name
      * strip extra info off server versions before comparing
      * ensure Kubernetes version is retained when updating environment namespace or name
      Signed-off-by: default avatarbryanl <bryanliles@gmail.com>
      7db6597f
  13. 13 Jul, 2018 3 commits
  14. 12 Jul, 2018 1 commit
  15. 11 Jul, 2018 1 commit
  16. 09 Jul, 2018 1 commit
    • Oren Shomron's avatar
      Merge environment-scoped libraries with environment overrides · cf41da68
      Oren Shomron authored
      
      
      * Simplify app code dealing with overrides
      * env set will not mutate passed environment, filters out library configration for overrides
      * app.Environment, app.Environments return merged views with overrides applied
      * Test override environment merging
      * remove redundant calls to mergedEnvironment
      * Remove name parameter from AddEnvironment
      * Fix override flag for merged environments
      Signed-off-by: default avatarOren Shomron <shomron@gmail.com>
      cf41da68
  17. 06 Jul, 2018 1 commit
  18. 05 Jul, 2018 1 commit
    • bryanl's avatar
      Add JSON format to table printer · 8ccd01da
      bryanl authored
      
      
      This PR adds JSON output to the existing table printer and updates all
      actions which use the table printer.
      
      JSON tables are printed out like:
      
      ```json
      {
        "kind": "moduleList",
        "data": [
          {"module": "/"},
          {"module": "a"},
          {"module": "a.b"}
        ]
      }
      ```
      
      Where:
      
      * `kind` is the kind of data in the table
      * `data` contains the table rows matched to the header
      
      Fixes #693
      Signed-off-by: default avatarbryanl <bryanliles@gmail.com>
      8ccd01da
  19. 03 Jul, 2018 3 commits
  20. 02 Jul, 2018 2 commits
  21. 29 Jun, 2018 1 commit
    • bryanl's avatar
      When listing packages, include version · 8fb1e20f
      bryanl authored
      
      
      ```
      ➜  ksapp2 ks pkg list
      REGISTRY  NAME      VERSION INSTALLED
      ========  ====      ======= =========
      incubator apache    master
      incubator efk       master
      incubator mariadb   master
      incubator memcached master
      incubator mongodb   master
      incubator mysql     master
      incubator nginx     master
      incubator node      master
      incubator postgres  master
      incubator redis     master
      incubator tomcat    master
      ```
      
      And after installing a package:
      
      ```
      ➜  ksapp2 ks pkg list --installed
      REGISTRY  NAME   VERSION INSTALLED
      ========  ====   ======= =========
      incubator apache master  *
      ```
      Signed-off-by: default avatarbryanl <bryanliles@gmail.com>
      8fb1e20f
  22. 28 Jun, 2018 3 commits
    • Oren Shomron's avatar
      pkg install honors versions when checking for conflicts · d7136402
      Oren Shomron authored
      
      
      This commit allows installing a package when a different version is
      already installed. Currently, if the package is installed globally (the
      only option) - it will overwrite the previous version reference.
      A followup change will allow installing into environments to work around
      this limitation.
      
      Part of #660
      
      Also:
      
      * Add PackageManager.IsInstalled - fuzzy-match installation check for packages, without parsing their manifests
      Signed-off-by: default avatarOren Shomron <shomron@gmail.com>
      d7136402
    • bryanl's avatar
      Use values file for prototype use/preview · 62ca6192
      bryanl authored
      
      
      This change introduces a values file to be used when setting prototype
      values for the use and preview commands.
      
      The format of the file is Jsonnet that returns an object.
      
      Notes:
      
      * if values are added to the file and aren't consumed by prototype, they are ignored.
      Signed-off-by: default avatarbryanl <bryanliles@gmail.com>
      62ca6192
    • bryanl's avatar
      Support environment arguments in module parameters · 5b3be7a9
      bryanl authored
      
      
      It is possible that a user might want to use environment parameters
      (namespace or server) in their parameters. This would not work with
      ksonnet for two reasons:
      
      1. ksonnet didn't provide external variables with those settings
      1. params.libsonnet was evaluated as an object
      
      This change adds support for these two items.
      
      ```
      bash-3.2$ ks param list
      COMPONENT PARAM         VALUE
      ========= =====         =====
      ds        arr           [1, 2, 3, 4]
      ds        containerPort 80
      ds        image         'gcr.io/heptio-images/ks-guestbook-demo:0.1'
      ds        name          'ds'
      ds        namespace     ''
      ds        obj           { a: 'b' }
      ds        replicas      1
      ds        server        ''
      ds        servicePort   80
      ds        type          'ClusterIP'
      bash-3.2$ ks param list --env default
      COMPONENT PARAM         VALUE
      ========= =====         =====
      ds        arr           [1, 2, 3, 4]
      ds        containerPort 80
      ds        image         'gcr.io/heptio-images/ks-guestbook-demo:0.1'
      ds        name          'ds'
      ds        namespace     'default'
      ds        obj           { a: 'b' }
      ds        replicas      1
      ds        server        'https://localhost:6443'
      ds        servicePort   80
      ds        type          'ClusterIP'
      ```
      
      An example parameters file that produces the preceeding output:
      
      ```js
      local env = std.extVar("__ksonnet/environments");
      
      {
        global: {
        },
        components: {
          ds: {
            containerPort: 80,
            image: "gcr.io/heptio-images/ks-guestbook-demo:0.1",
            name: "ds",
            replicas: 1,
            servicePort: 80,
            type: "ClusterIP",
            namespace: env.namespace,
            server: env.server,
            obj: {a:"b"},
            arr: [1,2,3,4],
          },
        },
      }
      ```
      
      * note: params files aren't currently generated with the `env` local.
      Signed-off-by: default avatarbryanl <bryanliles@gmail.com>
      5b3be7a9
  23. 27 Jun, 2018 2 commits
    • bryanl's avatar
      Add docker image resolver to `param set` · d3f430fd
      bryanl authored
      
      
      Adds an image resolve to param set. eg:
      
      `ks param set deployment image foo/bar:latest`
      
      uses the docker registry to find the manifest reference for `foo/bar:latest`.
      It then sets this value instead. Support is at the component and environment
      level.
      
      Fixes #569
      Signed-off-by: default avatarbryanl <bryanliles@gmail.com>
      d3f430fd
    • Oren Shomron's avatar
      Add versioned, environment-scoped package support · ada571f6
      Oren Shomron authored
      
      
      This change adds version-mapped package support to environments. An environment can specify the specific version of a package to consume - and multiple, side-by-side versions of a package can be installed in the package cache.
      
      Closes #631
      Closes #651
      
      * Deprecate GitVersion from LibraryConfig
      * pkg.Descriptor.Part -> pkg.Descriptor.Name
      * Add Version, Path to PackageManager.
      * Composed package structs
      * Revendoring - Tailor import path to environment's packages, allow version-free import strings
      * Skip unversioned packages when revendoring
      * Allow injection of custom importers into jsonnet.VM wrapper
      * Allow passing VMOpts to VM via Evaluate*
      * Add versioned package evaluation test
      * Allow versioned packages to fall back to unversioned paths
      * Fix DefaultInstallChecker shadowed variable when looking up environment packages
      * Test skipping of missing paths in revendorPackages
      * Tweak CacheDependency->ResolveLibrary interface - onFile paths should always be relative to the registry root
      * Ensure 0.2.0 version is output when re-writing app.yaml
      Signed-off-by: default avatarOren Shomron <shomron@gmail.com>
      ada571f6
  24. 20 Jun, 2018 2 commits
    • Oren Shomron's avatar
      a019cf82
    • bryanl's avatar
      Move/upgrade ks lib location · c2bef13d
      bryanl authored
      Moving generated ksonnet lib from lib/<verson> to lib/ksonnet-lib/<version>.
      This change will free up lib to be used for other lib type things.
      
      Ksonnet will warn if ksonnet-lib is in the legacy location and the
      user can use `ks upgrade` to move the files to their new location.
      
      Also:
      
      * update Makefile to search harder for apimachiner revision
      
      Signed-off-by: bryanl bryanliles@gmail.com
      c2bef13d
  25. 19 Jun, 2018 3 commits