Skip to content

Commit

Permalink
feat: add optional image pull secret configuration in templates and t…
Browse files Browse the repository at this point in the history
…ests

On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
  • Loading branch information
akafazov committed Nov 25, 2024
1 parent a0166b7 commit 156528e
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 5 deletions.
Binary file modified charts/account-operator/charts/account-operator-crds-0.1.5.tgz
Binary file not shown.
Binary file modified charts/account-operator/charts/common-0.1.5.tgz
Binary file not shown.
2 changes: 2 additions & 0 deletions charts/common/templates/_imagePullSecret.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{- define "common.imagePullSecret" }}
{{- if .Values.imagePullSecret }}
imagePullSecrets:
- name: {{ default .Values.imagePullSecret (.Values.global).imagePullSecret }}
{{- end }}
{{- end -}}
Binary file modified charts/extension-manager-operator/charts/common-0.1.5.tgz
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ operator match the snapshot:
terminationGracePeriodSeconds: 10
4: |
apiVersion: v1
imagePullSecrets:
- name: github
kind: ServiceAccount
metadata:
name: extension-manager-operator
11 changes: 10 additions & 1 deletion charts/extension-manager-operator/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,13 @@ tests:
asserts:
- equal:
path: spec.template.spec.containers[0].imagePullPolicy
value: IfNotPresent
value: IfNotPresent
- it: configure imagePullSecret
template: service-account.yaml
set:
imagePullSecret: my-secret
asserts:
- equal:
path: imagePullSecrets
value:
- name: my-secret
4 changes: 2 additions & 2 deletions charts/extension-manager-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ image:
tag: 0.16.0

# The secret used to pull the image
## @param imagePullSecret The secret used to pull the image
imagePullSecret: "github"
## @param imagePullSecret The secret used to pull the image (optional)
# imagePullSecret: "github"
## @param imagePullPolicy The image pull policy
imagePullPolicy: Always

Expand Down
Binary file modified charts/portal/charts/common-0.1.5.tgz
Binary file not shown.

0 comments on commit 156528e

Please sign in to comment.