From 1f9750eedbefa1f171b1a694190010ce20e99878 Mon Sep 17 00:00:00 2001 From: Alessandro Siragusa Date: Thu, 27 Jun 2019 08:49:21 +0200 Subject: [PATCH] [stable/cluster-autoscaler] Add extraEnvFromSecret parameter (#13308) This parameter can be useful if we want to supply the access keys via an external secret. This should work with any cloud provider. In my case I don't want to authorize the workers to interact with the ASG, as any container running in the cluster would be allowed to do so, instead I have created an IAM user and stored the credentials in a secret. Signed-off-by: Alessandro Siragusa --- stable/cluster-autoscaler/Chart.yaml | 2 +- stable/cluster-autoscaler/README.md | 1 + stable/cluster-autoscaler/templates/deployment.yaml | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/stable/cluster-autoscaler/Chart.yaml b/stable/cluster-autoscaler/Chart.yaml index 8e2de37974..b735e9a828 100644 --- a/stable/cluster-autoscaler/Chart.yaml +++ b/stable/cluster-autoscaler/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 description: Scales worker nodes within autoscaling groups. icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png name: cluster-autoscaler -version: 0.13.3 +version: 0.14.0 appVersion: 1.13.1 home: https://github.com/kubernetes/autoscaler sources: diff --git a/stable/cluster-autoscaler/README.md b/stable/cluster-autoscaler/README.md index 800fec9349..ed4324982c 100644 --- a/stable/cluster-autoscaler/README.md +++ b/stable/cluster-autoscaler/README.md @@ -137,6 +137,7 @@ Parameter | Description | Default `extraArgs` | additional container arguments | `{}` `podDisruptionBudget` | Pod disruption budget | `maxUnavailable: 1` `extraEnv` | additional container environment variables | `{}` +`envFromSecret` | additional container environment variables from secret | `nil` `nodeSelector` | node labels for pod assignment | `{}` `podAnnotations` | annotations to add to each pod | `{}` `deployment.apiVersion` | apiVersion for the deployment | `extensions/v1beta1` diff --git a/stable/cluster-autoscaler/templates/deployment.yaml b/stable/cluster-autoscaler/templates/deployment.yaml index d48b9e0ba1..388773a943 100644 --- a/stable/cluster-autoscaler/templates/deployment.yaml +++ b/stable/cluster-autoscaler/templates/deployment.yaml @@ -148,6 +148,11 @@ spec: - name: {{ $key }} value: "{{ $value }}" {{- end }} + {{- if .Values.envFromSecret }} + envFrom: + - secretRef: + name: {{ .Values.envFromSecret }} + {{- end }} livenessProbe: httpGet: path: /health-check