You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Add the image pull secret that you created to any manifests that reference the image.
49
+
1. Add a Helm helper for the image pull secret to your `_helper.tpl`. This code will use your secret but allow your customer to override it for situations, like an airgapped installation, where they have moved the image to another regitsry:
50
+
51
+
```yam1
52
+
{{/*
53
+
Image pull secrets
54
+
*/}}
55
+
{{- define "replicated.imagePullSecrets" -}}
56
+
{{- $pullSecrets := list }}
57
+
58
+
{{- with ((.Values.global).imagePullSecrets) -}}
59
+
{{- range . -}}
60
+
{{- if kindIs "map" . -}}
61
+
{{- $pullSecrets = append $pullSecrets .name -}}
62
+
{{- else -}}
63
+
{{- $pullSecrets = append $pullSecrets . -}}
64
+
{{- end }}
65
+
{{- end -}}
66
+
{{- end -}}
67
+
68
+
{{/* use image pull secrets provided as values */}}
69
+
{{- with .Values.images -}}
70
+
{{- range .pullSecrets -}}
71
+
{{- if kindIs "map" . -}}
72
+
{{- $pullSecrets = append $pullSecrets .name -}}
73
+
{{- else -}}
74
+
{{- $pullSecrets = append $pullSecrets . -}}
75
+
{{- end -}}
76
+
{{- end -}}
77
+
{{- end -}}
78
+
79
+
{{/* use secret created with injected docker config */}}
80
+
{{- if hasKey ((.Values.global).replicated) "dockerconfigjson" }}
{{ if .Values.global.replicated.dockerconfigjson }}
64
-
imagePullSecrets:
65
-
- name: replicated-pull-secret
66
-
{{ end }}
106
+
# Add the pull secret with your helper
107
+
{{- include "replicated.imagePullSecrets" . | nindent 6 }}
67
108
```
68
109
69
110
1. Package your Helm chart and add it to a release. Promote the release to a development channel. See [Managing Releases with Vendor Portal](releases-creating-releases).
0 commit comments