Skip to content
This repository was archived by the owner on Nov 25, 2024. It is now read-only.

Commit 67f5c5b

Browse files
authored
fix(helm): extract image tag to value (and use as default from Chart.… (#2934)
improve image tag handling on the default helm way. with usage of appVersion from: https://github.com/matrix-org/dendrite/blob/0995dc48224b90432e38fa92345cf5735bca6090/helm/dendrite/Chart.yaml#L4 maybe you like to review @S7evinK ? ### Pull Request Checklist <!-- Please read https://matrix-org.github.io/dendrite/development/contributing before submitting your pull request --> * [x] I have added Go unit tests or [Complement integration tests](https://github.com/matrix-org/complement) for this PR _or_ I have justified why this PR doesn't need tests * [x] Pull request includes a [sign off below using a legally identifiable name](https://matrix-org.github.io/dendrite/development/contributing#sign-off) _or_ I have already signed off privately Signed-off-by: `Geno <geno+dev@fireorbit.de>`
1 parent b55a7c2 commit 67f5c5b

6 files changed

Lines changed: 14 additions & 9 deletions

File tree

helm/dendrite/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: dendrite
3-
version: "0.10.8"
4-
appVersion: "0.10.8"
3+
version: "0.10.9"
4+
appVersion: "0.10.9"
55
description: Dendrite Matrix Homeserver
66
type: application
77
keywords:

helm/dendrite/templates/_helpers.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515

1616

1717
{{- define "image.name" -}}
18-
image: {{ .name }}
18+
{{- with .Values.image -}}
19+
image: {{ .repository }}:{{ .tag | default (printf "v%s" $.Chart.AppVersion) }}
1920
imagePullPolicy: {{ .pullPolicy }}
2021
{{- end -}}
22+
{{- end -}}
2123

2224
{{/*
2325
Expand the name of the chart.

helm/dendrite/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ spec:
4545
persistentVolumeClaim:
4646
claimName: {{ default (print ( include "dendrite.fullname" . ) "-search-pvc") $.Values.persistence.search.existingClaim | quote }}
4747
containers:
48-
- name: {{ $.Chart.Name }}
49-
{{- include "image.name" $.Values.image | nindent 8 }}
48+
- name: {{ .Chart.Name }}
49+
{{- include "image.name" . | nindent 8 }}
5050
args:
5151
- '--config'
5252
- '/etc/dendrite/dendrite.yaml'

helm/dendrite/templates/jobs.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ metadata:
88
name: {{ $name }}
99
labels:
1010
app.kubernetes.io/component: signingkey-job
11+
{{- include "dendrite.labels" . | nindent 4 }}
1112
---
1213
apiVersion: rbac.authorization.k8s.io/v1
1314
kind: Role
@@ -80,7 +81,7 @@ spec:
8081
name: signing-key
8182
readOnly: true
8283
- name: generate-key
83-
{{- include "image.name" $.Values.image | nindent 8 }}
84+
{{- include "image.name" . | nindent 8 }}
8485
command:
8586
- sh
8687
- -c

helm/dendrite/templates/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ spec:
1313
ports:
1414
- name: http
1515
protocol: TCP
16-
port: 8008
16+
port: {{ .Values.service.port }}
1717
targetPort: 8008

helm/dendrite/values.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
image:
22
# -- Docker repository/image to use
3-
name: "ghcr.io/matrix-org/dendrite-monolith:v0.10.8"
3+
repository: "ghcr.io/matrix-org/dendrite-monolith"
44
# -- Kubernetes pullPolicy
55
pullPolicy: IfNotPresent
6+
# Overrides the image tag whose default is the chart appVersion.
7+
tag: ""
68

79

810
# signing key to use
@@ -345,4 +347,4 @@ ingress:
345347

346348
service:
347349
type: ClusterIP
348-
port: 80
350+
port: 8008

0 commit comments

Comments
 (0)