Skip to content

Commit ec2709e

Browse files
authored
Merge pull request kubernetes#3691 from StratoAG/document-extra-envs
Add `extraEnvConfigMaps` and document some values
2 parents 383a506 + 0364768 commit ec2709e

File tree

5 files changed

+33
-3
lines changed

5 files changed

+33
-3
lines changed

charts/cluster-autoscaler/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ name: cluster-autoscaler
1717
sources:
1818
- https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler
1919
type: application
20-
version: 9.0.0
20+
version: 9.1.0

charts/cluster-autoscaler/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ Releases of the chart from `9.0.0` onwards return the naming of the chart to `cl
4646

4747
To migrate from a 1.X release of the chart to a `9.0.0` or later release, you should first uninstall your `1.X` install of the `cluster-autoscaler-chart` chart, before performing the installation of the new `cluster-autoscaler` chart.
4848

49+
## Migration from 9.0 to 9.1
50+
51+
Starting from `9.1.0` the `envFromConfigMap` value is expected to contain the name of a ConfigMap that is used as ref for `envFrom`, similar to `envFromSecret`. If you want to keep the previous behaviour of `envFromConfigMap` you must rename it to `extraEnvConfigMaps`.
52+
4953
## Installing the Chart
5054

5155
**By default, no deployment is created and nothing will autoscale**.
@@ -343,9 +347,13 @@ Though enough for the majority of installations, the default PodSecurityPolicy _
343347
| cloudProvider | string | `"aws"` | The cloud provider where the autoscaler runs. Currently only `gce`, `aws`, `azure` and `magnum` are supported. `aws` supported for AWS. `gce` for GCE. `azure` for Azure AKS. `magnum` for OpenStack Magnum. |
344348
| containerSecurityContext | object | `{}` | [Security context for container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) |
345349
| dnsPolicy | string | `"ClusterFirst"` | Defaults to `ClusterFirst`. Valid values are: `ClusterFirstWithHostNet`, `ClusterFirst`, `Default` or `None`. If autoscaler does not depend on cluster DNS, recommended to set this to `Default`. |
350+
| envFromConfigMap | string | `""` | ConfigMap name to use as envFrom. |
351+
| envFromSecret | string | `""` | Secret name to use as envFrom. |
346352
| expanderPriorities | object | `{}` | The expanderPriorities is used if `extraArgs.expander` is set to `priority` and expanderPriorities is also set with the priorities. If `extraArgs.expander` is set to `priority`, then expanderPriorities is used to define cluster-autoscaler-priority-expander priorities. See: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md |
347353
| extraArgs | object | `{"logtostderr":true,"stderrthreshold":"info","v":4}` | Additional container arguments. |
348354
| extraEnv | object | `{}` | Additional container environment variables. |
355+
| extraEnvConfigMaps | object | `{}` | Additional container environment variables from ConfigMaps. |
356+
| extraEnvSecrets | object | `{}` | Additional container environment variables from Secrets. |
349357
| fullnameOverride | string | `""` | String to fully override `cluster-autoscaler.fullname` template. |
350358
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
351359
| image.pullSecrets | list | `[]` | Image pull secrets |

charts/cluster-autoscaler/README.md.gotmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ Releases of the chart from `9.0.0` onwards return the naming of the chart to `cl
4646

4747
To migrate from a 1.X release of the chart to a `9.0.0` or later release, you should first uninstall your `1.X` install of the `cluster-autoscaler-chart` chart, before performing the installation of the new `cluster-autoscaler` chart.
4848

49+
## Migration from 9.0 to 9.1
50+
51+
Starting from `9.1.0` the `envFromConfigMap` value is expected to contain the name of a ConfigMap that is used as ref for `envFrom`, similar to `envFromSecret`. If you want to keep the previous behaviour of `envFromConfigMap` you must rename it to `extraEnvConfigMaps`.
52+
4953
## Installing the Chart
5054

5155
**By default, no deployment is created and nothing will autoscale**.

charts/cluster-autoscaler/templates/deployment.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ spec:
142142
- name: {{ $key }}
143143
value: "{{ $value }}"
144144
{{- end }}
145-
{{- range $key, $value := .Values.envFromConfigMap }}
145+
{{- range $key, $value := .Values.extraEnvConfigMaps }}
146146
- name: {{ $key }}
147147
valueFrom:
148148
configMapKeyRef:
@@ -156,11 +156,17 @@ spec:
156156
name: {{ default (include "cluster-autoscaler.fullname" $) $value.name }}
157157
key: {{ required "Must specify key!" $value.key }}
158158
{{- end }}
159-
{{- if .Values.envFromSecret }}
159+
{{- if or .Values.envFromSecret .Values.envFromConfigMap }}
160160
envFrom:
161+
{{- if .Values.envFromSecret }}
161162
- secretRef:
162163
name: {{ .Values.envFromSecret }}
163164
{{- end }}
165+
{{- if .Values.envFromConfigMap }}
166+
- configMapRef:
167+
name: {{ .Values.envFromConfigMap }}
168+
{{- end }}
169+
{{- end }}
164170
livenessProbe:
165171
httpGet:
166172
path: /health-check

charts/cluster-autoscaler/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,18 @@ extraArgs:
150150
# extraEnv -- Additional container environment variables.
151151
extraEnv: {}
152152

153+
# extraEnvConfigMaps -- Additional container environment variables from ConfigMaps.
154+
extraEnvConfigMaps: {}
155+
156+
# extraEnvSecrets -- Additional container environment variables from Secrets.
157+
extraEnvSecrets: {}
158+
159+
# envFromConfigMap -- ConfigMap name to use as envFrom.
160+
envFromConfigMap: ""
161+
162+
# envFromSecret -- Secret name to use as envFrom.
163+
envFromSecret: ""
164+
153165
# fullnameOverride -- String to fully override `cluster-autoscaler.fullname` template.
154166
fullnameOverride: ""
155167

0 commit comments

Comments
 (0)