Skip to content

Commit 02717dc

Browse files
daniil-nedostupMykolaMarusenko
authored andcommitted
chore: Add ImagePullSecrets field support (#77)
1 parent b4c98f6 commit 02717dc

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

deploy-templates/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ A Helm chart for KubeRocketCI Gerrit Operator
6262
| image.repository | string | `"epamedp/gerrit-operator"` | KubeRocketCI gerrit-operator Docker image name. The released image can be found on [Dockerhub](https://hub.docker.com/r/epamedp/gerrit-operator) |
6363
| image.tag | string | `nil` | KubeRocketCI gerrit-operator Docker image tag. The released image can be found on [Dockerhub](https://hub.docker.com/r/epamedp/gerrit-operator/tags) |
6464
| imagePullPolicy | string | `"IfNotPresent"` | |
65+
| imagePullSecrets | list | `[]` | Optional array of imagePullSecrets containing private registry credentials # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry |
6566
| name | string | `"gerrit-operator"` | component name |
6667
| nodeSelector | object | `{}` | |
6768
| projectSyncInterval | string | `"1h"` | Format: golang time.Duration-formatted string |

deploy-templates/templates/gerrit_deployment/gerrit_deployment_kubernetes.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ spec:
2121
labels:
2222
app: {{ .Values.gerrit.name }}
2323
spec:
24+
{{- if .Values.gerrit.imagePullSecrets }}
25+
imagePullSecrets: {{ toYaml .Values.gerrit.imagePullSecrets | nindent 8 }}
26+
{{- end }}
2427
volumes:
2528
- name: {{ .Values.gerrit.name }}-data
2629
persistentVolumeClaim:

deploy-templates/templates/operator_deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ spec:
2121
serviceAccountName: "edp-{{ .Values.name }}"
2222
securityContext:
2323
runAsNonRoot: true
24+
{{- if .Values.imagePullSecrets }}
25+
imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 8 }}
26+
{{- end }}
2427
containers:
2528
- name: {{ .Values.name }}
2629
# Replace this with the built image name

deploy-templates/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ image:
2929
# -- KubeRocketCI gerrit-operator Docker image tag. The released image can be found on [Dockerhub](https://hub.docker.com/r/epamedp/gerrit-operator/tags)
3030
tag:
3131
imagePullPolicy: "IfNotPresent"
32+
# -- Optional array of imagePullSecrets containing private registry credentials
33+
## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry
34+
imagePullSecrets: []
35+
# - name: regcred
3236

3337
# -- Define interval for synchronizing Gerrit Projects with GerritProject CustomResources
3438
# -- Default: 5 minutes

0 commit comments

Comments
 (0)