Skip to content

Commit

Permalink
refactor: remove the global image tag value and use it from the comp…
Browse files Browse the repository at this point in the history
…onents - 8.2, 8.3, and 8.4 (#2080)

BEGIN_COMMIT_OVERRIDE
chore: remove the global image tag value and use it from the components - 8.2, 8.3, and 8.4
END_COMMIT_OVERRIDE

---------

Signed-off-by: Ahmed AbouZaid <[email protected]>
  • Loading branch information
aabouzaid committed Jun 28, 2024
1 parent 669f1dc commit 3c1a207
Show file tree
Hide file tree
Showing 86 changed files with 289 additions and 178 deletions.
23 changes: 22 additions & 1 deletion charts/camunda-platform-8.2/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,22 @@ app.kubernetes.io/version: {{ .Values.image.tag | quote }}
app.kubernetes.io/version: {{ .Values.global.image.tag | quote }}
{{- end }}
{{- else }}
app.kubernetes.io/version: {{ .Values.global.image.tag | quote }}
app.kubernetes.io/version: {{ .Chart.Version | quote }}
{{- end }}
{{- end -}}

{{- define "retentionPolicy.labels" -}}
{{- template "camundaPlatform.matchLabels" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/version: {{ .Chart.Version | quote }}
{{- end -}}

{{- define "prometheusServiceMonitor.labels" -}}
{{- include "camundaPlatform.matchLabels" . | nindent 4 }}
{{- printf "app.kubernetes.io/version: %s" (.Chart.Version | quote) | nindent 4 }}
{{- toYaml .Values.prometheusServiceMonitor.labels | nindent 4 }}
{{- end -}}

{{/*
Common match labels, which are extended by sub-charts and should be used in matchLabels selectors.
*/}}
Expand Down Expand Up @@ -70,6 +82,15 @@ Usage: {{ include "camundaPlatform.imageByParams" (dict "base" .Values.global "o
-}}
{{- end -}}

{{/*
Get image tag according the values of "base" or "overlay" values.
If the "overlay" values exist, they will override the "base" values, otherwise the "base" values will be used.
Usage: {{ include "camundaPlatform.imageTagByParams" (dict "base" .Values.global "overlay" .Values.console) }}
*/}}
{{- define "camundaPlatform.imageTagByParams" -}}
{{- .overlay.image.tag | default .base.image.tag -}}
{{- end -}}

{{/*
Set image according the values of "global" or "subchart" values.
Usage: {{ include "camundaPlatform.image" . }}
Expand Down
6 changes: 4 additions & 2 deletions charts/camunda-platform-8.2/templates/connectors/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ If release name contains chart name it will be used as a full name.
Defines extra labels for connectors.
*/}}
{{- define "connectors.extraLabels" -}}
app.kubernetes.io/version: {{ .Chart.Version | quote }}
app.kubernetes.io/component: connectors
{{- end -}}

Expand All @@ -35,15 +36,16 @@ Define common labels for connectors, combining the match labels and transient la
(version depending). These labels shouldn't be used on matchLabels selector, since the selectors are immutable.
*/}}
{{- define "connectors.labels" -}}
{{- template "camundaPlatform.labels" . }}
{{- template "camundaPlatform.matchLabels" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
{{ template "connectors.extraLabels" . }}
{{- end -}}
{{/*
Defines match labels for connectors, which are extended by sub-charts and should be used in matchLabels selectors.
*/}}
{{- define "connectors.matchLabels" -}}
{{- template "camundaPlatform.matchLabels" . }}
{{ template "connectors.extraLabels" . }}
app.kubernetes.io/component: connectors
{{- end -}}
{{/*
[connectors] Create the name of the service account to use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: ConfigMap
metadata:
name: camunda-platform-curator-config
labels:
{{- include "camundaPlatform.labels" . | nindent 4 }}
{{- include "retentionPolicy.labels" . | nindent 4 }}
data:
action_file.yml: |-
---
Expand Down
2 changes: 1 addition & 1 deletion charts/camunda-platform-8.2/templates/curator-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CronJob
metadata:
name: camunda-platform-curator
labels:
{{- include "camundaPlatform.labels" . | nindent 4 }}
{{- include "retentionPolicy.labels" . | nindent 4 }}
spec:
schedule: {{ .Values.retentionPolicy.schedule | quote }}
successfulJobsHistoryLimit: 1
Expand Down
4 changes: 2 additions & 2 deletions charts/camunda-platform-8.2/templates/service-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "camundaPlatform.fullname" . }}
labels: {{- include "camundaPlatform.labels" . | nindent 4 }}
{{- toYaml .Values.prometheusServiceMonitor.labels | nindent 4}}
labels:
{{- include "prometheusServiceMonitor.labels" . }}
spec:
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
app.kubernetes.io/instance: camunda-platform-test
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: camunda-platform
app.kubernetes.io/version: "8.2.29"
app.kubernetes.io/version: "8.2.28"
app.kubernetes.io/component: connectors
annotations:
{}
Expand All @@ -32,7 +32,7 @@ spec:
app.kubernetes.io/instance: camunda-platform-test
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: camunda-platform
app.kubernetes.io/version: "8.2.29"
app.kubernetes.io/version: "8.2.28"
app.kubernetes.io/component: connectors
spec:
imagePullSecrets:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
app.kubernetes.io/instance: camunda-platform-test
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: camunda-platform
app.kubernetes.io/version: "8.2.29"
app.kubernetes.io/version: "8.2.28"
app.kubernetes.io/component: connectors
annotations:
ingress.kubernetes.io/rewrite-target: /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
app.kubernetes.io/instance: camunda-platform-test
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: camunda-platform
app.kubernetes.io/version: "8.2.29"
app.kubernetes.io/version: "8.2.28"
app.kubernetes.io/component: connectors
annotations:
ingress.kubernetes.io/rewrite-target: /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
app.kubernetes.io/instance: camunda-platform-test
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: camunda-platform
app.kubernetes.io/version: "8.2.29"
app.kubernetes.io/version: "8.2.28"
app.kubernetes.io/component: connectors
annotations:
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ metadata:
app.kubernetes.io/instance: camunda-platform-test
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: camunda-platform
app.kubernetes.io/version: "8.2.29"
app.kubernetes.io/version: "8.2.28"
app.kubernetes.io/component: connectors
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
app.kubernetes.io/instance: camunda-platform-test
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: camunda-platform
app.kubernetes.io/version: "8.2.29"
app.kubernetes.io/version: "8.2.28"
data:
action_file.yml: |-
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
app.kubernetes.io/instance: camunda-platform-test
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: camunda-platform
app.kubernetes.io/version: "8.2.29"
app.kubernetes.io/version: "8.2.28"
spec:
schedule: "0 0 * * *"
successfulJobsHistoryLimit: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
app.kubernetes.io/instance: camunda-platform-test
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: camunda-platform
app.kubernetes.io/version: "8.2.29"
app.kubernetes.io/version: "8.2.28"
release: metrics
spec:
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func (s *deploymentTemplateTest) TestContainerOverwriteGlobalImageTag() {
options := &helm.Options{
SetValues: map[string]string{
"global.image.tag": "a.b.c",
"identity.image.tag": "",
},
KubectlOptions: k8s.NewKubectlOptions("", "", s.namespace),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ func (s *deploymentTemplateTest) TestContainerOverwriteGlobalImageTag() {
options := &helm.Options{
SetValues: map[string]string{
"global.image.tag": "a.b.c",
"tasklist.image.tag": "",
},
KubectlOptions: k8s.NewKubectlOptions("", "", s.namespace),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
app.kubernetes.io/instance: camunda-platform-test
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: camunda-platform
app.kubernetes.io/version: "8.2.29"
app.kubernetes.io/version: "8.2.28"
app.kubernetes.io/component: tasklist
apiVersion: v1
data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
app.kubernetes.io/instance: camunda-platform-test
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: camunda-platform
app.kubernetes.io/version: "8.2.29"
app.kubernetes.io/version: "8.2.28"
app.kubernetes.io/component: tasklist
annotations:
{}
Expand All @@ -32,14 +32,14 @@ spec:
app.kubernetes.io/instance: camunda-platform-test
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: camunda-platform
app.kubernetes.io/version: "8.2.29"
app.kubernetes.io/version: "8.2.28"
app.kubernetes.io/component: tasklist
spec:
imagePullSecrets:
[]
containers:
- name: tasklist
image: "camunda/tasklist:8.2.29"
image: "camunda/tasklist:8.2.28"
imagePullPolicy: IfNotPresent
env:
- name: SPRING_PROFILES_ACTIVE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
app.kubernetes.io/instance: camunda-platform-test
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: camunda-platform
app.kubernetes.io/version: "8.2.29"
app.kubernetes.io/version: "8.2.28"
app.kubernetes.io/component: tasklist
annotations:
ingress.kubernetes.io/rewrite-target: /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
app.kubernetes.io/instance: camunda-platform-test
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: camunda-platform
app.kubernetes.io/version: "8.2.29"
app.kubernetes.io/version: "8.2.28"
app.kubernetes.io/component: tasklist
annotations:
ingress.kubernetes.io/rewrite-target: /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
app.kubernetes.io/instance: camunda-platform-test
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: camunda-platform
app.kubernetes.io/version: "8.2.29"
app.kubernetes.io/version: "8.2.28"
app.kubernetes.io/component: tasklist
spec:
type: ClusterIP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ func (s *deploymentTemplateTest) TestContainerOverwriteGlobalImageTag() {
options := &helm.Options{
SetValues: map[string]string{
"global.image.tag": "a.b.c",
"zeebe-gateway.image.tag": "",
},
KubectlOptions: k8s.NewKubectlOptions("", "", s.namespace),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func (s *statefulSetTest) TestContainerOverwriteGlobalImageTag() {
options := &helm.Options{
SetValues: map[string]string{
"global.image.tag": "a.b.c",
"zeebe.image.tag": "a.b.c",
},
KubectlOptions: k8s.NewKubectlOptions("", "", s.namespace),
}
Expand Down
60 changes: 43 additions & 17 deletions charts/camunda-platform-8.2/values-latest.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,72 @@
#
# Camunda - v8.2
# https://docs.camunda.io/docs/next/reference/announcements/#camunda-82
# https://docs.camunda.io/docs/reference/announcements/#camunda-82
#

global:
# https://github.com/camunda/camunda-platform/releases
# https://hub.docker.com/u/camunda
image:
# renovate: datasource=docker depName=camunda/zeebe
tag: 8.2.29
tag:

connectors:
# https://hub.docker.com/r/camunda/connectors-bundle/tags
# https://hub.docker.com/r/camunda/connectors-bundle/tags?page=&page_size=&ordering=&name=8.2
image:
repository: camunda/connectors-bundle
tag: 0.23.2

identity:
keycloak:
# https://hub.docker.com/r/bitnami/keycloak/tags
image:
repository: bitnami/keycloak
tag: 19.0.3
postgresql:
# https://hub.docker.com/r/bitnami/postgresql/tags
image:
repository: bitnami/postgresql
tag: 15.4.0
operate:
# https://hub.docker.com/r/camunda/operate/tags?page=&page_size=&ordering=&name=8.2
image:
tag: 8.2.28

optimize:
# https://hub.docker.com/r/camunda/optimize/tags
# https://hub.docker.com/r/camunda/optimize/tags?page=&page_size=&ordering=&name=8.2
image:
repository: camunda/optimize
tag: 8.2.12

tasklist:
# https://hub.docker.com/r/camunda/tasklist/tags?page=&page_size=&ordering=&name=8.2
image:
tag: 8.2.28

webModeler:
# Camunda Enterprise repository.
# registry.camunda.cloud/web-modeler-ee
image:
# renovate: datasource=docker depName=camunda/web-modeler lookupName=registry.camunda.cloud/web-modeler-ee/modeler-restapi
tag: 8.2.16

zeebe:
# https://hub.docker.com/r/camunda/zeebe/tags?page=&page_size=&ordering=&name=8.2
image:
tag: 8.2.29

zeebe-gateway:
# https://hub.docker.com/r/camunda/zeebe/tags?page=&page_size=&ordering=&name=8.2
image:
tag: 8.2.29

#
# Identity
#

identity:
# https://hub.docker.com/r/camunda/identity/tags?page=&page_size=&ordering=&name=8.2
image:
repository: camunda/identity
tag: 8.2.29
keycloak:
# https://hub.docker.com/r/bitnami/keycloak/tags?page=&page_size=&ordering=&name=8.2
image:
repository: bitnami/keycloak
tag: 19.0.3
postgresql:
# https://hub.docker.com/r/bitnami/postgresql/tags?page=&page_size=&ordering=&name=8.2
image:
repository: bitnami/postgresql
tag: 15.4.0

#
# Elasticsearch
#
Expand Down
Loading

0 comments on commit 3c1a207

Please sign in to comment.