-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
helm: Add experimentalEnv
settings
#11908
Conversation
2ecf917
to
ea2ffa6
Compare
Enable setting arbitrary environment variables on all Go-based Control Plane containers For example, via CLI: ``` --set destinationController.experimentalEnv[0].name=ENV_VAR,destinationController.experimentalEnv[0].value=ENV_VAL ``` Via values file: ``` destinationController: experimentalEnv: - name: DEST_ENV_VAR value: DEST_ENV_VAL - name: DEST_CONFIG_MAP_VAR valueFrom: configMapKeyRef: key: dest_config_map_key name: dest-config-map-name heartbeat: experimentalEnv: identity: experimentalEnv: proxyInjector: experimentalEnv: spValidator: experimentalEnv: serviceMirrorExperimentalEnv: ``` Relates to #11862 and #11874 Signed-off-by: Andrew Seigner <[email protected]>
@@ -208,6 +208,10 @@ spec: | |||
{{- range (.Values.destinationController).experimentalArgs }} | |||
- {{ . }} | |||
{{- end }} | |||
{{- with (.Values.destinationController).experimentalEnv }} | |||
env: | |||
{{- toYaml . | nindent 8 -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like these configurations work differently from those of the proxy's experimentalEnv settings which are expressed as objects instead of as lists of name/values. Is this intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is intentional. It allows for things like this:
destinationController:
experimentalEnv:
- name: ENV_VAR
valueFrom:
configMapKeyRef:
key: env-var-key
name: my-config-map
We should probably follow-up to update the proxy settings to match this so they are consistent. |
PR #11874 introduced a `proxy.ExperimentalEnv` setting, allowing arbitrary name+value environment variables on proxies. This name+value pairing was a subset of k8s' environment variable, specifically, it did not allow for `valueFrom.configMapKeyRef` and related fields. PR #11908 introduced this pattern in the ControlPlane containers. Modify `proxy.ExperimentalEnv` to behave identically to k8s' native `EnvVar`, allowing settings such as: ``` --set proxy.experimentalEnv[0].name=LINKERD2_PROXY_DEFROBINATION --set proxy.experimentalEnv[0].valueFrom.configMapKeyRef.key=extreme-key --set proxy.experimentalEnv[0].valueFrom.configMapKeyRef.name=extreme-config ``` Context: #11908 (comment) Signed-off-by: Andrew Seigner <[email protected]>
PR #11874 introduced a `proxy.ExperimentalEnv` setting, allowing arbitrary name+value environment variables on proxies. This name+value pairing was a subset of k8s' environment variable, specifically, it did not allow for `valueFrom.configMapKeyRef` and related fields. PR #11908 introduced this pattern in the ControlPlane containers. Modify `proxy.ExperimentalEnv` to behave identically to k8s' native `EnvVar`, allowing settings such as: ``` --set proxy.experimentalEnv[0].name=LINKERD2_PROXY_DEFROBINATION --set proxy.experimentalEnv[0].valueFrom.configMapKeyRef.key=extreme-key --set proxy.experimentalEnv[0].valueFrom.configMapKeyRef.name=extreme-config ``` Context: #11908 (comment) Signed-off-by: Andrew Seigner <[email protected]>
PR #11874 introduced a `proxy.ExperimentalEnv` setting, allowing arbitrary name+value environment variables on proxies. This name+value pairing was a subset of k8s' environment variables, specifically, it did not allow for `valueFrom.configMapKeyRef` and related fields. PR #11908 introduced this pattern in the ControlPlane containers. Modify `proxy.ExperimentalEnv` to behave identically to k8s' native `EnvVar`, allowing settings such as: ``` --set proxy.experimentalEnv[0].name=LINKERD2_PROXY_DEFROBINATION --set proxy.experimentalEnv[0].valueFrom.configMapKeyRef.key=extreme-key --set proxy.experimentalEnv[0].valueFrom.configMapKeyRef.name=extreme-config ``` Context: #11908 (comment) Signed-off-by: Andrew Seigner <[email protected]>
PR #11874 introduced a `proxy.ExperimentalEnv` setting, allowing arbitrary name+value environment variables on proxies. This name+value pairing was a subset of k8s' environment variables, specifically, it did not allow for `valueFrom.configMapKeyRef` and related fields. PR #11908 introduced this pattern in the ControlPlane containers. Modify `proxy.ExperimentalEnv` to behave identically to k8s' native `EnvVar`, allowing settings such as: ``` --set proxy.experimentalEnv[0].name=LINKERD2_PROXY_DEFROBINATION --set proxy.experimentalEnv[0].valueFrom.configMapKeyRef.key=extreme-key --set proxy.experimentalEnv[0].valueFrom.configMapKeyRef.name=extreme-config ``` Context: #11908 (comment) Signed-off-by: Andrew Seigner <[email protected]>
PR #11874 introduced a `proxy.ExperimentalEnv` setting, allowing arbitrary name+value environment variables on proxies. This name+value pairing was a subset of k8s' environment variables, specifically, it did not allow for `valueFrom.configMapKeyRef` and related fields. PR #11908 introduced this pattern in the ControlPlane containers. Modify `proxy.ExperimentalEnv` to behave identically to k8s' native `EnvVar`, allowing settings such as: ``` --set proxy.experimentalEnv[0].name=LINKERD2_PROXY_DEFROBINATION --set proxy.experimentalEnv[0].valueFrom.configMapKeyRef.key=extreme-key --set proxy.experimentalEnv[0].valueFrom.configMapKeyRef.name=extreme-config ``` Context: #11908 (comment) Signed-off-by: Andrew Seigner <[email protected]>
Enable setting arbitrary environment variables on all Go-based Control Plane containers
For example, via CLI:
Via values file:
Relates to #11862 and #11874