Skip to content

Commit

Permalink
Add registry secret authentication value to helm charts
Browse files Browse the repository at this point in the history
If the images are stored in a registry requiring authentication the pod
needs to have imagePullSecrets defined.
  • Loading branch information
cbosdo committed Oct 7, 2024
1 parent 17aa848 commit 7077879
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions containers/proxy-helm/proxy-helm.changes.cbosdo.helm-fixes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
- Add registrySecret value to the helm chart for authentication
(bsc#1231157)
- Fix labels indentation (bsc#1231150)
4 changes: 4 additions & 0 deletions containers/proxy-helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ spec:
labels:
app: uyuni-proxy
spec:
{{- if .Values.registrySecret }}
imagePullSecrets:
- name: {{ .Values.registrySecret }}
{{- end }}
containers:
- name: httpd
image: {{- include "deployment.container.image" (dict "name" "proxy-httpd" "global" .) | indent 1}}
Expand Down
4 changes: 4 additions & 0 deletions containers/proxy-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ images:
##
pullPolicy: "Always"

## registrySecret defines the name of secret to use to pull the images from the
## registry with authentication. Leave empty for no authentication.
registrySecret: ""

## ingress defines the ingress that is used in the cluster.
## It can be either "nginx", "traefik" or any other value.
ingress: "traefik"
Expand Down
2 changes: 2 additions & 0 deletions containers/server-helm/server-helm.changes.cbosdo.helm-fixes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
- Add registrySecret value to the helm chart for authentication
(bsc#1231157)
- Fix labels indentation (bsc#1231150)
4 changes: 4 additions & 0 deletions containers/server-helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ spec:
labels:
app: uyuni
spec:
{{- if .Values.registrySecret }}
imagePullSecrets:
- name: {{ .Values.registrySecret }}
{{- end }}
initContainers:
{{- if not .Values.migration }}
- name: init-etc-tls
Expand Down
4 changes: 4 additions & 0 deletions containers/server-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ images:
##
pullPolicy: "IfNotPresent"

## registrySecret defines the name of secret to use to pull the images from the
## registry with authentication. Leave empty for no authentication.
registrySecret: ""

## uyuni server overall Persistent Volume access modes
## Must match those of existing PV or dynamic provisioner
## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
Expand Down

0 comments on commit 7077879

Please sign in to comment.