- 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
-