Skip to content

Commit

Permalink
Merge pull request #9324 from cbosdo/helm-fixes
Browse files Browse the repository at this point in the history
Helm charts fixes
  • Loading branch information
deneb-alpha authored Oct 8, 2024
2 parents ca14be0 + 7077879 commit db30fbe
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 5 deletions.
1 change: 1 addition & 0 deletions containers/proxy-helm/proxy-helm.changes.cbosdo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Remove the build tag with the release number
3 changes: 3 additions & 0 deletions containers/proxy-helm/proxy-helm.changes.cbosdo.helm-fixes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Add registrySecret value to the helm chart for authentication
(bsc#1231157)
- Fix labels indentation (bsc#1231150)
8 changes: 6 additions & 2 deletions containers/proxy-helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ kind: Deployment
metadata:
name: uyuni-proxy
namespace: "{{ .Release.Namespace }}"
labels:
app: uyuni-proxy
labels:
app: uyuni-proxy
spec:
replicas: 1
selector:
Expand All @@ -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
1 change: 1 addition & 0 deletions containers/server-helm/server-helm.changes.cbosdo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Remove the build tag with the release number
3 changes: 3 additions & 0 deletions containers/server-helm/server-helm.changes.cbosdo.helm-fixes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Add registrySecret value to the helm chart for authentication
(bsc#1231157)
- Fix labels indentation (bsc#1231150)
8 changes: 6 additions & 2 deletions containers/server-helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ kind: Deployment
metadata:
name: uyuni
namespace: "{{ .Release.Namespace }}"
labels:
app: uyuni
labels:
app: uyuni
spec:
replicas: 1
selector:
Expand All @@ -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
2 changes: 1 addition & 1 deletion rel-eng/chart_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if [ -f "${SRPM_PKG_DIR}/Chart.yaml" ]; then
# Remove leading zero from Uyuni release and add potentially missing micro part
SEMANTIC_VERSION=$(echo ${PRODUCT_VERSION} | sed 's/\([0-9]\+\)\.0\?\([1-9][0-9]*\)\(\.\([0-9]\+\)\)\?\( .\+\)\?/\1.\2.\4\5/' | sed 's/\.$/.0/')
# Also include the semantic version since helm chart wants it for OCI repos (those generated by OBS)
sed "/^#\!BuildTag:/ s/$/ ${NAME}:${SEMANTIC_VERSION} ${NAME}:${PRODUCT_VERSION} ${NAME}:${PRODUCT_VERSION}.%RELEASE%/" -i ${SRPM_PKG_DIR}/Chart.yaml
sed "/^#\!BuildTag:/ s/$/ ${NAME}:${SEMANTIC_VERSION} ${NAME}:${PRODUCT_VERSION}" -i ${SRPM_PKG_DIR}/Chart.yaml

rm ${SRPM_PKG_DIR}/${PKG_NAME}.spec
fi
Expand Down

0 comments on commit db30fbe

Please sign in to comment.