diff --git a/README.md b/README.md index 7f7e2734..1e767fc4 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,13 @@ # Zammad Helm Chart +[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/zammad)](https://artifacthub.io/packages/helm/zammad/zammad) +[![Release downloads](https://img.shields.io/github/downloads/zammad/zammad-helm/total.svg)](https://github.com/zammad/zammad-helm/releases) +[![Release Charts](https://github.com/zammad/zammad-helm/workflows/Release%20Charts/badge.svg)](https://github.com/zammad/zammad-helm/commits/master) + A [Helm](https://helm.sh) chart to install [Zammad](https://zammad.org) on [Kubernetes](https://kubernetes.io) Please see [zammad/README.md](zammad/README.md) for detailed information & instructions. -## Repository Info - -[![Releases downloads](https://img.shields.io/github/downloads/zammad/zammad-helm/total.svg)](https://github.com/zammad/zammad-helm/releases) -[![Release Charts](https://github.com/zammad/zammad-helm/workflows/Release%20Charts/badge.svg)](https://github.com/zammad/zammad-helm/commits/master) - ## Sources * [Helm chart sources](https://github.com/zammad/zammad-helm) diff --git a/zammad/Chart.yaml b/zammad/Chart.yaml index cf1e6059..b0917184 100644 --- a/zammad/Chart.yaml +++ b/zammad/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: zammad -version: 12.2.3 -appVersion: 6.3.1-78 +version: 12.3.0 +appVersion: 6.3.1-91 description: Zammad is a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and e-mails. home: https://zammad.org icon: https://raw.githubusercontent.com/zammad/zammad-documentation/main/images/zammad_logo_600x520.png diff --git a/zammad/ci/full-values.yaml b/zammad/ci/full-values.yaml index 3789ce94..68c88b66 100644 --- a/zammad/ci/full-values.yaml +++ b/zammad/ci/full-values.yaml @@ -49,3 +49,40 @@ zammadConfig: - name: custom-volume mountPath: /opt/zammad/lib/tasks/helm readOnly: true + nginx: + podLabels: + my-nginx-pod-label: my-nginx-pod-label-value + podAnnotations: + my-nginx-pod-annotation: my-nginx-pod-annotation-value + railsserver: + podLabels: + my-railsserver-pod-label: my-railsserver-pod-label-value + podAnnotations: + my-railsserver-pod-annotation: my-railsserver-pod-annotation-value + scheduler: + podLabels: + my-scheduler-pod-label: my-scheduler-pod-label-value + podAnnotations: + my-scheduler-pod-annotation: my-scheduler-pod-annotation-value + websocket: + podLabels: + my-websocket-pod-label: my-websocket-pod-label-value + podAnnotations: + my-websocket-pod-annotation: my-websocket-pod-annotation-value + initJob: + podLabels: + my-initJob-pod-label: my-initJob-pod-label-value + podAnnotations: + my-initJob-pod-annotation: my-initJob-pod-annotation-value + +commonLabels: + my-common-label: my-common-label-value + +commonAnnotations: + my-common-annotation: my-common-annotation-value + +podLabels: + my-pod-label: my-pod-label-value + +podAnnotations: + my-pod-annotation: my-pod-annotation-value diff --git a/zammad/templates/_helpers.tpl b/zammad/templates/_helpers.tpl index 4e88f62d..d948eb07 100644 --- a/zammad/templates/_helpers.tpl +++ b/zammad/templates/_helpers.tpl @@ -41,6 +41,19 @@ helm.sh/chart: {{ include "zammad.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- with .Values.commonLabels }} +{{ toYaml . }} +{{- end }} +{{- end -}} + +{{/* +Pod labels +*/}} +{{- define "zammad.podLabels" -}} +{{ include "zammad.labels" . }} +{{- with .Values.podLabels }} +{{ toYaml . }} +{{- end }} {{- end -}} {{/* @@ -51,6 +64,25 @@ app.kubernetes.io/name: {{ include "zammad.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} +{{/* +Common annotations +*/}} +{{- define "zammad.annotations" -}} +{{- with .Values.commonAnnotations }} +{{ toYaml . }} +{{- end }} +{{- end -}} + +{{/* +Pod annotations +*/}} +{{- define "zammad.podAnnotations" -}} +{{ include "zammad.annotations" . }} +{{- with .Values.podAnnotations }} +{{ toYaml . }} +{{- end }} +{{- end -}} + {{/* Create the name of the service account to use */}} diff --git a/zammad/templates/configmap-init.yaml b/zammad/templates/configmap-init.yaml index a9b2c3d3..8983884d 100644 --- a/zammad/templates/configmap-init.yaml +++ b/zammad/templates/configmap-init.yaml @@ -4,6 +4,8 @@ metadata: name: {{ include "zammad.fullname" . }}-init labels: {{- include "zammad.labels" . | nindent 4 }} + annotations: + {{- include "zammad.annotations" . | nindent 4 }} data: postgresql-init: |- #!/bin/bash diff --git a/zammad/templates/configmap-nginx.yaml b/zammad/templates/configmap-nginx.yaml index c8cff24a..292e5bbe 100644 --- a/zammad/templates/configmap-nginx.yaml +++ b/zammad/templates/configmap-nginx.yaml @@ -4,6 +4,8 @@ metadata: name: {{ include "zammad.fullname" . }}-nginx labels: {{- include "zammad.labels" . | nindent 4 }} + annotations: + {{- include "zammad.annotations" . | nindent 4 }} data: default: |- # diff --git a/zammad/templates/deployment-nginx.yaml b/zammad/templates/deployment-nginx.yaml index 081dd3b7..307e4a4a 100644 --- a/zammad/templates/deployment-nginx.yaml +++ b/zammad/templates/deployment-nginx.yaml @@ -5,6 +5,8 @@ metadata: labels: {{- include "zammad.labels" . | nindent 4 }} app.kubernetes.io/component: zammad-nginx + annotations: + {{- include "zammad.annotations" . | nindent 4 }} spec: replicas: {{ .Values.zammadConfig.nginx.replicas }} selector: @@ -12,13 +14,17 @@ spec: {{- include "zammad.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} annotations: - {{- toYaml . | nindent 8 }} - {{- end }} + {{- include "zammad.podAnnotations" . | nindent 8 }} + {{- with .Values.zammadConfig.nginx.podAnnotations }} + {{- toYaml . | nindent 8}} + {{- end }} labels: - {{- include "zammad.labels" . | nindent 8 }} + {{- include "zammad.podLabels" . | nindent 8 }} app.kubernetes.io/component: zammad-nginx + {{- with .Values.zammadConfig.nginx.podLabels }} + {{- toYaml . | nindent 8}} + {{- end }} spec: {{- include "zammad.podSpec.deployment" . | nindent 6 }} containers: diff --git a/zammad/templates/deployment-railsserver.yaml b/zammad/templates/deployment-railsserver.yaml index 7548719d..4676d58e 100644 --- a/zammad/templates/deployment-railsserver.yaml +++ b/zammad/templates/deployment-railsserver.yaml @@ -5,6 +5,8 @@ metadata: labels: {{- include "zammad.labels" . | nindent 4 }} app.kubernetes.io/component: zammad-railsserver + annotations: + {{- include "zammad.annotations" . | nindent 4 }} spec: replicas: {{ .Values.zammadConfig.railsserver.replicas }} selector: @@ -12,13 +14,17 @@ spec: {{- include "zammad.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} annotations: - {{- toYaml . | nindent 8 }} - {{- end }} + {{- include "zammad.podAnnotations" . | nindent 8 }} + {{- with .Values.zammadConfig.railsserver.podAnnotations }} + {{- toYaml . | nindent 8}} + {{- end }} labels: - {{- include "zammad.labels" . | nindent 8 }} + {{- include "zammad.podLabels" . | nindent 8 }} app.kubernetes.io/component: zammad-railsserver + {{- with .Values.zammadConfig.railsserver.podLabels }} + {{- toYaml . | nindent 8}} + {{- end }} spec: {{- include "zammad.podSpec.deployment" . | nindent 6 }} containers: diff --git a/zammad/templates/deployment-scheduler.yaml b/zammad/templates/deployment-scheduler.yaml index 5b320ab0..e6fa1017 100644 --- a/zammad/templates/deployment-scheduler.yaml +++ b/zammad/templates/deployment-scheduler.yaml @@ -5,6 +5,8 @@ metadata: labels: {{- include "zammad.labels" . | nindent 4 }} app.kubernetes.io/component: zammad-scheduler + annotations: + {{- include "zammad.annotations" . | nindent 4 }} spec: replicas: 1 # Not scalable, may only run once per cluster. selector: @@ -12,13 +14,17 @@ spec: {{- include "zammad.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} annotations: - {{- toYaml . | nindent 8 }} - {{- end }} + {{- include "zammad.podAnnotations" . | nindent 8 }} + {{- with .Values.zammadConfig.scheduler.podAnnotations }} + {{- toYaml . | nindent 8}} + {{- end }} labels: - {{- include "zammad.labels" . | nindent 8 }} + {{- include "zammad.podLabels" . | nindent 8 }} app.kubernetes.io/component: zammad-scheduler + {{- with .Values.zammadConfig.scheduler.podLabels }} + {{- toYaml . | nindent 8}} + {{- end }} spec: {{- include "zammad.podSpec.deployment" . | nindent 6 }} containers: diff --git a/zammad/templates/deployment-websocket.yaml b/zammad/templates/deployment-websocket.yaml index f2f89b53..5000b717 100644 --- a/zammad/templates/deployment-websocket.yaml +++ b/zammad/templates/deployment-websocket.yaml @@ -5,6 +5,8 @@ metadata: labels: {{- include "zammad.labels" . | nindent 4 }} app.kubernetes.io/component: zammad-websocket + annotations: + {{- include "zammad.annotations" . | nindent 4 }} spec: replicas: 1 # Not scalable, may only run once per cluster. selector: @@ -12,13 +14,17 @@ spec: {{- include "zammad.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} annotations: - {{- toYaml . | nindent 8 }} - {{- end }} + {{- include "zammad.podAnnotations" . | nindent 8 }} + {{- with .Values.zammadConfig.websocket.podAnnotations }} + {{- toYaml . | nindent 8}} + {{- end }} labels: - {{- include "zammad.labels" . | nindent 8 }} + {{- include "zammad.podLabels" . | nindent 8 }} app.kubernetes.io/component: zammad-websocket + {{- with .Values.zammadConfig.websocket.podLabels }} + {{- toYaml . | nindent 8}} + {{- end }} spec: {{- include "zammad.podSpec.deployment" . | nindent 6 }} containers: diff --git a/zammad/templates/ingress.yaml b/zammad/templates/ingress.yaml index 314861db..523f42e7 100644 --- a/zammad/templates/ingress.yaml +++ b/zammad/templates/ingress.yaml @@ -18,8 +18,9 @@ metadata: name: {{ $fullName }} labels: {{- include "zammad.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} annotations: + {{- include "zammad.annotations" . | nindent 4 }} + {{- with .Values.ingress.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: diff --git a/zammad/templates/job-init.yaml b/zammad/templates/job-init.yaml index f2b8d068..ef47effd 100644 --- a/zammad/templates/job-init.yaml +++ b/zammad/templates/job-init.yaml @@ -13,21 +13,26 @@ metadata: labels: {{- include "zammad.labels" . | nindent 4 }} app.kubernetes.io/component: zammad-init - {{- with .Values.zammadConfig.initJob.annotations }} annotations: + {{- include "zammad.annotations" . | nindent 4 }} + {{- with .Values.zammadConfig.initJob.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: ttlSecondsAfterFinished: 300 template: metadata: - {{- with .Values.podAnnotations }} annotations: - {{- toYaml . | nindent 8 }} - {{- end }} + {{- include "zammad.podAnnotations" . | nindent 8 }} + {{- with .Values.zammadConfig.initJob.podAnnotations }} + {{- toYaml . | nindent 8}} + {{- end }} labels: - {{- include "zammad.labels" . | nindent 8 }} + {{- include "zammad.podLabels" . | nindent 8 }} app.kubernetes.io/component: zammad-init + {{- with .Values.zammadConfig.initJob.podLabels }} + {{- toYaml . | nindent 8}} + {{- end }} spec: {{- include "zammad.podSpec" . | nindent 6 }} restartPolicy: OnFailure diff --git a/zammad/templates/secrets.yaml b/zammad/templates/secrets.yaml index 7441031b..0e472330 100644 --- a/zammad/templates/secrets.yaml +++ b/zammad/templates/secrets.yaml @@ -5,6 +5,8 @@ metadata: name: {{ include "zammad.autowizardSecretName" . }} labels: {{- include "zammad.labels" . | nindent 4 }} + annotations: + {{- include "zammad.annotations" . | nindent 4 }} type: Opaque data: {{ .Values.secrets.autowizard.secretKey }}: {{ .Values.autoWizard.config | b64enc | quote }} @@ -17,6 +19,8 @@ metadata: name: {{ include "zammad.elasticsearchSecretName" . }} labels: {{- include "zammad.labels" . | nindent 4 }} + annotations: + {{- include "zammad.annotations" . | nindent 4 }} type: Opaque data: {{ .Values.secrets.elasticsearch.secretKey }}: {{ .Values.zammadConfig.elasticsearch.pass | b64enc | quote }} @@ -29,6 +33,8 @@ metadata: name: {{ include "zammad.postgresqlSecretName" . }} labels: {{- include "zammad.labels" . | nindent 4 }} + annotations: + {{- include "zammad.annotations" . | nindent 4 }} type: Opaque data: {{ .Values.secrets.postgresql.secretKey }}: {{ .Values.zammadConfig.postgresql.pass | b64enc | quote }} @@ -41,6 +47,8 @@ metadata: name: {{ include "zammad.redisSecretName" . }} labels: {{- include "zammad.labels" . | nindent 4 }} + annotations: + {{- include "zammad.annotations" . | nindent 4 }} type: Opaque data: {{ .Values.secrets.redis.secretKey }}: {{ .Values.zammadConfig.redis.pass | b64enc | quote }} diff --git a/zammad/templates/service-nginx.yaml b/zammad/templates/service-nginx.yaml index f198db25..e6654d62 100644 --- a/zammad/templates/service-nginx.yaml +++ b/zammad/templates/service-nginx.yaml @@ -4,6 +4,8 @@ metadata: name: {{ include "zammad.fullname" . }}-nginx labels: {{- include "zammad.labels" . | nindent 4 }} + annotations: + {{- include "zammad.annotations" . | nindent 4 }} spec: type: {{ .Values.service.type }} ports: diff --git a/zammad/templates/service-railsserver.yaml b/zammad/templates/service-railsserver.yaml index 69f32d20..15159db0 100644 --- a/zammad/templates/service-railsserver.yaml +++ b/zammad/templates/service-railsserver.yaml @@ -4,6 +4,8 @@ metadata: name: {{ include "zammad.fullname" . }}-railsserver labels: {{- include "zammad.labels" . | nindent 4 }} + annotations: + {{- include "zammad.annotations" . | nindent 4 }} spec: ports: - port: 3000 diff --git a/zammad/templates/service-websocket.yaml b/zammad/templates/service-websocket.yaml index df8ffa30..b1d96fa2 100644 --- a/zammad/templates/service-websocket.yaml +++ b/zammad/templates/service-websocket.yaml @@ -4,6 +4,8 @@ metadata: name: {{ include "zammad.fullname" . }}-websocket labels: {{- include "zammad.labels" . | nindent 4 }} + annotations: + {{- include "zammad.annotations" . | nindent 4 }} spec: ports: - port: 6042 diff --git a/zammad/templates/serviceaccount.yaml b/zammad/templates/serviceaccount.yaml index b1acb9f3..37953cb3 100644 --- a/zammad/templates/serviceaccount.yaml +++ b/zammad/templates/serviceaccount.yaml @@ -5,8 +5,9 @@ metadata: name: {{ include "zammad.serviceAccountName" . }} labels: {{- include "zammad.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} annotations: + {{- include "zammad.annotations" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} {{- toYaml . | nindent 4 }} {{- end }} {{- end }} diff --git a/zammad/values.yaml b/zammad/values.yaml index 86b5021e..ba871244 100644 --- a/zammad/values.yaml +++ b/zammad/values.yaml @@ -132,6 +132,10 @@ zammadConfig: privileged: false # can be used to add additional containers / sidecars sidecars: [] + podLabels: {} + # my-label: "value" + podAnnotations: {} + # my-annotation: "value" postgresql: # enable/disable postgresql chart dependency @@ -187,6 +191,10 @@ zammadConfig: webConcurrency: 0 # tmpdir will be used by all Zammad/Rails containers tmpdir: "/opt/zammad/tmp" + podLabels: {} + # my-label: "value" + podAnnotations: {} + # my-annotation: "value" redis: # enable/disable redis chart dependency @@ -213,6 +221,10 @@ zammadConfig: privileged: false # can be used to add additional containers / sidecars sidecars: [] + podLabels: {} + # my-label: "value" + podAnnotations: {} + # my-annotation: "value" storageVolume: # Enable this for 'File' based storage in Zammad. You must provide an externally managed 'extistingClaim' @@ -277,6 +289,10 @@ zammadConfig: privileged: false # can be used to add additional containers / sidecars sidecars: [] + podLabels: {} + # my-label: "value" + podAnnotations: {} + # my-annotation: "value" initContainers: elasticsearch: @@ -358,6 +374,10 @@ zammadConfig: randomName: true annotations: {} # my-annotation: "value" + podLabels: {} + # my-label: "value" + podAnnotations: {} + # my-annotation: "value" # additional environment vars added to all zammad services extraEnv: [] @@ -402,6 +422,12 @@ autoWizard: # ] # } +commonLabels: {} + # my-label: "value" +commonAnnotations: {} + # my-annotation: "value" +podLabels: {} + # my-label: "value" podAnnotations: {} # my-annotation: "value"