Add Support for imagePullSecrets (#140)
Fixes #125 ### Motivation The default images in the values.yaml are in docker hub. This PR allows us to provide image pull secrets for the containers which will allow us to get around Docker Hub's rate limiting if the nodes are not logged into Docker Hub. ### Modifications Added a new template to generate `imagePullSecrets`, and included them in the deployments and statefulsets. This will only add them if they are specified under `images.imagePullSecrets` ### Verifying this change - [] Make sure that the change passes the CI checks.
This commit is contained in:
parent
c3e4ea272b
commit
19d6ce6488
@ -84,3 +84,15 @@ Create the match labels.
|
|||||||
app: {{ template "pulsar.name" . }}
|
app: {{ template "pulsar.name" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create ImagePullSecrets
|
||||||
|
*/}}
|
||||||
|
{{- define "pulsar.imagePullSecrets" -}}
|
||||||
|
{{- if .Values.images.imagePullSecrets -}}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- range .Values.images.imagePullSecrets }}
|
||||||
|
- name: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
|||||||
@ -150,5 +150,6 @@ spec:
|
|||||||
{{- include "pulsar.autorecovery.certs.volumeMounts" . | nindent 8 }}
|
{{- include "pulsar.autorecovery.certs.volumeMounts" . | nindent 8 }}
|
||||||
volumes:
|
volumes:
|
||||||
{{- include "pulsar.autorecovery.certs.volumes" . | nindent 6 }}
|
{{- include "pulsar.autorecovery.certs.volumes" . | nindent 6 }}
|
||||||
|
{{- include "pulsar.imagePullSecrets" . | nindent 6}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
|||||||
@ -196,6 +196,7 @@ spec:
|
|||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- include "pulsar.bookkeeper.certs.volumes" . | nindent 6 }}
|
{{- include "pulsar.bookkeeper.certs.volumes" . | nindent 6 }}
|
||||||
|
{{- include "pulsar.imagePullSecrets" . | nindent 6}}
|
||||||
{{- if and (and .Values.persistence .Values.volumes.persistence) .Values.bookkeeper.volumes.persistence}}
|
{{- if and (and .Values.persistence .Values.volumes.persistence) .Values.bookkeeper.volumes.persistence}}
|
||||||
volumeClaimTemplates:
|
volumeClaimTemplates:
|
||||||
{{- if .Values.bookkeeper.volumes.useSingleCommonVolume }}
|
{{- if .Values.bookkeeper.volumes.useSingleCommonVolume }}
|
||||||
|
|||||||
@ -268,4 +268,5 @@ spec:
|
|||||||
{{- end}}
|
{{- end}}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{- include "pulsar.broker.certs.volumes" . | nindent 6 }}
|
{{- include "pulsar.broker.certs.volumes" . | nindent 6 }}
|
||||||
|
{{- include "pulsar.imagePullSecrets" . | nindent 6}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@ -87,4 +87,5 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.grafana.component }}-secret"
|
name: "{{ template "pulsar.fullname" . }}-{{ .Values.grafana.component }}-secret"
|
||||||
key: GRAFANA_ADMIN_PASSWORD
|
key: GRAFANA_ADMIN_PASSWORD
|
||||||
|
{{- include "pulsar.imagePullSecrets" . | nindent 6}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@ -93,4 +93,5 @@ spec:
|
|||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: "{{ template "pulsar.fullname" . }}-{{ .Values.prometheus.component }}-{{ .Values.prometheus.volumes.data.name }}"
|
claimName: "{{ template "pulsar.fullname" . }}-{{ .Values.prometheus.component }}-{{ .Values.prometheus.volumes.data.name }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- include "pulsar.imagePullSecrets" . | nindent 6}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@ -222,6 +222,7 @@ spec:
|
|||||||
readOnly: true
|
readOnly: true
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
{{- include "pulsar.imagePullSecrets" . | nindent 6}}
|
||||||
{{- if or .Values.auth.authentication.enabled (and .Values.tls.enabled .Values.tls.proxy.enabled) }}
|
{{- if or .Values.auth.authentication.enabled (and .Values.tls.enabled .Values.tls.proxy.enabled) }}
|
||||||
volumes:
|
volumes:
|
||||||
{{- if .Values.auth.authentication.enabled }}
|
{{- if .Values.auth.authentication.enabled }}
|
||||||
|
|||||||
@ -89,6 +89,7 @@ spec:
|
|||||||
{{- else }}
|
{{- else }}
|
||||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}-secret"
|
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}-secret"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- include "pulsar.imagePullSecrets" . | nindent 6}}
|
||||||
volumes:
|
volumes:
|
||||||
- name: pulsar-manager-data
|
- name: pulsar-manager-data
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
|||||||
@ -115,4 +115,5 @@ spec:
|
|||||||
path: ca.crt
|
path: ca.crt
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{- include "pulsar.toolset.certs.volumes" . | nindent 6 }}
|
{{- include "pulsar.toolset.certs.volumes" . | nindent 6 }}
|
||||||
|
{{- include "pulsar.imagePullSecrets" . | nindent 6}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user