Skip to content

Commit

Permalink
fix(chart): do not change immutable gateway deployment selector labels (
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski authored Oct 3, 2023
1 parent a1d0d72 commit 5d5e4ff
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 13 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
.. _changelog:

0.39.1
------

Renku ``0.39.1`` fixes bugs in the Helm chart introduced by ``0.39.0``.


Internal Changes
~~~~~~~~~~~~~~~~

This introduces changes in the templates and values file of the Helm chart from 0.39.0 that were causing the Helm upgrade
operation to fail.

0.39.0
------

Renku ``0.39.0`` moves all renku component Helm charts to one single chart that now resides in this repository.

After initial testing we have noticed a bug in this version of the Helm chart. If you have already deployed this version simply
upgrading to ``0.39.1`` will fix things. If you have not yet deployed this version then skip it and go straight to ``0.39.1``.
The reason for the bug is that we replaced the ``spec.selector.matchLabels`` field of two important deployments in the Gateway
because of this the two components do not upgrade and the whole Helm upgrade operation fails.

Also, with the next releases we will adopt a specific way of versioning the helm chart. Namely:

- Patch changes (i.e. ``0.50.1`` -> ``0.50.2``) indicate that there are NO changes in the Helm chart and that
Expand Down
7 changes: 7 additions & 0 deletions helm-chart/renku/templates/gateway/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@ Template core service names as a comma separated list
{{- end -}}
{{- join "," $serviceNames | quote -}}
{{- end -}}

{{/*
Expand the name of the chart.
*/}}
{{- define "gateway.name" -}}
gateway
{{- end -}}
6 changes: 3 additions & 3 deletions helm-chart/renku/templates/gateway/deployment-revproxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: {{ template "renku.fullname" . }}-gateway-revproxy
labels:
app: {{ template "renku.name" . }}-gateway-revproxy
app: {{ template "gateway.name" . }}-revproxy
chart: {{ template "renku.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
Expand All @@ -15,12 +15,12 @@ spec:
{{- toYaml .Values.gateway.reverseProxy.updateStrategy | nindent 4 }}
selector:
matchLabels:
app: {{ template "renku.name" . }}-gateway-revproxy
app: {{ template "gateway.name" . }}-revproxy
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "renku.name" . }}-gateway-revproxy
app: {{ template "gateway.name" . }}-revproxy
release: {{ .Release.Name }}
{{- with .Values.gateway.reverseProxy.podAnnotations }}
annotations:
Expand Down
6 changes: 3 additions & 3 deletions helm-chart/renku/templates/gateway/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ kind: Deployment
metadata:
name: {{ template "renku.fullname" . }}-gateway-auth
labels:
app: {{ template "renku.name" . }}-gateway-auth
app: {{ template "gateway.name" . }}-auth
chart: {{ template "renku.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "renku.name" . }}-gateway-auth
app: {{ template "gateway.name" . }}-auth
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "renku.name" . }}-gateway-auth
app: {{ template "gateway.name" . }}-auth
release: {{ .Release.Name }}
# The label below enables the gateway to connect to redis
{{ .Values.global.redis.clientLabel | toYaml | nindent 8 }}
Expand Down
4 changes: 2 additions & 2 deletions helm-chart/renku/templates/gateway/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
protocol: TCP
name: http
selector:
app: {{ template "renku.name" . }}-gateway-auth
app: {{ template "gateway.name" . }}-auth
release: {{ .Release.Name }}
---
apiVersion: v1
Expand All @@ -36,5 +36,5 @@ spec:
protocol: TCP
name: http
selector:
app: {{ template "renku.name" . }}-gateway-revproxy
app: {{ template "gateway.name" . }}-revproxy
release: {{ .Release.Name }}
10 changes: 5 additions & 5 deletions helm-chart/renku/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ keycloakx:
## keycloak admin username/password is supplied.
initRealm:
image:
repository: registry.dev.renku.ch/tasko.olevski/renku-images/init-realm
tag: "0.36.4-8.21cbfb5"
repository: renku/init-realm
tag: "latest"

## Skip Keycloak testing when running Helm test
test:
Expand Down Expand Up @@ -1214,7 +1214,7 @@ notebooks:
ssh:
enabled: false
image:
repository: renku/renku-notebooks-ssh
repository: renku/ssh-jump-host
tag: "1.19.0"
pullPolicy: IfNotPresent
resources: {}
Expand Down Expand Up @@ -1605,8 +1605,8 @@ swagger:
## The image used in startup scripts to initialize different postgress databases
initDb:
image:
repository: registry.dev.renku.ch/tasko.olevski/renku-images/init-db
tag: "0.36.4-8.21cbfb5"
repository: renku/init-db
tag: "latest"

crc:
image:
Expand Down

0 comments on commit 5d5e4ff

Please sign in to comment.