Skip to content

Commit

Permalink
feat: implement pull secrets in helm chart (#192)
Browse files Browse the repository at this point in the history
feat: implement pull secrets in helm chart

Co-authored-by: Marcial White <[email protected]>
  • Loading branch information
mars64 and Marcial White authored May 23, 2024
1 parent 0db4f06 commit 7978b78
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions charts/locust-k8s-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ spec:
{{- include "locust-k8s-operator.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: {{ include "locust-k8s-operator.serviceAccountName" . }}
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ metadata:
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "locust-k8s-operator.labels" . | nindent 4 }}
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.image.pullSecrets}}
- name: {{ . }}
{{- end }}
{{- end }}

---
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
2 changes: 2 additions & 0 deletions charts/locust-k8s-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ replicaCount: 1
image:
repository: lotest/locust-k8s-operator
pullPolicy: IfNotPresent
# List of names of secrets within the namespace to use imagePullSecrets. Applies to deployments and serviceAccounts
pullSecrets: []
# Overrides the image tag whose default is the chart appVersion.
tag: ""

Expand Down

0 comments on commit 7978b78

Please sign in to comment.