Add support for a values file that contain the environment specific values for spec fields in manifests.
Describe the benefit of this proposed enhancement
Re-use the exact same manifest suite in different environments and externalize environment specific values.
Code examples, pseudo code or any other technical description of the proposal
Enhance the metadata field to include environments:
metadata:
environments: # Optional. If non supplied, allocate to default environment called "default"
- string
Add support for a values file. Example file layout:
values:
- name: string # Required: a unique name that can be used as reference in "{{ .Values.<<name>> }}" field values
environments:
- environmentName: string # Required - a name that will be matched against the metadata environment name for this value
source: string # Optional, default None/null (use the literal value supplied), or alternatively if supplied a string value, use the string as a variable name
value: string # Optional, required if "source" is null.
Add the command line parameter -e or --environment to specify the environment. If none is supplied, set the default value to default.
values:
- name: greeting
environments:
- environmentName: env1
value: This is environment 1
- environmentName: env2
value: This is environment 2
- environmentName: env3
value: This is environment 3
- environmentName: default
value: This is the default environment
Brief Description of the Enhancement
Add support for a values file that contain the environment specific values for
spec
fields in manifests.Describe the benefit of this proposed enhancement
Re-use the exact same manifest suite in different environments and externalize environment specific values.
Code examples, pseudo code or any other technical description of the proposal
Enhance the metadata field to include environments:
Add support for a values file. Example file layout:
Add the command line parameter
-e
or--environment
to specify the environment. If none is supplied, set the default value todefault
.Hello World Adapted Example
Manifest:
Values file: (must be called
values.yaml
):Running the example: