From b4144f449c5fe870f90cc2b9b29eb3fc662bf188 Mon Sep 17 00:00:00 2001 From: Pere Alcoberro Date: Wed, 16 Sep 2020 12:15:49 +0200 Subject: [PATCH] Add imagePullSecrets (#25) * chore: Add imagePullSecrets * fix: linting * test * troubleshoot testing --- charts/cadvisor/Chart.yaml | 2 +- charts/cadvisor/README.md | 1 + charts/cadvisor/templates/daemonset.yaml | 6 ++++++ charts/cadvisor/values.yaml | 5 +++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/charts/cadvisor/Chart.yaml b/charts/cadvisor/Chart.yaml index 99b3d62..ca245df 100644 --- a/charts/cadvisor/Chart.yaml +++ b/charts/cadvisor/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: A chart for a Cadvisor deployment name: cadvisor -version: 1.1.3 +version: 1.1.4 appVersion: 0.36.0 home: https://github.com/google/cadvisor sources: diff --git a/charts/cadvisor/README.md b/charts/cadvisor/README.md index 65e6518..0d2e83c 100644 --- a/charts/cadvisor/README.md +++ b/charts/cadvisor/README.md @@ -46,6 +46,7 @@ The following table lists the configurable parameters of the Prometheus MSTeams | `image.repository` | container image repository | `k8s.gcr.io/cadvisor` | | `image.tag` | container image tag | `v0.36.0` | | `image.pullPolicy` | container image pull policy | `IfNotPresent` | +| `image.pullSecrets` | container image pull secrets | `[]` | | `nodeSelector` | node labels for pod assignment | `{}` | | `tolerations` | node tolerations for pod assignment | `[]` | | `affinity` | node affinity for pod assignment | `{}` | diff --git a/charts/cadvisor/templates/daemonset.yaml b/charts/cadvisor/templates/daemonset.yaml index 9609b03..9ca1a50 100644 --- a/charts/cadvisor/templates/daemonset.yaml +++ b/charts/cadvisor/templates/daemonset.yaml @@ -24,6 +24,12 @@ spec: {{ $key }}: {{ $value | quote }} {{- end }} spec: + {{ if .Values.image.pullSecrets }} + imagePullSecrets: + {{- range .Values.image.pullSecrets }} + - name: {{ . }} + {{- end }} + {{- end }} serviceAccountName: {{ template "cadvisor.serviceAccountName" . }} {{ if .Values.hostNetwork }} hostNetwork: true diff --git a/charts/cadvisor/values.yaml b/charts/cadvisor/values.yaml index 9b97ea8..3366082 100644 --- a/charts/cadvisor/values.yaml +++ b/charts/cadvisor/values.yaml @@ -3,6 +3,11 @@ image: tag: v0.36.0 pullPolicy: IfNotPresent + ## Reference to one or more secrets to be used when pulling images + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + pullSecrets: [] + container: port: 8080 additionalArgs: