diff --git a/charts/prometheus-artifactory-exporter/Chart.yaml b/charts/prometheus-artifactory-exporter/Chart.yaml index 7532324..25137a4 100644 --- a/charts/prometheus-artifactory-exporter/Chart.yaml +++ b/charts/prometheus-artifactory-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.14.0" description: A Helm chart for the Prometheus Artifactory Exporter name: prometheus-artifactory-exporter -version: 0.6.2 +version: 0.7.0 keywords: - metrics - artifactory diff --git a/charts/prometheus-artifactory-exporter/templates/_helpers.tpl b/charts/prometheus-artifactory-exporter/templates/_helpers.tpl index 2c1d69c..e620fe3 100644 --- a/charts/prometheus-artifactory-exporter/templates/_helpers.tpl +++ b/charts/prometheus-artifactory-exporter/templates/_helpers.tpl @@ -63,3 +63,20 @@ Secret name for Artifactory credentials {{ template "prometheus-artifactory-exporter.fullname" . }} {{- end -}} {{- end -}} + +{{/* +Resolve imagePullSecrets value +*/}} +{{- define "prometheus-artifactory-exporter.imagePullSecrets" -}} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{- range .Values.global.imagePullSecrets }} + - name: {{ . }} +{{- end }} +{{- else if .Values.imagePullSecrets }} +imagePullSecrets: +{{- range .Values.imagePullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/charts/prometheus-artifactory-exporter/templates/deployment.yaml b/charts/prometheus-artifactory-exporter/templates/deployment.yaml index a7075e1..4e03eac 100644 --- a/charts/prometheus-artifactory-exporter/templates/deployment.yaml +++ b/charts/prometheus-artifactory-exporter/templates/deployment.yaml @@ -23,6 +23,9 @@ spec: {{ toYaml .Values.podAnnotations | nindent 8 }} {{- end }} spec: + {{- if or .Values.imagePullSecrets .Values.global.imagePullSecrets }} +{{- include "prometheus-artifactory-exporter.imagePullSecrets" . | indent 6 }} + {{- end }} serviceAccountName: {{ template "prometheus-artifactory-exporter.serviceAccountName" . }} {{- with .Values.initContainers }} initContainers: {{ toYaml . | nindent 8 }} diff --git a/charts/prometheus-artifactory-exporter/values.yaml b/charts/prometheus-artifactory-exporter/values.yaml index f57682e..1de6ffd 100644 --- a/charts/prometheus-artifactory-exporter/values.yaml +++ b/charts/prometheus-artifactory-exporter/values.yaml @@ -1,3 +1,7 @@ +global: {} + # imagePullSecrets: + # - myRegistryKeySecretName + # Default values for artifactory-exporter. # This is a YAML-formatted file. # Declare variables to be passed into your templates. @@ -22,6 +26,9 @@ image: tag: v1.14.0 pullPolicy: IfNotPresent +# imagePullSecrets: +# - myRegistryKeySecretName + nameOverride: "" fullnameOverride: ""