- Feb 01, 2018
-
-
bryanl authored
extracts ksonnet generator to a new package to make it easier to incorporate in new code Signed-off-by:
bryanl <bryanliles@gmail.com>
-
- Dec 12, 2017
-
-
Tanner Bruce authored
It is possible for the walk function to be called with err set Signed-off-by:
Tanner Bruce <bruce.tanner@gmail.com>
-
- Dec 01, 2017
-
-
Jessica Yuen authored
Signed-off-by:
Jessica Yuen <im.jessicayuen@gmail.com>
-
- Nov 27, 2017
-
-
Jessica Yuen authored
Currently absolute paths are being used for jsonnet imports. This makes it difficult to share the files across different systems. Signed-off-by:
Jessica Yuen <im.jessicayuen@gmail.com>
-
- Nov 21, 2017
-
-
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.
-
- Nov 16, 2017
-
-
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`.
-
- Nov 15, 2017
-
-
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.
-
- Nov 09, 2017
-
-
Jessica Yuen authored
Currently the env directory is being renamed on `env set foo --name=bar`, however the `foo.jsonnet` file also needs to be renamed to `bar.jsonnet`. This commit fixes that.
-
- Nov 04, 2017
-
-
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.
-
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.
-
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.
-
- Oct 31, 2017
-
-
Jessica Yuen authored
This commit will generate the `environments/<env>/params.libsonnet` file on `env add <env>`. The purpose of this file is to allow users to define custom parameters on an environment-to-environment basis. It is meant to allow for "overrides" to component params.
-
- Oct 26, 2017
-
-
Jessica Yuen authored
'server' is consistent with what is used by clientgo. 'uri' only introduces new language to ksonnet with the same meaning.
-
- Oct 17, 2017
-
-
Jessica Yuen authored
Environments currently have the concept of a server URI, but it is ambiguous which cluster namespace to use. This commit will introduce the concept of namespaces to the env commands. For example, `kubecfg env add staging http://mock-staging-uri \ --namespace=staging-namespace` `kubecfg env set staging --namespace=staging-namespace` The default environment will use the namespace of the default context. This commit will also update commands that take the <env> arg such as `apply` to make use of the env namespace, if specified.
-
- Oct 06, 2017
-
-
Jessica Yuen authored
Commands that take `env` as a param currently expand all files in the `components` directory. This is no longer necessary with the introduction of `base.libsonnet` and the per-environment override `<env>.jsonnet` file. This commit will simply expand the single `<env>.jsonnet` file (which will implicitly expand all component files). The case of running `ksonnet apply default`, is equivalent to running `ksonnet apply -f environments/default/default.jsonnet`.
-
Jessica Yuen authored
This commit will generate an "<env-name>.jsonnet" file when an environment is created. For example, the default environment would have the following tree structure: ├── environments │ ├── base.libsonnet │ └── default │ ├── .metadata │ │ ├── k.libsonnet │ │ ├── k8s.libsonnet │ │ └── swagger.json │ ├── default.jsonnet │ └── spec.json The goal of this file is to allow users to extend on base.libsonnet on a per-environment basis to allow for custom overrides, such as replica count.
-
Jessica Yuen authored
This change simply hides the environment metadata details that we do not want users directly modifying into a .metadata folder.
-
- Sep 26, 2017
-
-
Jessica Yuen authored
There is a bug where if --name is not passed during env set, an error is thrown due to failed validation checking on an empty name. This commit fixes this bug.
-
Alex Clemmer authored
Currently `metadata.isValidName` will admit names that should be invalid (e.g., names with spaces, leading '/' characters) and not admit names that should be valid (e.g., names with '.' characters inside). This commit moves this function into `metadata/interface.go` and hardens it against these constraints.
-
- Sep 21, 2017
-
-
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.
-
- Sep 20, 2017
-
-
Alex Clemmer authored
Under certain circumstances, it is possible for operations to fail because of permissions that are too restrictive. Here we adopt the default permissions of 0755 (i.e., rwxr-xr-x), which should be a better balance of restriction and flexibility.
-
- Sep 19, 2017
-
-
Jessica Yuen authored
This commit will add logging to all env subcommands 'list', 'set', 'add', and 'rm'. It adds both Info level and Debug level logging. Fixes #137
-
- Sep 18, 2017
-
-
Alex Clemmer authored
Currently all files and folders created with the `metadata.Manager` (which is the core FS management subsystem) are created with permissions 0777, i.e., everyone has all permissions. This commit transistions us to a more locked down permissions set, 0644, which allows the user to do everything except execute, and everyone else to only read. Since we don't store any app code that needs to be executed, this should be suitable for everything. Fixes #136.
-
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'.
-
- Sep 15, 2017
-
-
Jessica Yuen authored
'env rm <env-name>' deletes an environment within a ksonnet project. This is the same as removing the <env-name> environment directory and all files contained. Empty parent directories will also be removed.
-
Jessica Yuen authored
'env list' will list all environments within a Ksonnet project. Each environment will be pretty-printed with it's name and cluster URI location.
-
- Sep 13, 2017
-
-
Jessica Yuen authored
'env add <env-name> <env-uri>' will create a new environment within a ksonnet project, by generating a new directory, 'env-name', within the 'envs' directory. Each environment will contain environment-specfic files. Notably, a new environment-specific file is 'spec.json'. 'spec.json' currently only contains the 'env-uri' of the Kubernetes cluster located at the added environment. Below is an example directory structure for the environment 'us-west/staging': app-name/ .gitignore Default .gitignore; can customize VCS .ksonnet/ Metadata for ksonnet environments/ Env specs (defaults: dev, test, prod) default/ [Default generated environment.] us-west/ [Example of user-generated env] staging/ k.libsonnet k8s.libsonnet swagger.json spec.json [This will contain the uri of the environment] components/ Top-level Kubernetes objects defining application lib/ user-written .libsonnet files vendor/ mixin libraries, prototypes
-