Skip to content
Snippets Groups Projects
  1. Feb 01, 2018
  2. Jan 22, 2018
    • Jessica Yuen's avatar
      Add remove component functionality · 8f26d9a4
      Jessica Yuen authored
      
      Introduce `ks component rm <component>`. This functionality will:
      
      1. Delete the component file from components/. This is determined by the
      component file name. If there exists two files with the same name but
      different file  extensions, we will error out.
      
      2. Remove component references. This currently implies removing all
      component referenes in the component/params.libsonnet file and the
      environment-specific params.libsonnet files.
      
      Signed-off-by: default avatarJessica Yuen <im.jessicayuen@gmail.com>
      8f26d9a4
  3. Jan 17, 2018
  4. Jan 10, 2018
  5. Jan 08, 2018
  6. Jan 05, 2018
  7. Dec 19, 2017
    • Alex Clemmer's avatar
      Test all branches of GH URI-parsing code · d54aeb39
      Alex Clemmer authored
      When a user adds a registry (e.g., through a command like `ks registry
      add`, or implicitly through `ks init`) we must parse a URI pointing at
      registry hosted on github.com, since we currently only support the
      `"github"` protocol.
      
      This logic is somewhat complex, since we must
      
        1. infer the location of a `registry.yaml` file given the URI, and
        2. accept and parse a broad set of URIs a user might provide.
      
      For example, consider the following valid URIs, and what we do to infer
      the location of the `registry.yaml` file that specifies a registry:
      
        URIs with an explicit `registry.yaml`:
          github.com/exampleOrg/exampleRepo/blob/master/registry.yaml
          github.com/exampleOrg/exampleRepo/blob/master/incubator/registry.yaml
      
        URIs with an implicit `registry.yaml`:
          github.com/exampleOrg/exampleRepo/
          github.com/exampleOrg/exampleRepo/tree/master
      
        URIs with different protocols (or no protocol specified)
          github.com/exampleOrg/exampleRepo
          http://github.com/exampleOrg/exampleRepo
          https://github.com/exampleOrg/exampleRepo
      
      
          www.github.com/exampleOrg/exampleRepo
      
      And so on.
      
      Because this parsing logic has many branches, it is important for us to
      test every branch, so that the user is not surprised when a command like
      `registry add` doesn't work.
      
      This commit will introduce such tests.
      
      Signed-off-by: default avatarAlex Clemmer <clemmer.alexander@gmail.com>
      d54aeb39
  8. Dec 15, 2017
    • Jessica Yuen's avatar
      Implement command `ks registry add` · 4e0b163e
      Jessica Yuen authored
      
      Currently users are unable to add their own registries through the CLI.
      This limits them to a small subset of prototypes found in the default
      incubator registry.
      
      This commit will add the command `ks registry add`, that allows users to
      add registries supporting the `github` protocol.
      
      It will be of the form `ks registry add <registry-name> <registry-uri>
      [--version]`. If a version is not specified, `latest` will be used.
      
      Signed-off-by: default avatarJessica Yuen <im.jessicayuen@gmail.com>
      4e0b163e
  9. Dec 13, 2017
  10. Dec 12, 2017
  11. Dec 03, 2017
  12. Dec 01, 2017
  13. Nov 28, 2017
  14. Nov 27, 2017
  15. Nov 22, 2017
    • Jessica Yuen's avatar
      Improve logging for init · 97631513
      Jessica Yuen authored
      - Add message:  Creating a new app 'foo' at path '/path/to/foo'
      - On success, add message:  ksonnet app successfully created! Next, try
        creating a component with `ks generate`
      - On failure, provide suggestions for the user.
      - Make note that the context is retrieved from the kubeconfig file at
        the environment variable $KUBECONFIG
      97631513
  16. Nov 21, 2017
    • Jessica Yuen's avatar
      Support renaming of envs to parent & child directories · 385da08e
      Jessica Yuen authored
      Currently, there are limitations around the file system we are using
      that does not easily allow renaming of `us-west/prod` to `us-west`, or
      vice versa - `us-west` to `us-west/prod`.
      
      This commit will handle the logic to allow for that by moving the file
      contents.
      385da08e
  17. Nov 16, 2017
    • Jessica Yuen's avatar
      Rename <env>.jsonnet file to main.jsonnet · f6fc32a1
      Jessica Yuen authored
      Currently, creating a `dev` environment will create a file
      `dev.jsonnet`. Creating a `prod` environment will create a file
      `prod.jsonnet`. This is a little more complex and prone to error than it
      needs to be, especially when we are renaming environments. It will also
      make this file easier to refer to in documentation if we give the file a
      static name -- `main.jsonnet`.
      f6fc32a1
  18. Nov 15, 2017
    • Jessica Yuen's avatar
      Normalize environment server URL · c188bc9b
      Jessica Yuen authored
      As part of the environments feature, we want to be able to deploy to a
      specific cluster given the environment's URI. We cross-check against
      kubecfg for this URI's location. For fail-safe comparison, we probably
      want to normalize these URIs.
      c188bc9b
    • Alex Clemmer's avatar
      Add `dep describe` command · c6d9ae40
      Alex Clemmer authored
      This commit will partially resolve #38.
      c6d9ae40
  19. Nov 13, 2017
    • Jessica Yuen's avatar
      Fix bug for duplicate environment params · 911fab4f
      Jessica Yuen authored
      A bug existed where if `param set` was called for the same param twice,
      a duplicate entry was created for the component. This only occured where
      the component name contained a special character.
      911fab4f
  20. Nov 09, 2017
  21. Nov 08, 2017
    • Alex Clemmer's avatar
      De/serialize specification objects with YAML · 56befd0f
      Alex Clemmer authored
      Fixes #48.
      
      Currently the structs `app.Spec`, `registry.Spec`, and `parts.Spec` are
      all serialized and deserialized using JSON instead of YAML.
      
      This commit will resolve this issue.
      56befd0f
    • Jessica Yuen's avatar
      Jsonnet handling of component names with special characters · ce2d567d
      Jessica Yuen authored
      Currently, if a component name contains a special character, ex:
      foo-bar, this translates to the jsonnet identifier: foo-bar, which is
      invalid syntax.
      
      This change will quote component names where there are special
      characters.
      ce2d567d
    • Alex Clemmer's avatar
      Add `vendor/` to Jsonnet paths · 5327cf5c
      Alex Clemmer authored
      This resolves the first half of #68. When we `generate` using a
      prototype from a vendored dependency, it often results in a compilation
      error when we `apply`, because these prototypes usually depend on code
      that exists in the dependency, and `vendor/` is not a part of the
      Jsonnet search path.
      
      This commit resolves this problem by adding it to the search path.
      5327cf5c
  22. Nov 07, 2017
  23. Nov 06, 2017
    • Alex Clemmer's avatar
    • Alex Clemmer's avatar
      Initialize `incubator` registry during `ks init` · e8d1df72
      Alex Clemmer authored
      The ksonnet project exposes a "default" registry, `incubator`, in the
      ksonnet/parts repository.
      
      This commit will cause ever `ks init` command to automatically add this
      registry to the ksonnet application.
      e8d1df72
    • Alex Clemmer's avatar
      Introduce `registry.Manager` abstraction + impl for GitHub · b87f6d15
      Alex Clemmer authored
      The vast majority of ksonnet apps will know about at least one registry,
      the official ksonnet `incubator` registry. In general, managing
      registries can involve fairly complex logic (e.g., resolving a reference
      to a registry to a remote registry specification; finding all
      libraries exposed by a registry; and so on).
      
      This commit will introduce the `registry.Manager` abstraction, as well
      as an implementation for registries hosted as GitHub repositories.
      b87f6d15
    • Alex Clemmer's avatar
      Emit `app.yaml` after init · 4dd0dd7a
      Alex Clemmer authored
      When the user calls `ks init <whatever>`, we need to emit an `app.yaml`
      for the new project. This commit will introduce such behavior.
      4dd0dd7a
    • Alex Clemmer's avatar
      Add schemas for `app.yaml` and `registry.yaml` · 5ddc8540
      Alex Clemmer authored
      Every ksonnet application has an `app.yaml`, which is similar in
      principle to node.js's `package.json`. It contains important metadata,
      such as description, names, and information about dependencies. This is
      similarly true of `registry.yaml`, which contains information about a
      package registry.
      
      This commit will introduce schemas for both these files.
      5ddc8540
    • Alex Clemmer's avatar
      Add user-level ksonnet directory · 6f9afae6
      Alex Clemmer authored
      6f9afae6
  24. Nov 04, 2017
    • Jessica Yuen's avatar
      Introduce command: `ks param diff <env1> <env2> [--component]` · 6a6704fc
      Jessica Yuen authored
      Pretty prints differences between the component parameters of two
      environments.
      
      A component flag is accepted to diff against a single component. By
      default, the diff is performed against all components.
      6a6704fc
    • Jessica Yuen's avatar
      Add interface for retrieving environment params · e2d770a7
      Jessica Yuen authored
      The goal of this commit is to add an interface to `metadata.Manager`
      that allows retrieving of all environment params:
      `getEnvironmentParams(envName)`.
      
      This is done by:
      
      1. Adding functionality to the snippet parser to get all environment
      params out of the snippet read from
      `environments/<env>/params.libsonnet`
      
      2. Adding functionality to the snippet parser to get all component
      params out of the snippet read from `components/params.libsonnet`
      
      3. Having the `metadata.Manager` implementation handle the 'joining' of
      params from 1) and 2), and returning that result.
      e2d770a7
    • Jessica Yuen's avatar
      Handle writing of environment params · 173e0082
      Jessica Yuen authored
      This commit will add an interface `SetEnvironmentParams` to
      metadata.Manager that allows setting of env params.
      
      Also implements the logic for parsing the jsonnet snippet to
      append / modify params in simple env param schemas. It will:
      
      1. Update the params if the component exists in the jsonnet
      snippet.
      2. Add the component if it does not exist.
      173e0082
    • Jessica Yuen's avatar
      Implement logic for retrieving component params · ba201148
      Jessica Yuen authored
      This commit will add an interface `GetComponentParams` to
      metadata.Manager that returns a map of parameters for the passed in
      component.
      
      Also implements the logic for parsing the jsonnet snippet to retrieve
      the parameters.
      
      This functionality will later support new commands to list parameters.
      ba201148