From 2af1ea5c1ad874389d8de57c188be0d06b91c6ef Mon Sep 17 00:00:00 2001 From: SeongChan Lee Date: Thu, 26 Nov 2020 15:36:42 +0900 Subject: [PATCH 1/3] Fix priority expander permissions They should've been fixed in https://github.com/kubernetes/autoscaler/pull/1801, https://github.com/kubernetes/autoscaler/pull/1920 --- charts/cluster-autoscaler/templates/role.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/charts/cluster-autoscaler/templates/role.yaml b/charts/cluster-autoscaler/templates/role.yaml index e6af27d58018..97eb32c2a04b 100644 --- a/charts/cluster-autoscaler/templates/role.yaml +++ b/charts/cluster-autoscaler/templates/role.yaml @@ -12,14 +12,24 @@ rules: - configmaps verbs: - create +{{- if eq (default "" .Values.extraArgs.expander) "priority" }} + - list + - watch +{{- end }} - apiGroups: - "" resources: - configmaps resourceNames: - cluster-autoscaler-status +{{- if eq (default "" .Values.extraArgs.expander) "priority" }} + - cluster-autoscaler-priority-expander +{{- end }} verbs: - delete - get - update +{{- if eq (default "" .Values.extraArgs.expander) "priority" }} + - watch +{{- end }} {{- end -}} From bfa8e2fb4e7d6398587a77dca59a324bfb65bdf0 Mon Sep 17 00:00:00 2001 From: SeongChan Lee Date: Thu, 3 Dec 2020 19:05:48 +0900 Subject: [PATCH 2/3] Add extraVolumes and extraVolumeMounts --- charts/cluster-autoscaler/README.md | 2 ++ charts/cluster-autoscaler/templates/deployment.yaml | 10 ++++++++-- charts/cluster-autoscaler/values.yaml | 12 ++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/charts/cluster-autoscaler/README.md b/charts/cluster-autoscaler/README.md index 7d29b2d00f92..3060fef4086a 100644 --- a/charts/cluster-autoscaler/README.md +++ b/charts/cluster-autoscaler/README.md @@ -355,7 +355,9 @@ Though enough for the majority of installations, the default PodSecurityPolicy _ | extraEnv | object | `{}` | Additional container environment variables. | | extraEnvConfigMaps | object | `{}` | Additional container environment variables from ConfigMaps. | | extraEnvSecrets | object | `{}` | Additional container environment variables from Secrets. | +| extraVolumeMounts | list | `[]` | Additional volumes to mount. | | extraVolumeSecrets | object | `{}` | Additional volumes to mount from Secrets. | +| extraVolumes | list | `[]` | Additional volumes. | | fullnameOverride | string | `""` | String to fully override `cluster-autoscaler.fullname` template. | | image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | image.pullSecrets | list | `[]` | Image pull secrets | diff --git a/charts/cluster-autoscaler/templates/deployment.yaml b/charts/cluster-autoscaler/templates/deployment.yaml index b7814da259b2..b7ba49336a3e 100644 --- a/charts/cluster-autoscaler/templates/deployment.yaml +++ b/charts/cluster-autoscaler/templates/deployment.yaml @@ -182,7 +182,7 @@ spec: securityContext: {{ toYaml .Values.containerSecurityContext | nindent 12 | trim }} {{- end }} - {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") .Values.extraVolumeSecrets }} + {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") .Values.extraVolumeSecrets .Values.extraVolumeMounts }} volumeMounts: {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") }} - name: cloudconfig @@ -199,6 +199,9 @@ spec: mountPath: {{ required "Must specify mountPath!" $value.mountPath }} readOnly: true {{- end }} + {{- if .Values.extraVolumeMounts }} + {{ toYaml .Values.extraVolumeMounts | nindent 12 }} + {{- end }} {{- end }} {{- if .Values.affinity }} affinity: @@ -215,7 +218,7 @@ spec: securityContext: {{ toYaml .Values.securityContext | nindent 8 | trim }} {{- end }} - {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") .Values.extraVolumeSecrets }} + {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") .Values.extraVolumeSecrets .Values.extraVolumes }} volumes: {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") }} - name: cloudconfig @@ -236,6 +239,9 @@ spec: {{- toYaml $value.items | nindent 14 }} {{- end }} {{- end }} + {{- if .Values.extraVolumes }} + {{- toYaml .Values.extraVolumes | nindent 10 }} + {{- end }} {{- end }} {{- if .Values.image.pullSecrets }} imagePullSecrets: diff --git a/charts/cluster-autoscaler/values.yaml b/charts/cluster-autoscaler/values.yaml index 9185bb72f2af..4b971cc12a7d 100644 --- a/charts/cluster-autoscaler/values.yaml +++ b/charts/cluster-autoscaler/values.yaml @@ -175,6 +175,18 @@ extraVolumeSecrets: {} # - key: subkey # path: mypath +# extraVolumes -- Additional volumes. +extraVolumes: [] + # - name: ssl-certs + # hostPath: + # path: /etc/ssl/certs/ca-bundle.crt + +# extraVolumeMounts -- Additional volumes to mount. +extraVolumeMounts: [] + # - name: ssl-certs + # mountPath: /etc/ssl/certs/ca-certificates.crt + # readonly: true + # fullnameOverride -- String to fully override `cluster-autoscaler.fullname` template. fullnameOverride: "" From fa29647c517174e5e33bd742fbba137c918cc4ca Mon Sep 17 00:00:00 2001 From: SeongChan Lee Date: Wed, 30 Dec 2020 16:47:15 +0900 Subject: [PATCH 3/3] Bump CA-Chart version to 9.4.0 --- charts/cluster-autoscaler/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cluster-autoscaler/Chart.yaml b/charts/cluster-autoscaler/Chart.yaml index 5542f1f6b757..83dc5a8a8342 100644 --- a/charts/cluster-autoscaler/Chart.yaml +++ b/charts/cluster-autoscaler/Chart.yaml @@ -17,4 +17,4 @@ name: cluster-autoscaler sources: - https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler type: application -version: 9.3.2 +version: 9.4.0