Skip to content

Commit

Permalink
Merge pull request #143 from gimlet-io/fix/unified-image-pull-secrets…
Browse files Browse the repository at this point in the history
…-syntax

fix: unified image pull secrets syntax -- add unit tests for service protocol
  • Loading branch information
youcefguichi authored Sep 26, 2024
2 parents 937a3ff + 8e9fec7 commit fed2411
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
4 changes: 3 additions & 1 deletion charts/cron-job/templates/cronJob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ spec:
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 12 }}
{{- range . }}
- name: {{ . }}
{{- end }}
{{- end }}
restartPolicy: Never
containers:
Expand Down
2 changes: 1 addition & 1 deletion charts/cron-job/tests/cronjob_image_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tests:
- it: Should set an ImagePullSecret
set:
imagePullSecrets:
- name: regcred
- regcred
asserts:
- template: cronJob.yaml
documentIndex: 0
Expand Down
29 changes: 29 additions & 0 deletions charts/onechart/tests/service_ports_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,32 @@ tests:
targetPort: http
protocol: TCP
name: http
- it: Should set default protocol to TCP
set:
ports:
- containerPort: 8080
svcPort: 80
name: default
asserts:
- equal:
path: spec.ports
value:
- name: default
protocol: TCP
port: 80
targetPort: default
- it: Should set protocol
set:
ports:
- containerPort: 2021
svcPort: 21
name: ftp
protocol: ftp
asserts:
- equal:
path: spec.ports
value:
- name: ftp
protocol: ftp
port: 21
targetPort: ftp

0 comments on commit fed2411

Please sign in to comment.