Commands using the <env> arg should deploy to the correct cluster
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.
Showing
- cmd/apply.go 11 additions, 5 deletionscmd/apply.go
- cmd/delete.go 16 additions, 2 deletionscmd/delete.go
- cmd/diff.go 16 additions, 2 deletionscmd/diff.go
- cmd/env.go 24 additions, 4 deletionscmd/env.go
- cmd/root.go 72 additions, 18 deletionscmd/root.go
- cmd/show.go 15 additions, 1 deletioncmd/show.go
- cmd/update.go 10 additions, 4 deletionscmd/update.go
- cmd/validate.go 16 additions, 2 deletionscmd/validate.go
- metadata/environment.go 19 additions, 4 deletionsmetadata/environment.go
- metadata/environment_test.go 3 additions, 3 deletionsmetadata/environment_test.go
- metadata/interface.go 3 additions, 2 deletionsmetadata/interface.go
- pkg/kubecfg/env.go 17 additions, 37 deletionspkg/kubecfg/env.go
Please register or sign in to comment