- Oct 26, 2017
-
-
Jessica Yuen authored
This change enables the user to diff between two environments that are either local or remote. i.e., `kubecfg diff local:dev local:prod` will diff between the expanded templates for each environment on disk. `kubecfg diff remote:dev remote:prod` will diff between two remote environment clusters. It does this by first expanding the component templates of each environment. Then, the live objects are fetched from each of the clusters and the diff is performed against the live objects. `kubecfg diff local:dev remote:prod` is also an option. This will diff between the expanded templates for 'dev' on disk and the live objects on 'prod's server.
-
- Oct 25, 2017
-
-
Jessica Yuen authored
For now, client-go bindings will be removed from the diff command. Doing this because when diffing between multiple remote environments, it becomes ambiguous which environment cluster the flags should belong to.
-
- Oct 17, 2017
-
-
Jessica Yuen authored
-
Jessica Yuen authored
-
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 05, 2017
-
-
Jessica Yuen authored
The `clientConfig` param currently being passed is not needed, because it exists as a package level var in root. It also makes little sense to pass a custom `clientConfig` because if `overrides.Context.Namespace` is populated, the namespace that is returned is configured as an override in the package level `clientConfig` and not the `clientConfig` in the param.
-
- Sep 27, 2017
-
-
Jessica Yuen authored
-
- Sep 21, 2017
-
-
Alex Clemmer authored
Fixes #108.
-
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 07, 2017
-
-
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.
-
- Sep 06, 2017
-
-
Angus Lees authored
If the current kubeconfig context is declared with an explicit (non-empty) namespace, then `mergedKubeConfig.Namespace()` returns that *config file* namespace value, ignoring an explicit `--namespace` command line flag. See https://github.com/kubernetes/client-go/issues/288 for upstream client-go bug/discussion. This change works around the issue by just checking the Namespace override ourselves before falling through to the regular function. Further fixes #103
-
- Sep 05, 2017
-
-
Angus Lees authored
This reverts commit 020d5da0. The change broke --namespace (and other flag) handling, because it recreates the `clientConfig` global singleton multiple times - only some of which are correctly tied to the relevant flags.
-
- Sep 02, 2017
-
-
Alex Clemmer authored
-
- Sep 01, 2017
-
-
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/.
-
- Aug 30, 2017
-
-
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.
-
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.
-
Angus Lees authored
Noticed and then audited in the course of other work.
-
- Aug 08, 2017
-
-
Angus Lees authored
- Move fqname to utils - Add ResourceNameFor and use it to get a lowercased/pluralised version of the resource name
-
Angus Lees authored
-
- Jul 26, 2017
-
-
Tom Wilkie authored
-
- Jul 25, 2017
-
-
Tom Wilkie authored
-
- Jul 07, 2017
-
-
Tom Wilkie authored
-
- Jul 06, 2017
-
-
Tom Wilkie authored
-
Angus Lees authored
-
- Jun 30, 2017
-
-
Angus Lees authored
Improve interactive output experience by switching to a logging library (logrus) that allows customising the output format. This also removes the glog command line flags. Replaced with a simpler `--verbose`/`-v` option: - quiet by default (warnings and errors only) - `-v` for progress info - `-vv` for debug Fixes #34
-
Angus Lees authored
Fixes #35
-
- Jun 09, 2017
-
-
Angus Lees authored
Uses github.com/yudai/gojsondiff for the heavy lifting.
-