Skip to content

Commit

Permalink
update imagePullSecrets
Browse files Browse the repository at this point in the history
  • Loading branch information
ypoplavs committed Jan 15, 2025
1 parent 735640e commit 77e50cd
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 1,022 deletions.
2 changes: 1 addition & 1 deletion charts/global/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
version: 0.1.2
version: 0.1.3
name: global
description: A Library Helm Chart for definitions that can be shared by Helm templates in other charts.
home: https://github.com/kubeshop/helm-charts/tree/main/charts/global
Expand Down
8 changes: 6 additions & 2 deletions charts/global/templates/_images.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,17 @@ Return the proper Docker Image Registry Secret Names evaluating values as templa
{{- if $global.imagePullSecrets }}
imagePullSecrets:
{{- range $global.imagePullSecrets }}
- name: {{ . }}
{{- if typeIsLike "map[string]interface {}" . }}
- name: {{ .name | quote }}
{{- else }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
{{- else -}}
{{- if $path }}
imagePullSecrets:
{{- range $path }}
- name: {{ . }}
- name: {{ . }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/testkube-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ version: 2.1.85
appVersion: 2.1.85
dependencies:
- name: global
version: 0.1.2
version: 0.1.3
repository: "file://../global"
14 changes: 9 additions & 5 deletions charts/testkube-api/templates/_job-container-template.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,16 @@ spec:
{{`{{- if .ServiceAccountName }}`}}
serviceAccountName: {{`{{ .ServiceAccountName }}`}}
{{`{{- end }}`}}
{{ with .Values.global.imagePullSecrets }}
{{- with (default .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
imagePullSecrets:
{{- range . }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
{{- range . }}
{{- if typeIsLike "map[string]interface {}" . }}
- name: {{ .name | quote }}
{{- else }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
{{- end }}
backoffLimit: 0
ttlSecondsAfterFinished: {{`{{ .DelaySeconds }}`}}
{{- end }}
14 changes: 9 additions & 5 deletions charts/testkube-api/templates/_job-scraper-template.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,16 @@ spec:
{{`{{- if .ServiceAccountName }}`}}
serviceAccountName: {{`{{ .ServiceAccountName }}`}}
{{`{{- end }}`}}
{{ with .Values.global.imagePullSecrets }}
{{- with (default .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
imagePullSecrets:
{{- range . }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
{{- range . }}
{{- if typeIsLike "map[string]interface {}" . }}
- name: {{ .name | quote }}
{{- else }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
{{- end }}
backoffLimit: 0
ttlSecondsAfterFinished: {{`{{ .DelaySeconds }}`}}
{{- end }}
14 changes: 9 additions & 5 deletions charts/testkube-api/templates/_job-template.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,16 @@ spec:
{{`{{- if .ServiceAccountName }}`}}
serviceAccountName: {{`{{ .ServiceAccountName }}`}}
{{`{{- end }}`}}
{{ with .Values.global.imagePullSecrets }}
{{- with (default .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
imagePullSecrets:
{{- range . }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
{{- range . }}
{{- if typeIsLike "map[string]interface {}" . }}
- name: {{ .name | quote }}
{{- else }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
{{- end }}
backoffLimit: 0
ttlSecondsAfterFinished: 180
{{- end }}
14 changes: 9 additions & 5 deletions charts/testkube-api/templates/_slave-pod-template.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,14 @@ spec:
{{`{{- if .ServiceAccountName }}`}}
serviceAccountName: {{`{{ .ServiceAccountName }}`}}
{{`{{- end }}`}}
{{ with .Values.global.imagePullSecrets }}
{{- with (default .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
imagePullSecrets:
{{- range . }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
{{- range . }}
{{- if typeIsLike "map[string]interface {}" . }}
- name: {{ .name | quote }}
{{- else }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/testkube-logs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ version: 0.2.0
appVersion: "1.0.0"
dependencies:
- name: global
version: 0.1.2
version: 0.1.3
#repository: https://kubeshop.github.io/helm-charts
repository: "file://../global"
2 changes: 1 addition & 1 deletion charts/testkube-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ version: 2.1.80
appVersion: 2.1.80
dependencies:
- name: global
version: 0.1.2
version: 0.1.3
#repository: https://kubeshop.github.io/helm-charts
repository: "file://../global"
4 changes: 2 additions & 2 deletions charts/testkube/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
repository: https://charts.bitnami.com/bitnami
- name: nats
condition: testkube-api.nats.enabled
version: 1.2.6-2
version: 1.2.6-3
repository: "file://./charts/nats"
- name: testkube-api
version: 2.1.85
Expand All @@ -26,5 +26,5 @@ dependencies:
repository: "file://../testkube-logs"
condition: global.features.logsV2
- name: global
version: 0.1.2
version: 0.1.3
repository: "file://../global"
2 changes: 1 addition & 1 deletion charts/testkube/charts/nats/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords:
- nats
- messaging
- cncf
version: 1.2.6-2
version: 1.2.6-3
home: http://github.com/nats-io/k8s
maintainers:
- email: [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ spec:
{{- with (default .Values.global.image.pullSecretNames .Values.global.imagePullSecrets) }}
imagePullSecrets:
{{- range . }}
- name: {{ . | quote }}
{{- if typeIsLike "map[string]interface {}" . }}
- name: {{ .name | quote }}
{{- else }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
{{- end }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ spec:

# service discovery uses DNS; don't need service env vars
enableServiceLinks: false

{{- with (default .Values.global.image.pullSecretNames .Values.global.imagePullSecrets) }}
imagePullSecrets:
{{- range . }}
- name: {{ . | quote }}
{{- if typeIsLike "map[string]interface {}" . }}
- name: {{ .name | quote }}
{{- else }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
{{- end }}

Expand Down
Loading

0 comments on commit 77e50cd

Please sign in to comment.