- Sep 26, 2017
-
-
Alex Clemmer authored
Fix 'env set' where --name flag is not specified
-
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
Add combination deployment/service system prototype
-
Alex Clemmer authored
Implement 'prototype preview'
-
Alex Clemmer authored
-
Alex Clemmer authored
Currently the command 'prototype use' expands a prototype and prints to stdout. This is useful, but most of the time, users want to simply dump the result in 'components/' This command implements this print-to-stdout behavior in a new command, 'prototype-preview', and reimplements 'prototype use' to drop the expanded prototype into 'components/'. The new form of this command is: ksonnet prototype use <prototype-name> <component-name> [type] [flags] So, for example, a command like: ksonnet prototype use deployment nginx-depl [...] would expand the 'deployment' prototype, and place it in 'components/nginx-depl.jsonnet' (since Jsonnet is the default template expansion). Alternatively, something like this: ksonnet prototype use deployment nginx-depl yaml [...] would expand the prototype and place it in 'components/nginx-depl.yaml' (assuming that there is a YAML version of this template.
-
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 22, 2017
-
-
Alex Clemmer authored
Add help docs for `delete`
-
Alex Clemmer authored
Fixes #132.
-
Alex Clemmer authored
Add example to the service prototype's documentation
-
Alex Clemmer authored
Add `prototype list` command
-
- Sep 21, 2017
-
-
Alex Clemmer authored
-
Alex Clemmer authored
The `prototype list` command lists all known prototypes. It is functionally equivalent to a `prototype search` that returns all prototypes.
-
Alex Clemmer authored
Cause `init` to generate env using current-context
-
Alex Clemmer authored
When we run `init`, currently we generate a simple environment called 'default' with no URI. A better idea is to generate the URI from the current context of the active kubeconfig file, if it exists.
-
Alex Clemmer authored
Fix improper elision of -J flags
-
Alex Clemmer authored
Set default log level to 'Info'
-
Alex Clemmer authored
Currently if we use a command like `apply default -f components/whatever.yaml`, kubecfg will fail to emit flags that add ksonnet-lib to the -J paths. This means that, while a command like `apply default` will correctly linke against (e.g.) `k.libsonnet`, adding the `-f` flag will not. This commit will correct this problem for all commands of this form.
-
Alex Clemmer authored
Commands using the <env> arg should deploy to the correct cluster
-
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.
-
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>.
-
- Sep 20, 2017
-
-
Alex Clemmer authored
Adopt 0755 as default permissions for folders
-
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.
-
Alex Clemmer authored
Add logging to 'env' subcommands
-
- 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
-
Alex Clemmer authored
Add to 'env' command documentation
-
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.
-
Alex Clemmer authored
Fixes #139.
-
Alex Clemmer authored
Set default permissions in `metadata.Manager` to 0644
-
- 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.
-
Alex Clemmer authored
Introduce env subcommands 'env add', 'env rm', 'env set' & 'env list'
-
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
-
- Sep 11, 2017
-
-
Alex Clemmer authored
Add types for prototype parameters
-
Alex Clemmer authored
Fix #113
-
Alex Clemmer authored
When a user runs `prototype search`, we'd like for the output to include the name, description, and available template types, and we'd like that output to be padded for readability. For example, if the user runs `prototype search io.`, we'd like to output something like this: io.whatever.pkg.foo Foo's main template [jsonnet, yaml] io.whatever.pkg.foobar Foobar's main template [jsonnet, yaml, json] This commit will introduce this style of padded output to the `prototype search` subcommand.
-
Alex Clemmer authored
This commit will fix #116 by introducing two new constructs to the prototype specification schema: 1. Mandatory types for prototype parameters. This lets us accept bare words on the command line, and then "do the right thing" when emitting JSON or Jsonnet. For example, say a template produces a `core.v1.Service` that exposes a port with a `--targetPort` flag. When the user passes a number (e.g., `80`) in, we should _not_ put quote marks around it, since we want to expose port `80`. When the user passes a string (e.g., `"nginxPort"`), we _should_ put quote marks around it, to denote that we're exposing the port with that name. In order to do this, we need to know they "type" of the parameter (in this case, `NumberOrString`). 2. Mandatory template types. A template can have a JSON, YAML, or Jsonent flavor, and we default to using Jsonnet. This is useful mostly to make type parameters less error-prone (since one set of parameters corresponds to one set of templates), but it also significantly de-bloats the output of commands like `search`, since one fully-qualified name can correspond to multiple flavors of the same template.
-
Alex Clemmer authored
This commit fixes #113, causing us to emit `k.libsonnet` (a collection of extensions to the k8s API) by updating the dependency on `ksonnet-lib/ksonnet-gen` and exercising the new signature for `ksonnet.Emit`, which handles this automatically. We update the `vendor/` directory and the code that depends on it in the same commit so that we don't break bisect.
-