From ea7b6f8762ee4e3fbe7a10bab0f30b7372d0e064 Mon Sep 17 00:00:00 2001 From: Reuben Mannell Date: Thu, 10 Sep 2020 18:51:44 +1000 Subject: [PATCH] Helm Chart: Add options for extraVolumes and extraVolumeMounts (#5525) * [helm-chart] Add ability to specify extraVolumes and extraVolumeMounts * [helm-chart] Update README with new config options for extraVolumes and extraVolumeMounts * [helm-chart] Bump chart version to 2.5.1 * [helm-chart] Bump chart version to 2.6.0 since this add a new feature --- .../helm-chart/kubernetes-dashboard/Chart.yaml | 2 +- .../helm-chart/kubernetes-dashboard/README.md | 2 ++ .../templates/deployment.yaml | 6 ++++++ .../helm-chart/kubernetes-dashboard/values.yaml | 15 +++++++++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/aio/deploy/helm-chart/kubernetes-dashboard/Chart.yaml b/aio/deploy/helm-chart/kubernetes-dashboard/Chart.yaml index b335326c5..ca40ac47c 100644 --- a/aio/deploy/helm-chart/kubernetes-dashboard/Chart.yaml +++ b/aio/deploy/helm-chart/kubernetes-dashboard/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 name: kubernetes-dashboard -version: 2.5.0 +version: 2.6.0 appVersion: 2.0.3 description: General-purpose web UI for Kubernetes clusters keywords: diff --git a/aio/deploy/helm-chart/kubernetes-dashboard/README.md b/aio/deploy/helm-chart/kubernetes-dashboard/README.md index 06c460d66..b623e82dc 100644 --- a/aio/deploy/helm-chart/kubernetes-dashboard/README.md +++ b/aio/deploy/helm-chart/kubernetes-dashboard/README.md @@ -79,6 +79,8 @@ Parameter | Description `labels` | Labels for deployment | `{}` `extraArgs` | Additional container arguments | `[]` `extraEnv` | Additional container environment variables | `[]` +`extraVolumes` | Additional volumes | `[]` +`extraVolumeMounts` | Additional container volumeMounts | `[]` `podAnnotations` | Annotations to be added to pods | `seccomp.security.alpha.kubernetes.io/pod: 'runtime/default'}` `podLabels` | Labels to be added to pods | `{}` `nodeSelector` | node labels for pod assignment | `{}` diff --git a/aio/deploy/helm-chart/kubernetes-dashboard/templates/deployment.yaml b/aio/deploy/helm-chart/kubernetes-dashboard/templates/deployment.yaml index ef4d9cec2..3d8be99e4 100644 --- a/aio/deploy/helm-chart/kubernetes-dashboard/templates/deployment.yaml +++ b/aio/deploy/helm-chart/kubernetes-dashboard/templates/deployment.yaml @@ -90,6 +90,9 @@ spec: # Create on-disk volume to store exec logs - mountPath: /tmp name: tmp-volume +{{- with .Values.extraVolumeMounts }} +{{ toYaml . | indent 8 }} +{{- end }} livenessProbe: httpGet: {{- if .Values.protocolHttp }} @@ -156,6 +159,9 @@ spec: secretName: {{ template "kubernetes-dashboard.fullname" . }}-certs - name: tmp-volume emptyDir: {} +{{- with .Values.extraVolumes }} +{{ toYaml . | indent 6 }} +{{- end }} {{- with .Values.tolerations }} tolerations: {{ toYaml . | indent 8 }} diff --git a/aio/deploy/helm-chart/kubernetes-dashboard/values.yaml b/aio/deploy/helm-chart/kubernetes-dashboard/values.yaml index dedde9d12..cecef524c 100644 --- a/aio/deploy/helm-chart/kubernetes-dashboard/values.yaml +++ b/aio/deploy/helm-chart/kubernetes-dashboard/values.yaml @@ -43,6 +43,21 @@ extraEnv: [] # - name: SOME_VAR # value: 'some value' +## Additional volumes to be added to kubernetes dashboard pods +## +extraVolumes: [] +# - name: dashboard-kubeconfig +# secret: +# defaultMode: 420 +# secretName: dashboard-kubeconfig + +## Additional volumeMounts to be added to kubernetes dashboard pods +## +extraVolumeMounts: [] +# - mountPath: /kubeconfig +# name: dashboard-kubeconfig +# readOnly: true + # Annotations to be added to kubernetes dashboard pods podAnnotations: seccomp.security.alpha.kubernetes.io/pod: 'runtime/default' -- GitLab