Skip to content
Snippets Groups Projects
  1. Sep 21, 2017
    • Jessica Yuen's avatar
      Commands using the <env> arg should deploy to the correct cluster · 13f89a92
      Jessica Yuen authored
      For example, 'apply <env' currently operates as a no-op. With the
      introduction of simple environments in PR #131, 'apply <env>' should
      perform basic validation such that:
      
      1. The user has added the environment that is being deployed against to
      their Ksonnet project.
      
      2. The URI in the environment's spec file that the user wishes to deploy
      to should correspond to at least one cluster location as listed in
      kubeconfig.
      
      If either of those conditions are not satisfied, the kubecfg user will
      receive the corresponding error.
      
      In addition, this commit will set the kubectl --cluster flag to point at
      the cluster listed by the environment URI.
      13f89a92
    • Jessica Yuen's avatar
      Make Files and Environment not be mutually exclusive · 184756d8
      Jessica Yuen authored
      Currently, commands take either an <env> or a '-f' argument but not
      both. With this commit, we are allowing both args to be provided. The
      behavior is expand the files passed by the '-f' flag and deploy the
      objects to <env>.
      184756d8
  2. Sep 19, 2017
    • Jessica Yuen's avatar
      Set default log level to 'Info' · 3ca68ad8
      Jessica Yuen authored
      Currently 'Info' level logs are only shown with the '-v' flag. This
      makes commands without the '-v' flag of little use to users, especially
      on success cases, due to no output.
      
      This commit will set the default log level to 'Info', and passing a '-v'
      flag will log at a 'Debug' level.
      3ca68ad8
  3. Sep 18, 2017
    • Jessica Yuen's avatar
      Add subcommand 'env set' · f86667a6
      Jessica Yuen authored
      'env set <name>' sets environment fields such as the name, and cluster
      URI. It currently accepts the flags '--name' and '--uri'. Changing the
      name of an environment will also update the directory structure in
      'environments'.
      f86667a6
  4. Sep 08, 2017
    • Jessica Yuen's avatar
      Change directory structure generated by 'init' to support envs · 1e656f24
      Jessica Yuen authored
      This commit will remove the vendor/lib and vendor/schema directories
      generated by 'init'. An 'environments' directory will be created from
      the root app directory, with the default environment directory 'dev'
      and it's containing contents rooted at 'environments'.
      
      The intention of environments are to represent the deployment
      environments of Kubernete clusters, with the following example
      directory structure:
      
      app-name/
        ..
        envs/
          dev/
          us-west/
            prod/
            staging/
      1e656f24
  5. Sep 07, 2017
    • Alex Clemmer's avatar
      Deprecate `update` subcommand; introduce `apply` · 94a18089
      Alex Clemmer authored
      This commit is a follow-up to the discussion in the ksonnet.next design
      doc, in which users consistently expressed their preference that the
      `update` command be called `apply`.
      
      NOTE: We have renamed `pkg/kubecfg/update_test.go` ->
      `pkg/kubecfg/apply_test.go`, but we copy the `update`'s integration test
      file. The reason is that the `update` unit tests actually test things
      like GC (rather than the command itself), so the file name is
      inconsequential. On the other hand, the integration tests test the
      commands themselves, so it is important to have two copies, one for
      `update` and one for `apply`.
      94a18089
    • Alex Clemmer's avatar
      Include `lib/` and `vendor/lib` when expanding templates · bc77be8e
      Alex Clemmer authored
      Currently, if the user wants to deploy a ksonnet application, and that
      application uses some vendored library, or something in the `lib/`
      directory, they will have to pass the appropriate `-J` flags into the
      command themselves.
      
      This commit will automatically add these whenever we're in an app
      directory and a command is issued. In particular, even if the user
      passes in the `-f` flag (rather than an environment name), we'll still
      add library paths to the command if we're in a ksonnet app directory.
      This is meant to capture the case that a user wants to update one
      resource in particular in a ksonnet application.
      bc77be8e
  6. Sep 06, 2017
  7. Sep 05, 2017
  8. Sep 02, 2017
  9. Sep 01, 2017
    • Jessica Yuen's avatar
      Refactor cmd/ application logic to pkg/ · f7d6436d
      Jessica Yuen authored
      This commit will separate the application level logic for the 'show', 'delete',
      'validate', and 'diff' commands from the Cobra logic in the cmd/ package.  The
      application level logic will be placed in pkg/kubecfg/.
      f7d6436d
  10. Aug 30, 2017
    • Alex Clemmer's avatar
      Make delete, diff, show, update, and validate aware of ksonnet apps · af3f0f6c
      Alex Clemmer authored
      The ksonnet.next design doc specifies the core kubecfg verbs (i.e., the
      ones listed above) to all have the form:
      
        kubecfg <verb> [<env-name>|-f <file-or-dir>]
      
      That is to say, each of these should be able to take either an
      environment name, or a `-f` flag with a list of files and directories to
      apply `verb` on. In the case of the environment, we will apply `verb` to
      every component in the `components/` directory.
      
      This commit implements this behavior for all these verbs.
      af3f0f6c
    • Alex Clemmer's avatar
      Add a template expander abstraction · 86c5ad02
      Alex Clemmer authored
      This commit will introduce the `template.Expander` abstraction, which is
      meant to abstract over an invocation of the Jsonnet VM. Specifically, it
      provides facilities for users to provide (e.g.) Jpaths, ext vars, and so
      on.
      
      The main justification for this change is:
      
      * We need a common way for the `pkg` and `cmd` packages to interact with
        the Jsonnet VM.
      * The `utils` package is already too much of a catch-all.
      * It's easier to think about an invocation of the Jsonnet VM when we
        additionally encapsulate the parameters we pass to it on every
        invocation in kubecfg.
      86c5ad02
  11. Aug 08, 2017
  12. Aug 02, 2017
  13. Jul 07, 2017
  14. Jul 06, 2017
  15. Jun 30, 2017
  16. Jun 29, 2017
  17. Jun 28, 2017
  18. Jun 23, 2017
    • Angus Lees's avatar
      Add new `resolveImage` native function · 54405b18
      Angus Lees authored
      Add a new native function that resolves docker image names into more
      specific forms.  In particular, it can look up a docker registry and
      convert image:tag to image@digest at jsonnet-eval time.
      
      Limitations: Does not currently support private docker
      registries (that require authentication).
      
      Controlled via two new command line flags:
      - `--resolve-images` Change implementation of resolveImage native
        function. One of: noop, registry (default "noop")
      - `--resolve-images-error` Action when resolveImage fails. One of
        ignore,warn,error (default "warn")
      
      Note in particular that the defaults will *not* do remote registry
      lookups, and will only add an explicit ":latest" tag where no tag was
      given.
      
      Fixes #13
  19. Jun 22, 2017
  20. Jun 16, 2017
  21. May 18, 2017
  22. May 17, 2017
  23. May 16, 2017
  24. May 12, 2017