Migrate environment spec.json to the app.yaml model
Currently spec.json contains detail about an environment's namespace and
server. Following the proposal at
design/proposals/modular-components.md, this change will consolidate
environment specifications in the common ksonnet app.yaml file.
An environment specification for the environment "dev", may look as
follows:
environments:
dev:
destinations:
- namespace: foo
server: example.com
k8sVersion: "1.8.1"
path: dev
targets:
- db
Note: This change currently doesn't support
(1) population of the k8sVersion field. This will occur as we migrate
the environment .metadata folder.
(2) deployment to more than one destination. This will occur once ks
supports multi-cluster deployment.
(3) setting of details other than the env name in `ks env set`. Prior
to this change, users are able to namespace and server URI, however it
becomes ambiguous which namespace is being set for an environment where
there can be multiple destinations. We will encourage configuration in
app.yaml itself.
(4) targets. This will come in a later change.
Signed-off-by:
Jessica Yuen <im.jessicayuen@gmail.com>
Showing
- cmd/diff.go 6 additions, 3 deletionscmd/diff.go
- cmd/env.go 4 additions, 17 deletionscmd/env.go
- cmd/root.go 40 additions, 9 deletionscmd/root.go
- docs/cli-reference/ks_env_set.md 3 additions, 14 deletionsdocs/cli-reference/ks_env_set.md
- integration/fixtures/sampleapp/app.yaml 0 additions, 11 deletionsintegration/fixtures/sampleapp/app.yaml
- integration/integration_suite_test.go 20 additions, 10 deletionsintegration/integration_suite_test.go
- metadata/app.go 48 additions, 0 deletionsmetadata/app.go
- metadata/app/schema.go 38 additions, 1 deletionmetadata/app/schema.go
- metadata/app/schema_test.go 66 additions, 1 deletionmetadata/app/schema_test.go
- metadata/environment.go 126 additions, 201 deletionsmetadata/environment.go
- metadata/environment_test.go 37 additions, 48 deletionsmetadata/environment_test.go
- metadata/interface.go 5 additions, 4 deletionsmetadata/interface.go
- metadata/manager.go 1 addition, 31 deletionsmetadata/manager.go
- metadata/manager_test.go 1 addition, 5 deletionsmetadata/manager_test.go
- pkg/kubecfg/env.go 23 additions, 16 deletionspkg/kubecfg/env.go
- testdata/testapp/app.yaml 7 additions, 0 deletionstestdata/testapp/app.yaml
Please register or sign in to comment