From fd8c4941616908080525f00810f0f03b2956ab55 Mon Sep 17 00:00:00 2001
From: dvirlabs <114520947+dvirlabs@users.noreply.github.com>
Date: Mon, 13 Apr 2026 13:51:19 +0300
Subject: [PATCH] Add semaphore app
---
argocd-apps/semaphore.yaml | 21 +
charts/semaphore/.helmignore | 19 +
charts/semaphore/Chart.lock | 9 +
charts/semaphore/Chart.yaml | 39 +
charts/semaphore/README.md | 299 +++
charts/semaphore/README.md.gotmpl | 141 +
charts/semaphore/charts/mariadb/.helmignore | 25 +
.../charts/mariadb/.relok8s-images.yaml | 13 +
charts/semaphore/charts/mariadb/Chart.yaml | 40 +
charts/semaphore/charts/mariadb/README.md | 924 +++++++
.../charts/mariadb/charts/common/.helmignore | 26 +
.../charts/mariadb/charts/common/Chart.yaml | 25 +
.../charts/mariadb/charts/common/README.md | 395 +++
.../charts/common/templates/_affinities.tpl | 169 ++
.../charts/common/templates/_capabilities.tpl | 178 ++
.../charts/common/templates/_certs.tpl | 51 +
.../common/templates/_compatibility.tpl | 46 +
.../charts/common/templates/_errors.tpl | 92 +
.../mariadb/charts/common/templates/_fips.tpl | 73 +
.../charts/common/templates/_images.tpl | 115 +
.../charts/common/templates/_ingress.tpl | 41 +
.../charts/common/templates/_labels.tpl | 46 +
.../charts/common/templates/_names.tpl | 72 +
.../charts/common/templates/_resources.tpl | 50 +
.../charts/common/templates/_secrets.tpl | 192 ++
.../charts/common/templates/_storage.tpl | 21 +
.../charts/common/templates/_tplvalues.tpl | 52 +
.../charts/common/templates/_utils.tpl | 77 +
.../charts/common/templates/_warnings.tpl | 109 +
.../templates/validations/_cassandra.tpl | 51 +
.../common/templates/validations/_mariadb.tpl | 108 +
.../common/templates/validations/_mongodb.tpl | 67 +
.../common/templates/validations/_mysql.tpl | 67 +
.../templates/validations/_postgresql.tpl | 105 +
.../common/templates/validations/_redis.tpl | 48 +
.../templates/validations/_validations.tpl | 51 +
.../charts/mariadb/charts/common/values.yaml | 8 +
.../charts/mariadb/templates/NOTES.txt | 89 +
.../charts/mariadb/templates/_helpers.tpl | 220 ++
.../charts/mariadb/templates/ca-cert.yaml | 53 +
.../charts/mariadb/templates/cert.yaml | 42 +
.../charts/mariadb/templates/extra-list.yaml | 9 +
.../mariadb/templates/headless-svc.yaml | 36 +
.../mariadb/templates/networkpolicy.yaml | 77 +
.../mariadb/templates/primary/configmap.yaml | 21 +
.../primary/initialization-configmap.yaml | 20 +
.../charts/mariadb/templates/primary/pdb.yaml | 29 +
.../templates/primary/statefulset.yaml | 523 ++++
.../charts/mariadb/templates/primary/svc.yaml | 63 +
.../mariadb/templates/prometheusrules.yaml | 25 +
.../charts/mariadb/templates/role.yaml | 24 +
.../charts/mariadb/templates/rolebinding.yaml | 24 +
.../templates/secondary/configmap.yaml | 21 +
.../mariadb/templates/secondary/pdb.yaml | 29 +
.../templates/secondary/statefulset.yaml | 491 ++++
.../mariadb/templates/secondary/svc.yaml | 66 +
.../charts/mariadb/templates/secrets.yaml | 101 +
.../secretstoreproviderclass-tde.yaml | 37 +
.../mariadb/templates/serviceaccount.yaml | 19 +
.../mariadb/templates/servicemonitor.yaml | 45 +
.../charts/mariadb/templates/tls-secret.yaml | 50 +
.../templates/update-password/job.yaml | 251 ++
.../templates/update-password/new-secret.yaml | 28 +
.../update-password/previous-secret.yaml | 28 +
.../charts/mariadb/values.schema.json | 2289 +++++++++++++++++
charts/semaphore/charts/mariadb/values.yaml | 1673 ++++++++++++
.../semaphore/charts/postgresql/.helmignore | 25 +
.../charts/postgresql/.relok8s-images.yaml | 13 +
charts/semaphore/charts/postgresql/Chart.yaml | 41 +
charts/semaphore/charts/postgresql/README.md | 1174 +++++++++
.../postgresql/charts/common/.helmignore | 26 +
.../postgresql/charts/common/Chart.yaml | 25 +
.../charts/postgresql/charts/common/README.md | 395 +++
.../charts/common/templates/_affinities.tpl | 169 ++
.../charts/common/templates/_capabilities.tpl | 178 ++
.../charts/common/templates/_certs.tpl | 51 +
.../common/templates/_compatibility.tpl | 46 +
.../charts/common/templates/_errors.tpl | 92 +
.../charts/common/templates/_fips.tpl | 73 +
.../charts/common/templates/_images.tpl | 115 +
.../charts/common/templates/_ingress.tpl | 41 +
.../charts/common/templates/_labels.tpl | 46 +
.../charts/common/templates/_names.tpl | 72 +
.../charts/common/templates/_resources.tpl | 50 +
.../charts/common/templates/_secrets.tpl | 192 ++
.../charts/common/templates/_storage.tpl | 21 +
.../charts/common/templates/_tplvalues.tpl | 52 +
.../charts/common/templates/_utils.tpl | 77 +
.../charts/common/templates/_warnings.tpl | 109 +
.../templates/validations/_cassandra.tpl | 51 +
.../common/templates/validations/_mariadb.tpl | 108 +
.../common/templates/validations/_mongodb.tpl | 67 +
.../common/templates/validations/_mysql.tpl | 67 +
.../templates/validations/_postgresql.tpl | 105 +
.../common/templates/validations/_redis.tpl | 48 +
.../templates/validations/_validations.tpl | 51 +
.../postgresql/charts/common/values.yaml | 8 +
.../charts/postgresql/templates/NOTES.txt | 123 +
.../charts/postgresql/templates/_helpers.tpl | 458 ++++
.../postgresql/templates/backup/cronjob.yaml | 151 ++
.../templates/backup/networkpolicy.yaml | 32 +
.../postgresql/templates/backup/pvc.yaml | 34 +
.../postgresql/templates/extra-list.yaml | 9 +
.../templates/primary/configmap.yaml | 26 +
.../templates/primary/extended-configmap.yaml | 20 +
.../primary/initialization-configmap.yaml | 17 +
.../templates/primary/metrics-configmap.yaml | 18 +
.../templates/primary/metrics-svc.yaml | 31 +
.../templates/primary/networkpolicy.yaml | 78 +
.../postgresql/templates/primary/pdb.yaml | 29 +
.../primary/preinitialization-configmap.yaml | 17 +
.../templates/primary/servicemonitor.yaml | 46 +
.../templates/primary/statefulset.yaml | 725 ++++++
.../templates/primary/svc-headless.yaml | 31 +
.../postgresql/templates/primary/svc.yaml | 58 +
.../postgresql/templates/prometheusrule.yaml | 22 +
.../charts/postgresql/templates/psp.yaml | 42 +
.../templates/read/extended-configmap.yaml | 20 +
.../templates/read/metrics-configmap.yaml | 18 +
.../templates/read/metrics-svc.yaml | 31 +
.../templates/read/networkpolicy.yaml | 80 +
.../charts/postgresql/templates/read/pdb.yaml | 29 +
.../templates/read/servicemonitor.yaml | 46 +
.../templates/read/statefulset.yaml | 612 +++++
.../templates/read/svc-headless.yaml | 33 +
.../charts/postgresql/templates/read/svc.yaml | 60 +
.../charts/postgresql/templates/role.yaml | 32 +
.../postgresql/templates/rolebinding.yaml | 24 +
.../charts/postgresql/templates/secrets.yaml | 120 +
.../postgresql/templates/serviceaccount.yaml | 18 +
.../postgresql/templates/tls-secrets.yaml | 30 +
.../templates/update-password/job.yaml | 239 ++
.../templates/update-password/new-secret.yaml | 32 +
.../update-password/previous-secret.yaml | 32 +
.../charts/postgresql/values.schema.json | 156 ++
.../semaphore/charts/postgresql/values.yaml | 1962 ++++++++++++++
charts/semaphore/ci/default-values.yaml | 5 +
charts/semaphore/source.yaml | 6 +
charts/semaphore/templates/_helpers.tpl | 77 +
charts/semaphore/templates/configmap.yaml | 60 +
charts/semaphore/templates/deployment.yaml | 646 +++++
charts/semaphore/templates/ingress.yaml | 50 +
charts/semaphore/templates/pvc.yaml | 64 +
charts/semaphore/templates/secret-admin.yaml | 29 +
.../semaphore/templates/secret-database.yaml | 23 +
charts/semaphore/templates/secret-email.yaml | 23 +
.../semaphore/templates/secret-general.yaml | 30 +
charts/semaphore/templates/secret-ldap.yaml | 23 +
charts/semaphore/templates/secret-runner.yaml | 26 +
charts/semaphore/templates/secret-slack.yaml | 22 +
.../semaphore/templates/secret-telegram.yaml | 23 +
charts/semaphore/templates/service.yaml | 27 +
.../semaphore/templates/serviceaccount.yaml | 14 +
.../templates/tests/test-connection.yaml | 21 +
charts/semaphore/values.schema.json | 193 ++
charts/semaphore/values.yaml | 499 ++++
manifests/semaphore/values.yaml | 55 +
157 files changed, 21293 insertions(+)
create mode 100644 argocd-apps/semaphore.yaml
create mode 100644 charts/semaphore/.helmignore
create mode 100644 charts/semaphore/Chart.lock
create mode 100644 charts/semaphore/Chart.yaml
create mode 100644 charts/semaphore/README.md
create mode 100644 charts/semaphore/README.md.gotmpl
create mode 100644 charts/semaphore/charts/mariadb/.helmignore
create mode 100644 charts/semaphore/charts/mariadb/.relok8s-images.yaml
create mode 100644 charts/semaphore/charts/mariadb/Chart.yaml
create mode 100644 charts/semaphore/charts/mariadb/README.md
create mode 100644 charts/semaphore/charts/mariadb/charts/common/.helmignore
create mode 100644 charts/semaphore/charts/mariadb/charts/common/Chart.yaml
create mode 100644 charts/semaphore/charts/mariadb/charts/common/README.md
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_affinities.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_capabilities.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_certs.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_compatibility.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_errors.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_fips.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_images.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_ingress.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_labels.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_names.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_resources.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_secrets.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_storage.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_tplvalues.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_utils.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/_warnings.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/validations/_cassandra.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/validations/_mariadb.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/validations/_mongodb.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/validations/_mysql.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/validations/_postgresql.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/validations/_redis.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/templates/validations/_validations.tpl
create mode 100644 charts/semaphore/charts/mariadb/charts/common/values.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/NOTES.txt
create mode 100644 charts/semaphore/charts/mariadb/templates/_helpers.tpl
create mode 100644 charts/semaphore/charts/mariadb/templates/ca-cert.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/cert.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/extra-list.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/headless-svc.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/networkpolicy.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/primary/configmap.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/primary/initialization-configmap.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/primary/pdb.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/primary/statefulset.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/primary/svc.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/prometheusrules.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/role.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/rolebinding.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/secondary/configmap.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/secondary/pdb.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/secondary/statefulset.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/secondary/svc.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/secrets.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/secretstoreproviderclass-tde.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/serviceaccount.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/servicemonitor.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/tls-secret.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/update-password/job.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/update-password/new-secret.yaml
create mode 100644 charts/semaphore/charts/mariadb/templates/update-password/previous-secret.yaml
create mode 100644 charts/semaphore/charts/mariadb/values.schema.json
create mode 100644 charts/semaphore/charts/mariadb/values.yaml
create mode 100644 charts/semaphore/charts/postgresql/.helmignore
create mode 100644 charts/semaphore/charts/postgresql/.relok8s-images.yaml
create mode 100644 charts/semaphore/charts/postgresql/Chart.yaml
create mode 100644 charts/semaphore/charts/postgresql/README.md
create mode 100644 charts/semaphore/charts/postgresql/charts/common/.helmignore
create mode 100644 charts/semaphore/charts/postgresql/charts/common/Chart.yaml
create mode 100644 charts/semaphore/charts/postgresql/charts/common/README.md
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_affinities.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_capabilities.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_certs.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_compatibility.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_errors.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_fips.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_images.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_ingress.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_labels.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_names.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_resources.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_secrets.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_storage.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_tplvalues.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_utils.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/_warnings.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/validations/_cassandra.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/validations/_mariadb.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/validations/_mongodb.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/validations/_mysql.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/validations/_postgresql.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/validations/_redis.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/templates/validations/_validations.tpl
create mode 100644 charts/semaphore/charts/postgresql/charts/common/values.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/NOTES.txt
create mode 100644 charts/semaphore/charts/postgresql/templates/_helpers.tpl
create mode 100644 charts/semaphore/charts/postgresql/templates/backup/cronjob.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/backup/networkpolicy.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/backup/pvc.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/extra-list.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/primary/configmap.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/primary/extended-configmap.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/primary/initialization-configmap.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/primary/metrics-configmap.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/primary/metrics-svc.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/primary/networkpolicy.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/primary/pdb.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/primary/preinitialization-configmap.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/primary/servicemonitor.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/primary/statefulset.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/primary/svc-headless.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/primary/svc.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/prometheusrule.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/psp.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/read/extended-configmap.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/read/metrics-configmap.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/read/metrics-svc.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/read/networkpolicy.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/read/pdb.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/read/servicemonitor.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/read/statefulset.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/read/svc-headless.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/read/svc.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/role.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/rolebinding.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/secrets.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/serviceaccount.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/tls-secrets.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/update-password/job.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/update-password/new-secret.yaml
create mode 100644 charts/semaphore/charts/postgresql/templates/update-password/previous-secret.yaml
create mode 100644 charts/semaphore/charts/postgresql/values.schema.json
create mode 100644 charts/semaphore/charts/postgresql/values.yaml
create mode 100644 charts/semaphore/ci/default-values.yaml
create mode 100644 charts/semaphore/source.yaml
create mode 100644 charts/semaphore/templates/_helpers.tpl
create mode 100644 charts/semaphore/templates/configmap.yaml
create mode 100644 charts/semaphore/templates/deployment.yaml
create mode 100644 charts/semaphore/templates/ingress.yaml
create mode 100644 charts/semaphore/templates/pvc.yaml
create mode 100644 charts/semaphore/templates/secret-admin.yaml
create mode 100644 charts/semaphore/templates/secret-database.yaml
create mode 100644 charts/semaphore/templates/secret-email.yaml
create mode 100644 charts/semaphore/templates/secret-general.yaml
create mode 100644 charts/semaphore/templates/secret-ldap.yaml
create mode 100644 charts/semaphore/templates/secret-runner.yaml
create mode 100644 charts/semaphore/templates/secret-slack.yaml
create mode 100644 charts/semaphore/templates/secret-telegram.yaml
create mode 100644 charts/semaphore/templates/service.yaml
create mode 100644 charts/semaphore/templates/serviceaccount.yaml
create mode 100644 charts/semaphore/templates/tests/test-connection.yaml
create mode 100644 charts/semaphore/values.schema.json
create mode 100644 charts/semaphore/values.yaml
create mode 100644 manifests/semaphore/values.yaml
diff --git a/argocd-apps/semaphore.yaml b/argocd-apps/semaphore.yaml
new file mode 100644
index 0000000..0f66f22
--- /dev/null
+++ b/argocd-apps/semaphore.yaml
@@ -0,0 +1,21 @@
+apiVersion: argoproj.io/v1alpha1
+kind: Application
+metadata:
+ name: semaphore
+ namespace: argocd
+spec:
+ project: my-apps
+ source:
+ repoURL: ssh://git@gitea-ssh.dev-tools.svc.cluster.local:2222/dvirlabs/my-apps.git
+ targetRevision: HEAD
+ path: charts/semaphore-ui-chart
+ helm:
+ valueFiles:
+ - ../../manifests/semaphore/values.yaml
+ destination:
+ server: https://kubernetes.default.svc
+ namespace: my-apps
+ syncPolicy:
+ automated:
+ prune: true
+ selfHeal: true
diff --git a/charts/semaphore/.helmignore b/charts/semaphore/.helmignore
new file mode 100644
index 0000000..395f33f
--- /dev/null
+++ b/charts/semaphore/.helmignore
@@ -0,0 +1,19 @@
+.DS_Store
+
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+
+*.swp
+*.bak
+*.tmp
+*~
+
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/charts/semaphore/Chart.lock b/charts/semaphore/Chart.lock
new file mode 100644
index 0000000..dd024b0
--- /dev/null
+++ b/charts/semaphore/Chart.lock
@@ -0,0 +1,9 @@
+dependencies:
+- name: mariadb
+ repository: oci://registry-1.docker.io/bitnamicharts
+ version: 23.2.2
+- name: postgresql
+ repository: oci://registry-1.docker.io/bitnamicharts
+ version: 18.1.4
+digest: sha256:50086294528fadd8cdbfe4f6bf80cd4cbafbd1c28b06eeb430362113f25aef0c
+generated: "2025-11-05T19:49:06.913964988Z"
diff --git a/charts/semaphore/Chart.yaml b/charts/semaphore/Chart.yaml
new file mode 100644
index 0000000..82f476a
--- /dev/null
+++ b/charts/semaphore/Chart.yaml
@@ -0,0 +1,39 @@
+annotations:
+ artifacthub.io/license: Apache-2.0
+ artifacthub.io/links: |-
+ - name: Source
+ url: https://github.com/semaphoreui/semaphore
+ - name: Chart
+ url: https://github.com/semaphoreui/charts/tree/main/stable/semaphore
+ artifacthub.io/signKey: |
+ fingerprint: 2B62F542C0C5614F8B4625AE0DDA0DEB51EF789C
+ url: https://raw.githubusercontent.com/semaphoreui/charts/main/semaphore.key
+apiVersion: v2
+appVersion: 2.17.34
+dependencies:
+- condition: mariadb.enabled
+ name: mariadb
+ repository: oci://registry-1.docker.io/bitnamicharts
+ version: 23.2.2
+- condition: postgresql.enabled
+ name: postgresql
+ repository: oci://registry-1.docker.io/bitnamicharts
+ version: 18.1.4
+description: Modern UI and powerful API for Ansible, Terraform, OpenTofu, PowerShell
+ and other DevOps tools
+home: https://semaphoreui.com/
+icon: https://raw.githubusercontent.com/semaphoreui/semaphore/develop/web/public/favicon.svg
+keywords:
+- ansible
+- awx
+- tower
+- semaphore
+maintainers:
+- email: denis@semaphoreui.com
+ name: Denis Gukov
+ url: https://github.com/fiftin
+name: semaphore
+sources:
+- https://github.com/semaphoreui/semaphore
+type: application
+version: 16.1.2
diff --git a/charts/semaphore/README.md b/charts/semaphore/README.md
new file mode 100644
index 0000000..14e359e
--- /dev/null
+++ b/charts/semaphore/README.md
@@ -0,0 +1,299 @@
+# Semaphore UI official chart
+
+  
+
+Modern UI and powerful API for Ansible, Terraform, OpenTofu, PowerShell and other DevOps tools
+
+**Homepage:**
+
+## Installing the Chart
+
+```console
+helm repo add semaphoreui https://semaphoreui.github.io/charts
+helm repo update
+```
+
+**Open-source version:**
+
+```console
+helm install semaphore semaphoreui/semaphore
+```
+
+**Pro version:**
+
+```console
+helm install semaphore semaphoreui/semaphore --set image.repository=public.ecr.aws/semaphore/pro/server
+```
+
+## Installing OCI from GitHub Container Registry (GitHub authentication required)
+
+**Open-source version:**
+
+```console
+helm install semaphore oci://ghcr.io/semaphoreui/charts/semaphore
+```
+
+**Pro version:**
+
+```console
+helm install semaphore oci://ghcr.io/semaphoreui/charts/semaphore --set image.repository=public.ecr.aws/semaphore/pro/server
+```
+
+## Example for Values
+
+### Create `admin` user
+
+```yml
+admin:
+ create: true
+ password: changeme
+```
+
+Now you can login with username `admin` and password `changeme`.
+
+### Ingress Enabled
+
+```yml
+ingress:
+ enabled: false
+
+ hosts:
+ - host: semaphore.example.com
+ paths:
+ - path: /
+ pathType: Prefix
+
+### Custom CA bundle for on-prem Git (appended to ca-certificates.crt)
+
+```yml
+customCertificates:
+ enabled: true
+ existingSecret: my-custom-ca
+ key: ca.crt
+ mountPath: /etc/ssl/certs/ca-certificates.crt
+```
+```
+
+### Bundled MariaDB
+
+```console
+database:
+ type: mysql
+
+ host: mariadb
+ port: 3306
+
+ password: p455w0rd
+
+mariadb:
+ enabled: true
+
+ auth:
+ password: p455w0rd
+```
+
+### Bundled PostgreSQL
+
+```console
+database:
+ type: postgres
+
+ host: postgresql
+ port: 5432
+
+ usernameFromSecret: false
+ passwordKey: password
+ existingSecret: postgresql
+
+postgresql:
+ enabled: true
+
+ auth:
+ password: p455w0rd
+```
+
+### OpenID Connect
+
+```console
+oidc:
+ enable: true
+
+ providers:
+ keycloak:
+ display_name: Keycloak
+ provider_url: https://auth.example.com/auth/realms/example
+ redirect_url: https://semaphore.example.com/api/auth/oidc/keycloak/redirect
+ client_id: semaphore
+ client_secret: 0208901c-ecd7-46ae-931a-d03f02e8dcd2
+ username_claim: preferred_username
+ name_claim: preferred_username
+ email_claim: email
+```
+
+## Maintainers
+
+| Name | Email | Url |
+| ---- | ------ | --- |
+| Denis Gukov | | |
+
+## Source Code
+
+*
+
+## Requirements
+
+| Repository | Name | Version |
+|------------|------|---------|
+| oci://registry-1.docker.io/bitnamicharts | mariadb | 23.2.2 |
+| oci://registry-1.docker.io/bitnamicharts | postgresql | 18.1.4 |
+
+## Values
+
+| Key | Type | Default | Description |
+|-----|------|---------|-------------|
+| admin.create | bool | `false` | Create an local admin user |
+| admin.email | string | `"admin@localhost"` | Email for local admin |
+| admin.emailKey | string | `"email"` | Key used within secret for email |
+| admin.existingSecret | string | `nil` | Existing secret to use for admin |
+| admin.fullname | string | `"Admin"` | Fullname for local admin |
+| admin.fullnameKey | string | `"fullname"` | Key used within secret for fullname |
+| admin.password | string | `nil` | Password for local admin |
+| admin.passwordKey | string | `"password"` | Key used within secret for password |
+| admin.username | string | `"admin"` | Username for local admin |
+| admin.usernameKey | string | `"username"` | Key used within secret for username |
+| affinity | object | `{}` | Affinity for the deployment |
+| annotations | object | `{}` | Define additional annotations |
+| config.forwarded_env_vars | list | `[]` | List of environment variables to forward into the application environment. Modify this list if additional environment variables need to be accessible. |
+| customCertificates.enabled | bool | `false` | Enable appending custom CA bundle into ca-certificates.crt for outbound TLS (e.g. on-prem git) |
+| customCertificates.existingConfigMap | string | `nil` | Existing configmap containing the CA bundle (required if enabled and no secret) |
+| customCertificates.existingSecret | string | `nil` | Existing secret containing the CA bundle (required if enabled and no configmap) |
+| customCertificates.key | string | `"ca.crt"` | Key in secret/configmap that holds the CA bundle |
+| customCertificates.mountPath | string | `"/etc/ssl/certs/ca-certificates.crt"` | Path where the combined CA bundle is mounted (ca-certificates.crt) |
+| database.existingSecret | string | `nil` | Existing secret to use for credentials |
+| database.host | string | `nil` | Host for database connection |
+| database.name | string | `"semaphore"` | Name of the used database |
+| database.options | object | `{}` | Options for database connection |
+| database.password | string | `nil` | Password for database |
+| database.passwordKey | string | `"password"` | Key used within secret for password |
+| database.path | string | `"/var/lib/semaphore/database.boltdb"` | Path for the boltdb |
+| database.persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes used for boltdb volume |
+| database.persistence.enabled | bool | `true` | Enable persistence for boltdb |
+| database.persistence.existingClaim | string | `nil` | Name of an already existing claim |
+| database.persistence.size | string | `"5G"` | Size for boltdb volume |
+| database.persistence.storageClass | string | `nil` | Storage class used for boltdb volume |
+| database.port | string | `nil` | Port for database connection |
+| database.type | string | `"bolt"` | Type of database backend |
+| database.username | string | `"semaphore"` | Username for database |
+| database.usernameFromSecret | bool | `true` | Read username from secret |
+| database.usernameKey | string | `"username"` | Key used within secret for username |
+| email.alert | bool | `false` | Enable email alerting |
+| email.existingSecret | string | `nil` | Existing secret to use for email |
+| email.host | string | `nil` | Host of the SMTP server |
+| email.password | string | `nil` | Password for SMTP server |
+| email.passwordKey | string | `"password"` | Key used within secret for password |
+| email.port | string | `nil` | Port of the SMTP server |
+| email.secure | bool | `false` | Enable a secure connection |
+| email.sender | string | `nil` | Sender for email alerting |
+| email.username | string | `nil` | Username for SMTP server |
+| email.usernameKey | string | `"username"` | Key used within secret for username |
+| envFromConfigMaps | list | `[]` | List of environment variables from existing configmaps |
+| envFromSecrets | list | `[]` | List of environment variables from existing secrets |
+| extraEnvSecrets | object | `{}` | Extra environment variables from secrets |
+| extraEnvVariables | object | `{}` | Extra environment variables from mapping |
+| extraInitContainers | list | `[]` | List of extra init containers |
+| extraSidecarContainers | list | `[]` | List of extra sidecar containers |
+| extraVolumeMounts | list | `[]` | List of extra volume mounts |
+| extraVolumes | list | `[]` | List of extra volumes |
+| fullnameOverride | string | `""` | Override the fullname |
+| general.additionalPythonPackages | list | `[]` | Additional Python packages |
+| general.gitClient | string | `"cmd_git"` | Use Git client implementation |
+| general.host | string | `nil` | Host to access Semaphore |
+| general.maxParallelTasks | int | `0` | Maximum parallel tasks |
+| general.nonAdminCanCreateProject | bool | `false` | Allow non-admins to create projects |
+| general.passwordLoginDisable | bool | `false` | Disable password login |
+| general.sshConfigPath | string | `nil` | Path to SSH config |
+| general.tmpPath | string | `"/tmp/semaphore"` | Working directory for Semaphore |
+| general.useRemoteRunner | bool | `false` | Enable usage of remote runners |
+| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
+| image.pullSecrets | list | `[]` | Optional name of pull secret if using a private registry |
+| image.repository | string | `"semaphoreui/semaphore"` | Image repository used by deployment |
+| image.tag | string | `""` | Optional tag for the repository, defaults to app version |
+| ingress.annotations | object | `{}` | Additional annotations for the ingress |
+| ingress.className | string | `nil` | Class name for the ingress resource |
+| ingress.enabled | bool | `false` | Enable ingress |
+| ingress.hosts | list | `[{"host":"example.local","paths":[{"path":"/","pathType":"Prefix"}]}]` | Host definition for ingress |
+| ingress.labels | object | `{}` | Additional labels for the ingress |
+| ingress.tls | list | `[]` | Optional TLS configuration for ingress |
+| labels | object | `{}` | Define additional labels |
+| ldap.binddn | string | `nil` | BindDN for LDAP authentication |
+| ldap.binddnKey | string | `"username"` | Key used within secret for username |
+| ldap.enable | bool | `false` | Enable LDAP authentication |
+| ldap.existingSecret | string | `nil` | Existing secret to use for ldap |
+| ldap.filter | string | `nil` | Search filter for LDAP |
+| ldap.mappings | object | `{"cn":"cn","dn":"dn","mail":"mail","uid":"uid"}` | Mapping for LDAP attributes |
+| ldap.needtls | bool | `false` | Enable TLS connection to LDAP |
+| ldap.password | string | `nil` | Password for LDAP authentication |
+| ldap.passwordKey | string | `"password"` | Key used within secret for username |
+| ldap.searchdn | string | `nil` | |
+| ldap.server | string | `nil` | Address of LDAP server |
+| mariadb.architecture | string | `"standalone"` | Architecture for mariadb |
+| mariadb.auth.database | string | `"semaphore"` | Database created for semaphore |
+| mariadb.auth.password | string | `nil` | Password for semaphore database |
+| mariadb.auth.username | string | `"semaphore"` | Username for semaphore database |
+| mariadb.enabled | bool | `false` | Enable mariadb dependency |
+| mariadb.fullnameOverride | string | `"mariadb"` | Override fullname of mariadb dependency |
+| mariadb.metrics.enabled | bool | `true` | Enable metrics for mariadb |
+| mariadb.metrics.serviceMonitor.enabled | bool | `false` | Enable service monitor for mariadb |
+| mariadb.serviceAccount.create | bool | `true` | Create service account for mariadb |
+| nameOverride | string | `""` | Override the name |
+| nodeSelector | object | `{}` | Node selector for the deployment |
+| oidc.enable | bool | `false` | Enable oidc authentication |
+| oidc.providers | object | `{}` | Dictionary of oidc providers |
+| persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes used for workdir volume |
+| persistence.enabled | bool | `true` | Enable persistence for workdir |
+| persistence.existingClaim | string | `nil` | Name of an already existing claim |
+| persistence.size | string | `"10G"` | Size for boltdb volume |
+| persistence.storageClass | string | `nil` | Storage class used for workdir volume |
+| podSecurityContext | object | `{}` | Security context for the pod |
+| postgresql.architecture | string | `"standalone"` | Architecture for postgresql |
+| postgresql.auth.database | string | `"semaphore"` | Database created for semaphore |
+| postgresql.auth.password | string | `nil` | Password for semaphore database |
+| postgresql.auth.username | string | `"semaphore"` | Username for semaphore database |
+| postgresql.enabled | bool | `false` | Enable postgresql dependency |
+| postgresql.fullnameOverride | string | `"postgresql"` | Override fullname of postgresql dependency |
+| postgresql.metrics.enabled | bool | `true` | Enable metrics for postgresql |
+| postgresql.metrics.serviceMonitor.enabled | bool | `false` | Enable service monitor for postgresql |
+| postgresql.serviceAccount.create | bool | `true` | Create service account for postgresql |
+| replicaCount | int | `1` | Replicas for the deployment |
+| resources | object | `{"limits":{},"requests":{"cpu":"100m","memory":"64Mi"}}` | Resources for the deployment |
+| runner.existingSecret | string | `nil` | Existing secret to use for runner |
+| runner.token | string | `nil` | Runner registration token |
+| runner.tokenKey | string | `"token"` | Key used within secret for token |
+| secrets.accesskeyEncryption | string | `nil` | Access key encryption secret, generated if not present |
+| secrets.accesskeyEncryptionKey | string | `"accesskeyEncryption"` | Key used within secret for accesskeyEncryption |
+| secrets.cookieEncryption | string | `nil` | Cookie encryption secret, generated if not present |
+| secrets.cookieEncryptionKey | string | `"cookieEncryption"` | Key used within secret for cookieEncryption |
+| secrets.cookieHash | string | `nil` | Cookie hash secret, generated if not present |
+| secrets.cookieHashKey | string | `"cookieHash"` | Key used within secret for cookieHash |
+| secrets.existingSecret | string | `nil` | Existing secret to use for secrets |
+| securityContext | object | `{"fsGroup":1001}` | Security context for the deployment |
+| service.annotations | object | `{}` | Additional annotations for the service |
+| service.internalPort | int | `3000` | Internal port of the service |
+| service.labels | object | `{}` | Additional labels for the service |
+| service.port | int | `3000` | Port of the service |
+| service.type | string | `"ClusterIP"` | Type of the service |
+| serviceAccount.annotations | object | `{}` | Define annotations for the service account |
+| serviceAccount.create | bool | `true` | Create a new service account |
+| serviceAccount.name | string | `""` | Optional name for an existing service account |
+| slack.alert | bool | `false` | Enable slack alerting |
+| slack.existingSecret | string | `nil` | Existing secret to use for slack |
+| slack.url | string | `nil` | URL used for slack |
+| slack.urlKey | string | `"url"` | Key used within secret for url |
+| telegram.alert | bool | `false` | Enable telegram alerting |
+| telegram.chat | string | `nil` | Chat used for telegram |
+| telegram.chatKey | string | `"chat"` | Key used within secret for chat |
+| telegram.existingSecret | string | `nil` | Existing secret to use for telegram |
+| telegram.token | string | `nil` | Token used for telegram |
+| telegram.tokenKey | string | `"token"` | Key used within secret for token |
+| tolerations | list | `[]` | Tolerations for the deployment |
+| updateStrategy | object | `{"type":"Recreate"}` | Update strategy for deployment |
diff --git a/charts/semaphore/README.md.gotmpl b/charts/semaphore/README.md.gotmpl
new file mode 100644
index 0000000..d98f469
--- /dev/null
+++ b/charts/semaphore/README.md.gotmpl
@@ -0,0 +1,141 @@
+# Semaphore UI official chart
+
+{{ template "chart.deprecationWarning" . }}
+
+{{ template "chart.badgesSection" . }}
+
+{{ template "chart.description" . }}
+
+{{ template "chart.homepageLine" . }}
+
+## Installing the Chart
+
+```console
+helm repo add semaphoreui https://semaphoreui.github.io/charts
+helm repo update
+```
+
+**Open-source version:**
+
+```console
+helm install {{ template "chart.name" . }} semaphoreui/{{ template "chart.name" . }}
+```
+
+**Pro version:**
+
+```console
+helm install {{ template "chart.name" . }} semaphoreui/{{ template "chart.name" . }} --set image.repository=public.ecr.aws/semaphore/pro/server
+```
+
+## Installing OCI from GitHub Container Registry (GitHub authentication required)
+
+**Open-source version:**
+
+```console
+helm install {{ template "chart.name" . }} oci://ghcr.io/semaphoreui/charts/{{ template "chart.name" . }}
+```
+
+**Pro version:**
+
+```console
+helm install {{ template "chart.name" . }} oci://ghcr.io/semaphoreui/charts/{{ template "chart.name" . }} --set image.repository=public.ecr.aws/semaphore/pro/server
+```
+
+## Example for Values
+
+### Create `admin` user
+
+```yml
+admin:
+ create: true
+ password: changeme
+```
+
+Now you can login with username `admin` and password `changeme`.
+
+### Ingress Enabled
+
+```yml
+ingress:
+ enabled: false
+
+ hosts:
+ - host: {{ template "chart.name" . }}.example.com
+ paths:
+ - path: /
+ pathType: Prefix
+
+### Custom CA bundle for on-prem Git (appended to ca-certificates.crt)
+
+```yml
+customCertificates:
+ enabled: true
+ existingSecret: my-custom-ca
+ key: ca.crt
+ mountPath: /etc/ssl/certs/ca-certificates.crt
+```
+```
+
+### Bundled MariaDB
+
+```console
+database:
+ type: mysql
+
+ host: mariadb
+ port: 3306
+
+ password: p455w0rd
+
+mariadb:
+ enabled: true
+
+ auth:
+ password: p455w0rd
+```
+
+### Bundled PostgreSQL
+
+```console
+database:
+ type: postgres
+
+ host: postgresql
+ port: 5432
+
+ usernameFromSecret: false
+ passwordKey: password
+ existingSecret: postgresql
+
+postgresql:
+ enabled: true
+
+ auth:
+ password: p455w0rd
+```
+
+### OpenID Connect
+
+```console
+oidc:
+ enable: true
+
+ providers:
+ keycloak:
+ display_name: Keycloak
+ provider_url: https://auth.example.com/auth/realms/example
+ redirect_url: https://semaphore.example.com/api/auth/oidc/keycloak/redirect
+ client_id: semaphore
+ client_secret: 0208901c-ecd7-46ae-931a-d03f02e8dcd2
+ username_claim: preferred_username
+ name_claim: preferred_username
+ email_claim: email
+```
+
+{{ template "chart.maintainersSection" . }}
+
+{{ template "chart.sourcesSection" . }}
+
+{{ template "chart.requirementsSection" . }}
+
+{{ template "chart.valuesSection" . }}
diff --git a/charts/semaphore/charts/mariadb/.helmignore b/charts/semaphore/charts/mariadb/.helmignore
new file mode 100644
index 0000000..207983f
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/.helmignore
@@ -0,0 +1,25 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+# img folder
+img/
+# Changelog
+CHANGELOG.md
diff --git a/charts/semaphore/charts/mariadb/.relok8s-images.yaml b/charts/semaphore/charts/mariadb/.relok8s-images.yaml
new file mode 100644
index 0000000..8bbff8c
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/.relok8s-images.yaml
@@ -0,0 +1,13 @@
+# relok8s image hints file
+# This file makes this Helm Chart relocatable by relok8s
+# More info here https://github.com/vmware-tanzu/asset-relocation-tool-for-kubernetes
+#
+# mariadb chart
+
+# mariadb image
+- "{{.image.registry}}/{{.image.repository}}:{{.image.tag}}"
+# mysqld-exporter image
+- "{{.metrics.image.registry}}/{{.metrics.image.repository}}:{{.metrics.image.tag}}"
+# os-shell image
+- "{{.volumePermissions.image.registry}}/{{.volumePermissions.image.repository}}:{{.volumePermissions.image.tag}}"
+
diff --git a/charts/semaphore/charts/mariadb/Chart.yaml b/charts/semaphore/charts/mariadb/Chart.yaml
new file mode 100644
index 0000000..d0ae15a
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/Chart.yaml
@@ -0,0 +1,40 @@
+annotations:
+ fips: "true"
+ images: |
+ - name: mariadb
+ version: 12.0.2
+ image: registry-1.docker.io/bitnami/mariadb:latest
+ - name: mysqld-exporter
+ version: 0.18.0
+ image: registry-1.docker.io/bitnami/mysqld-exporter:latest
+ - name: os-shell
+ version: "5"
+ image: registry-1.docker.io/bitnami/os-shell:latest
+ licenses: Apache-2.0
+ tanzuCategory: service
+apiVersion: v2
+appVersion: 12.0.2
+dependencies:
+- name: common
+ repository: oci://registry-1.docker.io/bitnamicharts
+ tags:
+ - bitnami-common
+ version: 2.33.1
+description: MariaDB is an open source, community-developed SQL database server that
+ is widely in use around the world due to its enterprise features, flexibility, and
+ collaboration with leading tech firms.
+home: https://bitnami.com
+icon: https://dyltqmyl993wv.cloudfront.net/assets/stacks/mariadb/img/mariadb-stack-220x234.png
+keywords:
+- mariadb
+- mysql
+- database
+- sql
+- prometheus
+maintainers:
+- name: Broadcom, Inc. All Rights Reserved.
+ url: https://github.com/bitnami/charts
+name: mariadb
+sources:
+- https://github.com/bitnami/charts/tree/main/bitnami/mariadb
+version: 23.2.2
diff --git a/charts/semaphore/charts/mariadb/README.md b/charts/semaphore/charts/mariadb/README.md
new file mode 100644
index 0000000..34dfdb3
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/README.md
@@ -0,0 +1,924 @@
+
+
+# Bitnami Secure Images Helm chart for MariaDB
+
+MariaDB is an open source, community-developed SQL database server that is widely in use around the world due to its enterprise features, flexibility, and collaboration with leading tech firms.
+
+[Overview of MariaDB](https://mariadb.org/)
+
+Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
+
+## TL;DR
+
+```console
+helm install my-release oci://MY-OCI-REGISTRY/mariadb
+```
+
+Looking to use MariaDB in production? Try [VMware Tanzu Application Catalog](https://bitnami.com/enterprise), the commercial edition of the Bitnami catalog.
+
+## ⚠️ Important Notice: Upcoming changes to the Bitnami Catalog
+
+Beginning August 28th, 2025, Bitnami will evolve its public catalog to offer a curated set of hardened, security-focused images under the new [Bitnami Secure Images initiative](https://news.broadcom.com/app-dev/broadcom-introduces-bitnami-secure-images-for-production-ready-containerized-applications). As part of this transition:
+
+- Granting community users access for the first time to security-optimized versions of popular container images.
+- Bitnami will begin deprecating support for non-hardened, Debian-based software images in its free tier and will gradually remove non-latest tags from the public catalog. As a result, community users will have access to a reduced number of hardened images. These images are published only under the “latest” tag and are intended for development purposes
+- Starting August 28th, over two weeks, all existing container images, including older or versioned tags (e.g., 2.50.0, 10.6), will be migrated from the public catalog (docker.io/bitnami) to the “Bitnami Legacy” repository (docker.io/bitnamilegacy), where they will no longer receive updates.
+- For production workloads and long-term support, users are encouraged to adopt Bitnami Secure Images, which include hardened containers, smaller attack surfaces, CVE transparency (via VEX/KEV), SBOMs, and enterprise support.
+
+These changes aim to improve the security posture of all Bitnami users by promoting best practices for software supply chain integrity and up-to-date deployments. For more details, visit the [Bitnami Secure Images announcement](https://github.com/bitnami/containers/issues/83267).
+
+## Introduction
+
+This chart bootstraps a [MariaDB](https://github.com/bitnami/containers/tree/main/bitnami/mariadb) replication cluster deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
+
+MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features.
+
+## Prerequisites
+
+- Kubernetes 1.23+
+- Helm 3.8.0+
+- PV provisioner support in the underlying infrastructure
+
+## Installing the Chart
+
+To install the chart with the release name `my-release`:
+
+```console
+helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/mariadb
+```
+
+> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
+
+The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
+
+> **Tip**: List all releases using `helm list`
+
+## Configuration and installation details
+
+### Resource requests and limits
+
+Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the `resources` value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.
+
+To make this process easier, the chart contains the `resourcesPreset` values, which automatically sets the `resources` section according to different presets. Check these presets in [the bitnami/common chart](https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15). However, in production workloads using `resourcesPreset` is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the [official Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/).
+
+### Prometheus metrics
+
+This chart can be integrated with Prometheus by setting `metrics.enabled` to `true`. This will deploy a sidecar container with [mysqld_exporter](https://github.com/prometheus/mysqld_exporter) in all pods and will expose it via the MariaDB service. This service will have the necessary annotations to be automatically scraped by Prometheus.
+
+#### Prometheus requirements
+
+It is necessary to have a working installation of Prometheus or Prometheus Operator for the integration to work. Install the [Bitnami Prometheus helm chart](https://github.com/bitnami/charts/tree/main/bitnami/prometheus) or the [Bitnami Kube Prometheus helm chart](https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus) to easily have a working Prometheus in your cluster.
+
+#### Integration with Prometheus Operator
+
+The chart can deploy `ServiceMonitor` objects for integration with Prometheus Operator installations. To do so, set the value `metrics.serviceMonitor.enabled=true`. Ensure that the Prometheus Operator `CustomResourceDefinitions` are installed in the cluster or it will fail with the following error:
+
+```text
+no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
+```
+
+Install the [Bitnami Kube Prometheus helm chart](https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus) for having the necessary CRDs and the Prometheus Operator.
+
+### [Rolling VS Immutable tags](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-understand-rolling-tags-containers-index.html)
+
+It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
+
+Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
+
+### Change MariaDB version
+
+To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters.
+
+### Update credentials
+
+Bitnami charts, with its default settings, configure credentials at first boot. Any further change in the secrets or credentials can be done using one of the following methods:
+
+### Manual update of the passwords and secrets
+
+- Update the user password following [the upstream documentation](https://milvus.io/docs/authenticate.md#Update-user-password)
+- Update the password secret with the new values (replace the SECRET_NAME, PASSWORD and ROOT_PASSWORD placeholders)
+
+```shell
+kubectl create secret generic SECRET_NAME --from-literal=password=PASSWORD --from-literal=root-password=ROOT_PASSWORD --dry-run -o yaml | kubectl apply -f -
+```
+
+### Automated update using a password update job
+
+The Bitnami MariaDB provides a password update job that will automatically change the MariaDB passwords when running helm upgrade. To enable the job set `passwordUpdateJob.enabled=true`. This job requires:
+
+- The new passwords: this is configured using either `auth.rootPassword`, `auth.password` and `auth.replicationPassword` (if applicable) or setting `auth.existingSecret`.
+- The previous passwords: This value is taken automatically from already deployed secret object. If you are using `auth.existingSecret` or `helm template` instead of `helm upgrade`, then set either `passwordUpdate.job.previousPasswords.rootPassword`, `passwordUpdate.job.previousPasswords.password`, `passwordUpdate.job.previousPasswords.replicationPassword` (when applicable), setting `auth.existingSecret`.
+
+In the following example we update the password via values.yaml in a mariadb installation with replication
+
+```yaml
+architecture: "replication"
+
+auth:
+ user: "user"
+ rootPassword: "newRootPassword123"
+ password: "newUserPassword123"
+ replicationPassword: "newReplicationPassword123"
+
+passwordUpdateJob:
+ enabled: true
+```
+
+In this example we use two existing secrets (`new-password-secret` and `previous-password-secret`) to update the passwords:
+
+```yaml
+auth:
+ existingSecret: new-password-secret
+
+passwordUpdateJob:
+ enabled: true
+ previousPasswords:
+ existingSecret: previous-password-secret
+```
+
+You can add extra update commands using the `passwordUpdateJob.extraCommands` value.
+
+### Initialize a fresh instance
+
+The [Bitnami MariaDB](https://github.com/bitnami/containers/tree/main/bitnami/mariadb) image allows you to use your custom scripts to initialize a fresh instance. Custom scripts may be specified using the `initdbScripts` parameter. Alternatively, an external ConfigMap may be created with all the initialization scripts and the ConfigMap passed to the chart via the `initdbScriptsConfigMap` parameter. Note that this will override the `initdbScripts` parameter.
+
+The allowed extensions are `.sh`, `.sql` and `.sql.gz`.
+
+These scripts are treated differently depending on their extension. While `.sh` scripts are executed on all the nodes, `.sql` and `.sql.gz` scripts are only executed on the primary nodes. This is because `.sh` scripts support conditional tests to identify the type of node they are running on, while such tests are not supported in `.sql` or `.sql.gz` files.
+
+When using a `.sh` script, you may wish to perform a "one-time" action like creating a database. This can be achieved by adding a condition in the script to ensure that it is executed only on one node, as shown in the example below:
+
+```yaml
+initdbScripts:
+ my_init_script.sh: |
+ #!/bin/sh
+ if [[ $(hostname) == *primary* ]]; then
+ echo "Primary node"
+ mysql -P 3306 -uroot -prandompassword -e "create database new_database";
+ else
+ echo "No primary node"
+ fi
+```
+
+### Securing traffic using TLS
+
+This chart supports encrypting communications using TLS. To enable this feature, set the `tls.enabled`.
+
+It is necessary to create a secret containing the TLS certificates and pass it to the chart via the `tls.existingSecret` parameter. Every secret should contain a `tls.crt` and `tls.key` keys including the certificate and key files respectively and, optionally, a `ca.crt` key including the CA certificate. For example: create the secret with the certificates files:
+
+```console
+kubectl create secret generic tls-secret --from-file=./tls.crt --from-file=./tls.key --from-file=./ca.crt
+```
+
+You can manually create the required TLS certificates or relying on the chart auto-generation capabilities. The chart supports two different ways to auto-generate the required certificates:
+
+- Using Helm capabilities. Enable this feature by setting `tls.autoGenerated.enabled` to `true` and `tls.autoGenerated.engine` to `helm`.
+- Relying on CertManager (please note it's required to have CertManager installed in your K8s cluster). Enable this feature by setting `tls.autoGenerated.enabled` to `true` and `tls.autoGenerated.engine` to `cert-manager`. Please note it's supported to use an existing Issuer/ClusterIssuer for issuing the TLS certificates by setting the `tls.autoGenerated.certManager.existingIssuer` and `tls.autoGenerated.certManager.existingIssuerKind` parameters.
+
+### Securing data at rest using Transparent Data Encryption
+
+This chart supports encrypting data at rest using Transparent Data Encryption (TDE). To enable this feature, set the `tde.enabled`.
+
+The chart supports two different ways to enable TDE:
+
+- Using Kubernetes secret to store the encryption keys. Enable this feature by setting `tde.enabled` to `true` and `tde.existingSecret` to the name of the secret containing the random key and the encrypted TDE key.
+- Using the Secrets Store CSI Driver to store the encryption keys. Enable this feature by setting `tde.enabled` to `true` and `tde.secretsStoreProvider.enabled` to `true`. Currently only the `vault` provider is supported and requires further parameters to be set for secret keys and paths to the encryption keys.
+
+To simplify the configuration the chart defaults most configuration values for TDE and [file key management encryption plugin](https://mariadb.com/kb/en/file-key-management-encryption-plugin/). For more information, on creating the required keys to enable TDE please refer to the mariaDB blog post [here](https://mariadb.com/resources/blog/mariadb-encryption-tde-using-mariadbs-file-key-management-encryption-plugin/).
+
+> NOTE: The `tde.enabled` parameter impacts recoverability of the MariaDB data. If you enable TDE, the MariaDB data cannot be recovered if your encryption keys are lost. Always backup your encryption keys and store in a secure location outside of the cluster.
+
+#### Using Kubernetes secret to store the encryption keys
+
+To enable TDE using Kubernetes secret, create a secret containing the random key and the encrypted TDE key.
+
+```console
+kubectl create secret generic mariadb-tde-secret --namespace=mariadb \
+ --from-file=./mariadb/encryption/keyfile.key \
+ --from-file=./mariadb/encryption/keyfile.enc
+```
+
+#### Using the Secrets Store CSI Driver to store the encryption keys in Hashicorp Vault
+
+To enable TDE using the Secrets Store CSI Driver, create a secret containing the random key and the encrypted TDE key. When using the Secrets Store CSI Driver, the `tde.secretsStoreProvider.vault` parameters should be configured. Secrets in Hashicorp Vault are used to store the random key and the encrypted TDE key. The key files must be stored as base64 encoded values.
+
+```console
+export KEYFILE_KEY=$(cat ./mariadb/encryption/keyfile.key|base64)
+export KEYFILE_ENC=$(cat ./mariadb/encryption/keyfile.enc|base64)
+
+vault kv put secrets-kv/keyfile key="$KEYFILE_KEY" enc="$KEYFILE_ENC"
+```
+
+The `SecretProviderClass` for `vault` at minimum requires the `tde.secretsStoreProvider.vault.roleName`, `tde.secretsStoreProvider.vault.*KeySecretPath` and `tde.secretsStoreProvider.vault.*SecretKey` parameters to be set for the secret values to properly be mounted.
+
+>NOTE: This guide does not include configuration for the Secrets Store CSI Driver or Hashicorp Vault provider which are prerequisites for enabling TDE with the Secrets Store CSI Driver.
+
+### Sidecars and Init Containers
+
+If additional containers are needed in the same pod as MariaDB (such as additional metrics or logging exporters), they can be defined using the `sidecars` parameter.
+
+```yaml
+sidecars:
+- name: your-image-name
+ image: your-image
+ imagePullPolicy: Always
+ ports:
+ - name: portname
+ containerPort: 1234
+```
+
+If these sidecars export extra ports, extra port definitions can be added using the `service.extraPorts` parameter (where available), as shown in the example below:
+
+```yaml
+service:
+ extraPorts:
+ - name: extraPort
+ port: 11311
+ targetPort: 11311
+```
+
+> NOTE: This Helm chart already includes sidecar containers for the Prometheus exporters (where applicable). These can be activated by adding the `--enable-metrics=true` parameter at deployment time. The `sidecars` parameter should therefore only be used for any extra sidecar containers.
+
+If additional init containers are needed in the same pod, they can be defined using the `initContainers` parameter. Here is an example:
+
+```yaml
+initContainers:
+ - name: your-image-name
+ image: your-image
+ imagePullPolicy: Always
+ ports:
+ - name: portname
+ containerPort: 1234
+```
+
+Learn more about [sidecar containers](https://kubernetes.io/docs/concepts/workloads/pods/) and [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/).
+
+### Backup and restore
+
+To back up and restore Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using [Velero](https://velero.io/), a Kubernetes backup/restore tool. Find the instructions for using Velero in [this guide](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-backup-restore-deployments-velero-index.html).
+
+### FIPS parameters
+
+The FIPS parameters only have effect if you are using images from the [Bitnami Secure Images catalog](https://www.arrow.com/globalecs/uk/products/bitnami-secure-images/).
+
+For more information on this new support, please refer to the [FIPS Compliance section](https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-doc/security-frameworks-FIPS-compliance.html).
+
+## Persistence
+
+The [Bitnami MariaDB](https://github.com/bitnami/containers/tree/main/bitnami/mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container.
+
+The chart mounts a [Persistent Volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can also be defined.
+
+If you encounter errors when working with persistent volumes, refer to our [troubleshooting guide for persistent volumes](https://docs.bitnami.com/kubernetes/faq/troubleshooting/troubleshooting-persistence-volumes/).
+
+### Adjust permissions of persistent volume mountpoint
+
+As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it.
+
+By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions.
+
+As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. You can enable this initContainer by setting `volumePermissions.enabled` to `true`.
+
+## Parameters
+
+### Global parameters
+
+| Name | Description | Value |
+| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
+| `global.imageRegistry` | Global Docker Image registry | `""` |
+| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
+| `global.defaultStorageClass` | Global default StorageClass for Persistent Volume(s) | `""` |
+| `global.defaultFips` | Default value for the FIPS configuration (allowed values: '', restricted, relaxed, off). Can be overriden by the 'fips' object | `restricted` |
+| `global.security.allowInsecureImages` | Allows skipping image verification | `false` |
+| `global.compatibility.openshift.adaptSecurityContext` | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | `auto` |
+
+### Common parameters
+
+| Name | Description | Value |
+| ------------------------- | --------------------------------------------------------------------------------------- | --------------- |
+| `kubeVersion` | Force target Kubernetes version (using Helm capabilities if not set) | `""` |
+| `nameOverride` | String to partially override mariadb.fullname | `""` |
+| `fullnameOverride` | String to fully override mariadb.fullname | `""` |
+| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
+| `commonAnnotations` | Common annotations to add to all MariaDB resources (sub-charts are not considered) | `{}` |
+| `commonLabels` | Common labels to add to all MariaDB resources (sub-charts are not considered) | `{}` |
+| `schedulerName` | Name of the scheduler (other than default) to dispatch pods | `""` |
+| `runtimeClassName` | Name of the Runtime Class for all MariaDB pods | `""` |
+| `extraDeploy` | Array of extra objects to deploy with the release (evaluated as a template) | `[]` |
+| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
+| `diagnosticMode.command` | Command to override all containers in the deployment | `["sleep"]` |
+| `diagnosticMode.args` | Args to override all containers in the deployment | `["infinity"]` |
+| `serviceBindings.enabled` | Create secret for service binding (Experimental) | `false` |
+
+### MariaDB common parameters
+
+| Name | Description | Value |
+| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
+| `image.registry` | MariaDB image registry | `REGISTRY_NAME` |
+| `image.repository` | MariaDB image repository | `REPOSITORY_NAME/mariadb` |
+| `image.digest` | MariaDB image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
+| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` |
+| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
+| `image.debug` | Specify if debug logs should be enabled | `false` |
+| `architecture` | MariaDB architecture (`standalone` or `replication`) | `standalone` |
+| `auth.rootPassword` | Password for the `root` user. Ignored if existing secret is provided. | `""` |
+| `auth.database` | Name for a custom database to create | `my_database` |
+| `auth.username` | Name for a custom user to create | `""` |
+| `auth.password` | Password for the new user. Ignored if existing secret is provided | `""` |
+| `auth.replicationUser` | MariaDB replication user | `replicator` |
+| `auth.replicationPassword` | MariaDB replication user password. Ignored if existing secret is provided | `""` |
+| `auth.existingSecret` | Use existing secret for password details (`auth.rootPassword`, `auth.password`, `auth.replicationPassword` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password` | `""` |
+| `auth.forcePassword` | Force users to specify required passwords | `false` |
+| `auth.usePasswordFiles` | Mount credentials as files instead of using environment variables | `true` |
+| `auth.customPasswordFiles` | Use custom password files when `auth.usePasswordFiles` is set to `true`. Define path for keys `root` and `user`, also define `replicator` if `architecture` is set to `replication` | `{}` |
+| `initdbScripts` | Dictionary of initdb scripts | `{}` |
+| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `""` |
+
+### TLS/SSL parameters
+
+| Name | Description | Value |
+| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | --------- |
+| `tls.enabled` | Enable TLS in MariaDB | `false` |
+| `tls.existingSecret` | Existing secret that contains TLS certificates | `""` |
+| `tls.certFilename` | The secret key from the existingSecret if 'cert' key different from the default (tls.crt) | `tls.crt` |
+| `tls.certKeyFilename` | The secret key from the existingSecret if 'key' key different from the default (tls.key) | `tls.key` |
+| `tls.certCAFilename` | The secret key from the existingSecret if 'ca' key different from the default (tls.crt) | `""` |
+| `tls.ca` | CA certificate for TLS. Ignored if `tls.existingSecret` is set | `""` |
+| `tls.cert` | TLS certificate for MariaDB. Ignored if `tls.existingSecret` is set | `""` |
+| `tls.key` | TLS key for MariaDB. Ignored if `tls.existingSecret` is set | `""` |
+| `tls.autoGenerated.enabled` | Enable automatic generation of TLS certificates | `true` |
+| `tls.autoGenerated.engine` | Mechanism to generate the certificates (allowed values: helm, cert-manager) | `helm` |
+| `tls.autoGenerated.extraSANs` | Extra Subject Alternative Names (SANs) for generated certificates | `[]` |
+| `tls.autoGenerated.loopback` | Add loopback SANs (localhost and 127.0.0.1) to generated certificates | `false` |
+| `tls.autoGenerated.certManager.existingIssuer` | The name of an existing Issuer to use for generating the certificates (only for `cert-manager` engine) | `""` |
+| `tls.autoGenerated.certManager.existingIssuerKind` | Existing Issuer kind, defaults to Issuer (only for `cert-manager` engine) | `""` |
+| `tls.autoGenerated.certManager.keyAlgorithm` | Key algorithm for the certificates (only for `cert-manager` engine) | `RSA` |
+| `tls.autoGenerated.certManager.keySize` | Key size for the certificates (only for `cert-manager` engine) | `2048` |
+| `tls.autoGenerated.certManager.duration` | Duration for the certificates (only for `cert-manager` engine) | `2160h` |
+| `tls.autoGenerated.certManager.renewBefore` | Renewal period for the certificates (only for `cert-manager` engine) | `360h` |
+
+### Transparent Data Encryption parameters
+
+| Name | Description | Value |
+| ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
+| `tde.enabled` | Enable Transparent Data Encryption using the File Key Management Encryption Plugin for MariaDB | `false` |
+| `tde.existingSecret` | Existing secret that contains Transparent Data Encryption key files used when secretsStoreProvider is not enabled | `""` |
+| `tde.randomKeyFilename` | File name of the 'random keyfile' when it is different from the default (keyfile.key), is also used for key name in the existingSecret | `keyfile.key` |
+| `tde.encryptedKeyFilename` | File name of the 'encrypted keyfile' when it is different from the default (keyfile.enc), is also used for key name in the existingSecret | `keyfile.enc` |
+| `tde.fileKeyManagementEncryptionAlgorithm` | Encryption algorithm used for encrypting data (allowed values: AES_CTR, AES_CBC | default: AES_CTR) | `AES_CTR` |
+| `tde.innodbEncryptTables` | Enables automatic encryption of all InnoDB tablespaces (allowed values: FORCE, ON, OFF | default: FORCE) | `FORCE` |
+| `tde.innodbEncryptLog` | Enables encryption of the InnoDB redo log (allowed values: ON, OFF | default: ON) | `ON` |
+| `tde.innodbEncryptTemporaryTables` | Enables automatic encryption of the InnoDB temporary tablespace (allowed values: ON, OFF | default: ON) | `ON` |
+| `tde.innodbEncryptionThreads` | Number of threads to use for encryption (default: 4) | `4` |
+| `tde.encryptTmpDiskTables` | Enables automatic encryption of all internal on-disk temporary tables that are created during query execution (allowed values: ON, OFF | default: ON) | `ON` |
+| `tde.encryptTmpTiles` | Enables automatic encryption of temporary files, such as those created for filesort operations, binary log file caches, etc. (allowed values: ON, OFF | default: ON) | `ON` |
+| `tde.encryptBINLOG` | Enables encrypting binary logs including relay logs (allowed values: ON, OFF | default: ON) | `ON` |
+| `tde.ariaEncryptTables` | Enables automatic encryption of all Aria tablespaces (allowed values: ON, OFF | default: ON) | `ON` |
+| `tde.secretsStoreProvider.enabled` | Enable use of secrets store provider for Transparent Data Encryption key files | `false` |
+| `tde.secretsStoreProvider.provider` | Type of provider used in secrets store provider class (allowed values: vault) | `vault` |
+| `tde.secretsStoreProvider.vault.roleName` | The name of the HashiCorp Vault role used for accessing the key files (only for `vault` provider) | `""` |
+| `tde.secretsStoreProvider.vault.address` | The URL of the HashiCorp Vault server (only for `vault` provider) | `""` |
+| `tde.secretsStoreProvider.vault.authMountPath` | The HashiCorp Vault auth mount path (only for `vault` provider) | `""` |
+| `tde.secretsStoreProvider.vault.randomKeySecretPath` | The HashiCorp Vault secret path for the 'random keyfile' (only for `vault` provider) | `""` |
+| `tde.secretsStoreProvider.vault.randomKeySecretKey` | The HashiCorp Vault secret key for the 'random keyfile' (only for `vault` provider) | `""` |
+| `tde.secretsStoreProvider.vault.encryptedKeySecretPath` | The HashiCorp Vault secret path for the 'encrypted keyfile' (only for `vault` provider) | `""` |
+| `tde.secretsStoreProvider.vault.encryptedKeySecretKey` | The HashiCorp Vault secret key for the 'encrypted keyfile' (only for `vault` provider) | `""` |
+
+### MariaDB Primary parameters
+
+| Name | Description | Value |
+| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |
+| `primary.name` | Name of the primary database (eg primary, master, leader, ...) | `primary` |
+| `primary.command` | Override default container command on MariaDB Primary container(s) (useful when using custom images) | `[]` |
+| `primary.args` | Override default container args on MariaDB Primary container(s) (useful when using custom images) | `[]` |
+| `primary.lifecycleHooks` | for the MariaDB Primary container(s) to automate configuration before or after startup | `{}` |
+| `primary.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
+| `primary.hostAliases` | Add deployment host aliases | `[]` |
+| `primary.containerPorts.mysql` | Container port for mysql | `3306` |
+| `primary.configuration` | MariaDB Primary configuration to be injected as ConfigMap | `""` |
+| `primary.existingConfigmap` | Name of existing ConfigMap with MariaDB Primary configuration. | `""` |
+| `primary.updateStrategy.type` | MariaDB primary statefulset strategy type | `RollingUpdate` |
+| `primary.rollingUpdatePartition` | Partition update strategy for Mariadb Primary statefulset | `""` |
+| `primary.podAnnotations` | Additional pod annotations for MariaDB primary pods | `{}` |
+| `primary.podLabels` | Extra labels for MariaDB primary pods | `{}` |
+| `primary.podAffinityPreset` | MariaDB primary pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `""` |
+| `primary.podAntiAffinityPreset` | MariaDB primary pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
+| `primary.nodeAffinityPreset.type` | MariaDB primary node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `""` |
+| `primary.nodeAffinityPreset.key` | MariaDB primary node label key to match Ignored if `primary.affinity` is set. | `""` |
+| `primary.nodeAffinityPreset.values` | MariaDB primary node label values to match. Ignored if `primary.affinity` is set. | `[]` |
+| `primary.affinity` | Affinity for MariaDB primary pods assignment | `{}` |
+| `primary.nodeSelector` | Node labels for MariaDB primary pods assignment | `{}` |
+| `primary.tolerations` | Tolerations for MariaDB primary pods assignment | `[]` |
+| `primary.schedulerName` | Name of the k8s scheduler (other than default) | `""` |
+| `primary.terminationGracePeriodSeconds` | In seconds, time the given to the MySQL primary pod needs to terminate gracefully | `""` |
+| `primary.podManagementPolicy` | podManagementPolicy to manage scaling operation of MariaDB primary pods | `""` |
+| `primary.topologySpreadConstraints` | Topology Spread Constraints for MariaDB primary pods assignment | `[]` |
+| `primary.priorityClassName` | Priority class for MariaDB primary pods assignment | `""` |
+| `primary.runtimeClassName` | Runtime Class for MariaDB primary pods | `""` |
+| `primary.podSecurityContext.enabled` | Enable security context for MariaDB primary pods | `true` |
+| `primary.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` |
+| `primary.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` |
+| `primary.podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` |
+| `primary.podSecurityContext.fsGroup` | Group ID for the mounted volumes' filesystem | `1001` |
+| `primary.containerSecurityContext.enabled` | MariaDB primary container securityContext | `true` |
+| `primary.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
+| `primary.containerSecurityContext.runAsUser` | User ID for the MariaDB primary container | `1001` |
+| `primary.containerSecurityContext.runAsGroup` | Group ID for the MariaDB primary container | `1001` |
+| `primary.containerSecurityContext.runAsNonRoot` | Set primary container's Security Context runAsNonRoot | `true` |
+| `primary.containerSecurityContext.privileged` | Set primary container's Security Context privileged | `false` |
+| `primary.containerSecurityContext.allowPrivilegeEscalation` | Set primary container's Security Context allowPrivilegeEscalation | `false` |
+| `primary.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
+| `primary.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
+| `primary.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
+| `primary.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if primary.resources is set (primary.resources is recommended for production). | `small` |
+| `primary.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
+| `primary.fips.openssl` | Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used | `""` |
+| `primary.startupProbe.enabled` | Enable startupProbe | `false` |
+| `primary.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `120` |
+| `primary.startupProbe.periodSeconds` | Period seconds for startupProbe | `15` |
+| `primary.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` |
+| `primary.startupProbe.failureThreshold` | Failure threshold for startupProbe | `10` |
+| `primary.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
+| `primary.livenessProbe.enabled` | Enable livenessProbe | `true` |
+| `primary.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `120` |
+| `primary.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
+| `primary.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `1` |
+| `primary.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
+| `primary.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
+| `primary.readinessProbe.enabled` | Enable readinessProbe | `true` |
+| `primary.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `30` |
+| `primary.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
+| `primary.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
+| `primary.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
+| `primary.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
+| `primary.customStartupProbe` | Override default startup probe for MariaDB primary containers | `{}` |
+| `primary.customLivenessProbe` | Override default liveness probe for MariaDB primary containers | `{}` |
+| `primary.customReadinessProbe` | Override default readiness probe for MariaDB primary containers | `{}` |
+| `primary.startupWaitOptions` | Override default builtin startup wait check options for MariaDB primary containers | `{}` |
+| `primary.extraFlags` | MariaDB primary additional command line flags | `""` |
+| `primary.extraEnvVars` | Extra environment variables to be set on MariaDB primary containers | `[]` |
+| `primary.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for MariaDB primary containers | `""` |
+| `primary.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for MariaDB primary containers | `""` |
+| `primary.persistence.enabled` | Enable persistence on MariaDB primary replicas using a `PersistentVolumeClaim`. If false, use emptyDir | `true` |
+| `primary.persistence.existingClaim` | Name of an existing `PersistentVolumeClaim` for MariaDB primary replicas | `""` |
+| `primary.persistence.subPath` | Subdirectory of the volume to mount at | `""` |
+| `primary.persistence.storageClass` | MariaDB primary persistent volume storage Class | `""` |
+| `primary.persistence.labels` | Labels for the PVC | `{}` |
+| `primary.persistence.annotations` | MariaDB primary persistent volume claim annotations | `{}` |
+| `primary.persistence.accessModes` | MariaDB primary persistent volume access Modes | `["ReadWriteOnce"]` |
+| `primary.persistence.size` | MariaDB primary persistent volume size | `8Gi` |
+| `primary.persistence.selector` | Selector to match an existing Persistent Volume | `{}` |
+| `primary.extraVolumes` | Optionally specify extra list of additional volumes to the MariaDB Primary pod(s) | `[]` |
+| `primary.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the MariaDB Primary container(s) | `[]` |
+| `primary.initContainers` | Add additional init containers for the MariaDB Primary pod(s) | `[]` |
+| `primary.sidecars` | Add additional sidecar containers for the MariaDB Primary pod(s) | `[]` |
+| `primary.service.type` | MariaDB Primary Kubernetes service type | `ClusterIP` |
+| `primary.service.ports.mysql` | MariaDB Primary Kubernetes service port for MariaDB | `3306` |
+| `primary.service.ports.metrics` | MariaDB Primary Kubernetes service port for metrics | `9104` |
+| `primary.service.nodePorts.mysql` | MariaDB Primary Kubernetes service node port | `""` |
+| `primary.service.clusterIP` | MariaDB Primary Kubernetes service clusterIP IP | `""` |
+| `primary.service.loadBalancerIP` | MariaDB Primary loadBalancerIP if service type is `LoadBalancer` | `""` |
+| `primary.service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
+| `primary.service.loadBalancerSourceRanges` | Address that are allowed when MariaDB Primary service is LoadBalancer | `[]` |
+| `primary.service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` |
+| `primary.service.annotations` | Provide any additional annotations which may be required | `{}` |
+| `primary.service.sessionAffinity` | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | `None` |
+| `primary.service.sessionAffinityConfig` | Additional settings for the sessionAffinity. Ignored if `primary.service.sessionAffinity` is `None` | `{}` |
+| `primary.service.headless.annotations` | Annotations of the headless service | `{}` |
+| `primary.pdb.create` | Enable/disable a Pod Disruption Budget creation for MariaDB primary pods | `true` |
+| `primary.pdb.minAvailable` | Minimum number/percentage of MariaDB primary pods that must still be available after the eviction | `""` |
+| `primary.pdb.maxUnavailable` | Maximum number/percentage of MariaDB primary pods that can be unavailable after the eviction. Defaults to `1` if both `primary.pdb.minAvailable` and `primary.pdb.maxUnavailable` are empty. | `""` |
+| `primary.revisionHistoryLimit` | Maximum number of revisions that will be maintained in the StatefulSet | `10` |
+
+### MariaDB Secondary parameters
+
+| Name | Description | Value |
+| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |
+| `secondary.name` | Name of the secondary database (eg secondary, slave, ...) | `secondary` |
+| `secondary.replicaCount` | Number of MariaDB secondary replicas | `1` |
+| `secondary.command` | Override default container command on MariaDB Secondary container(s) (useful when using custom images) | `[]` |
+| `secondary.args` | Override default container args on MariaDB Secondary container(s) (useful when using custom images) | `[]` |
+| `secondary.lifecycleHooks` | for the MariaDB Secondary container(s) to automate configuration before or after startup | `{}` |
+| `secondary.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
+| `secondary.hostAliases` | Add deployment host aliases | `[]` |
+| `secondary.containerPorts.mysql` | Container port for mysql | `3306` |
+| `secondary.configuration` | MariaDB Secondary configuration to be injected as ConfigMap | `""` |
+| `secondary.existingConfigmap` | Name of existing ConfigMap with MariaDB Secondary configuration. | `""` |
+| `secondary.updateStrategy.type` | MariaDB secondary statefulset strategy type | `RollingUpdate` |
+| `secondary.rollingUpdatePartition` | Partition update strategy for Mariadb Secondary statefulset | `""` |
+| `secondary.podAnnotations` | Additional pod annotations for MariaDB secondary pods | `{}` |
+| `secondary.podLabels` | Extra labels for MariaDB secondary pods | `{}` |
+| `secondary.podAffinityPreset` | MariaDB secondary pod affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard` | `""` |
+| `secondary.podAntiAffinityPreset` | MariaDB secondary pod anti-affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
+| `secondary.nodeAffinityPreset.type` | MariaDB secondary node affinity preset type. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard` | `""` |
+| `secondary.nodeAffinityPreset.key` | MariaDB secondary node label key to match Ignored if `secondary.affinity` is set. | `""` |
+| `secondary.nodeAffinityPreset.values` | MariaDB secondary node label values to match. Ignored if `secondary.affinity` is set. | `[]` |
+| `secondary.affinity` | Affinity for MariaDB secondary pods assignment | `{}` |
+| `secondary.nodeSelector` | Node labels for MariaDB secondary pods assignment | `{}` |
+| `secondary.tolerations` | Tolerations for MariaDB secondary pods assignment | `[]` |
+| `secondary.topologySpreadConstraints` | Topology Spread Constraints for MariaDB secondary pods assignment | `[]` |
+| `secondary.priorityClassName` | Priority class for MariaDB secondary pods assignment | `""` |
+| `secondary.runtimeClassName` | Runtime Class for MariaDB secondary pods | `""` |
+| `secondary.schedulerName` | Name of the k8s scheduler (other than default) | `""` |
+| `secondary.terminationGracePeriodSeconds` | In seconds, time the given to the MySQL secondary pod needs to terminate gracefully | `""` |
+| `secondary.podManagementPolicy` | podManagementPolicy to manage scaling operation of MariaDB secondary pods | `""` |
+| `secondary.podSecurityContext.enabled` | Enable security context for MariaDB secondary pods | `true` |
+| `secondary.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` |
+| `secondary.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` |
+| `secondary.podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` |
+| `secondary.podSecurityContext.fsGroup` | Group ID for the mounted volumes' filesystem | `1001` |
+| `secondary.containerSecurityContext.enabled` | MariaDB secondary container securityContext | `true` |
+| `secondary.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
+| `secondary.containerSecurityContext.runAsUser` | User ID for the MariaDB secondary container | `1001` |
+| `secondary.containerSecurityContext.runAsGroup` | Group ID for the MariaDB secondary container | `1001` |
+| `secondary.containerSecurityContext.runAsNonRoot` | Set secondary container's Security Context runAsNonRoot | `true` |
+| `secondary.containerSecurityContext.privileged` | Set secondary container's Security Context privileged | `false` |
+| `secondary.containerSecurityContext.allowPrivilegeEscalation` | Set secondary container's Security Context allowPrivilegeEscalation | `false` |
+| `secondary.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
+| `secondary.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
+| `secondary.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
+| `secondary.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if secondary.resources is set (secondary.resources is recommended for production). | `small` |
+| `secondary.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
+| `secondary.startupProbe.enabled` | Enable startupProbe | `false` |
+| `secondary.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `120` |
+| `secondary.startupProbe.periodSeconds` | Period seconds for startupProbe | `15` |
+| `secondary.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` |
+| `secondary.startupProbe.failureThreshold` | Failure threshold for startupProbe | `10` |
+| `secondary.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
+| `secondary.livenessProbe.enabled` | Enable livenessProbe | `true` |
+| `secondary.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `120` |
+| `secondary.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
+| `secondary.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `1` |
+| `secondary.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
+| `secondary.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
+| `secondary.readinessProbe.enabled` | Enable readinessProbe | `true` |
+| `secondary.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `30` |
+| `secondary.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
+| `secondary.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
+| `secondary.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
+| `secondary.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
+| `secondary.customStartupProbe` | Override default startup probe for MariaDB secondary containers | `{}` |
+| `secondary.customLivenessProbe` | Override default liveness probe for MariaDB secondary containers | `{}` |
+| `secondary.customReadinessProbe` | Override default readiness probe for MariaDB secondary containers | `{}` |
+| `secondary.startupWaitOptions` | Override default builtin startup wait check options for MariaDB secondary containers | `{}` |
+| `secondary.extraFlags` | MariaDB secondary additional command line flags | `""` |
+| `secondary.extraEnvVars` | Extra environment variables to be set on MariaDB secondary containers | `[]` |
+| `secondary.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for MariaDB secondary containers | `""` |
+| `secondary.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for MariaDB secondary containers | `""` |
+| `secondary.persistence.enabled` | Enable persistence on MariaDB secondary replicas using a `PersistentVolumeClaim` | `true` |
+| `secondary.persistence.subPath` | Subdirectory of the volume to mount at | `""` |
+| `secondary.persistence.storageClass` | MariaDB secondary persistent volume storage Class | `""` |
+| `secondary.persistence.labels` | Labels for the PVC | `{}` |
+| `secondary.persistence.annotations` | MariaDB secondary persistent volume claim annotations | `{}` |
+| `secondary.persistence.accessModes` | MariaDB secondary persistent volume access Modes | `["ReadWriteOnce"]` |
+| `secondary.persistence.size` | MariaDB secondary persistent volume size | `8Gi` |
+| `secondary.persistence.selector` | Selector to match an existing Persistent Volume | `{}` |
+| `secondary.extraVolumes` | Optionally specify extra list of additional volumes to the MariaDB secondary pod(s) | `[]` |
+| `secondary.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the MariaDB secondary container(s) | `[]` |
+| `secondary.initContainers` | Add additional init containers for the MariaDB secondary pod(s) | `[]` |
+| `secondary.sidecars` | Add additional sidecar containers for the MariaDB secondary pod(s) | `[]` |
+| `secondary.service.type` | MariaDB secondary Kubernetes service type | `ClusterIP` |
+| `secondary.service.ports.mysql` | MariaDB secondary Kubernetes service port for MariaDB | `3306` |
+| `secondary.service.ports.metrics` | MariaDB secondary Kubernetes service port for metrics | `9104` |
+| `secondary.service.nodePorts.mysql` | MariaDB secondary Kubernetes service node port | `""` |
+| `secondary.service.clusterIP` | MariaDB secondary Kubernetes service clusterIP IP | `""` |
+| `secondary.service.loadBalancerIP` | MariaDB secondary loadBalancerIP if service type is `LoadBalancer` | `""` |
+| `secondary.service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
+| `secondary.service.loadBalancerSourceRanges` | Address that are allowed when MariaDB secondary service is LoadBalancer | `[]` |
+| `secondary.service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` |
+| `secondary.service.annotations` | Provide any additional annotations which may be required | `{}` |
+| `secondary.service.sessionAffinity` | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | `None` |
+| `secondary.service.sessionAffinityConfig` | Additional settings for the sessionAffinity. Ignored if `secondary.service.sessionAffinity` is `None` | `{}` |
+| `secondary.pdb.create` | Enable/disable a Pod Disruption Budget creation for MariaDB secondary pods | `true` |
+| `secondary.pdb.minAvailable` | Minimum number/percentage of MariaDB secondary pods that should remain scheduled | `""` |
+| `secondary.pdb.maxUnavailable` | Maximum number/percentage of MariaDB secondary pods that may be made unavailable. Defaults to `1` if both `secondary.pdb.minAvailable` and `secondary.pdb.maxUnavailable` are empty. | `""` |
+| `secondary.revisionHistoryLimit` | Maximum number of revisions that will be maintained in the StatefulSet | `10` |
+| `secondary.fips.openssl` | Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used | `""` |
+
+### RBAC parameters
+
+| Name | Description | Value |
+| --------------------------------------------- | -------------------------------------------------------------- | ------- |
+| `serviceAccount.create` | Enable the creation of a ServiceAccount for MariaDB pods | `true` |
+| `serviceAccount.name` | Name of the created ServiceAccount | `""` |
+| `serviceAccount.annotations` | Annotations for MariaDB Service Account | `{}` |
+| `serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `false` |
+| `rbac.create` | Whether to create and use RBAC resources or not | `false` |
+
+### Password update job
+
+| Name | Description | Value |
+| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
+| `passwordUpdateJob.enabled` | Enable password update job | `false` |
+| `passwordUpdateJob.backoffLimit` | set backoff limit of the job | `10` |
+| `passwordUpdateJob.command` | Override default container command on MariaDB Primary container(s) (useful when using custom images) | `[]` |
+| `passwordUpdateJob.args` | Override default container args on MariaDB Primary container(s) (useful when using custom images) | `[]` |
+| `passwordUpdateJob.extraCommands` | Extra commands to pass to the generation job | `""` |
+| `passwordUpdateJob.previousPasswords.rootPassword` | Previous root password (set if the password secret was already changed) | `""` |
+| `passwordUpdateJob.previousPasswords.password` | Previous password (set if the password secret was already changed) | `""` |
+| `passwordUpdateJob.previousPasswords.replicationPassword` | Previous replication password (set if the password secret was already changed) | `""` |
+| `passwordUpdateJob.previousPasswords.existingSecret` | Name of a secret containing the previous passwords (set if the password secret was already changed) | `""` |
+| `passwordUpdateJob.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
+| `passwordUpdateJob.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
+| `passwordUpdateJob.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
+| `passwordUpdateJob.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` |
+| `passwordUpdateJob.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
+| `passwordUpdateJob.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
+| `passwordUpdateJob.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
+| `passwordUpdateJob.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
+| `passwordUpdateJob.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
+| `passwordUpdateJob.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
+| `passwordUpdateJob.podSecurityContext.enabled` | Enabled credential init job pods' Security Context | `true` |
+| `passwordUpdateJob.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` |
+| `passwordUpdateJob.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` |
+| `passwordUpdateJob.podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` |
+| `passwordUpdateJob.podSecurityContext.fsGroup` | Set credential init job pod's Security Context fsGroup | `1001` |
+| `passwordUpdateJob.extraEnvVars` | Array containing extra env vars to configure the credential init job | `[]` |
+| `passwordUpdateJob.extraEnvVarsCM` | ConfigMap containing extra env vars to configure the credential init job | `""` |
+| `passwordUpdateJob.extraEnvVarsSecret` | Secret containing extra env vars to configure the credential init job (in case of sensitive data) | `""` |
+| `passwordUpdateJob.extraVolumes` | Optionally specify extra list of additional volumes for the credential init job | `[]` |
+| `passwordUpdateJob.extraVolumeMounts` | Array of extra volume mounts to be added to the jwt Container (evaluated as template). Normally used with `extraVolumes`. | `[]` |
+| `passwordUpdateJob.initContainers` | Add additional init containers for the MariaDB Primary pod(s) | `[]` |
+| `passwordUpdateJob.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if passwordUpdateJob.resources is set (passwordUpdateJob.resources is recommended for production). | `micro` |
+| `passwordUpdateJob.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
+| `passwordUpdateJob.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
+| `passwordUpdateJob.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
+| `passwordUpdateJob.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
+| `passwordUpdateJob.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
+| `passwordUpdateJob.hostAliases` | Add deployment host aliases | `[]` |
+| `passwordUpdateJob.annotations` | Add annotations to the job | `{}` |
+| `passwordUpdateJob.podLabels` | Additional pod labels | `{}` |
+| `passwordUpdateJob.podAnnotations` | Additional pod annotations | `{}` |
+| `passwordUpdateJob.fips.openssl` | Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used | `""` |
+
+### Volume Permissions parameters
+
+| Name | Description | Value |
+| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
+| `volumePermissions.enabled` | Enable init container that changes the owner and group of the persistent volume(s) mountpoint to `runAsUser:fsGroup` | `false` |
+| `volumePermissions.image.registry` | Init container volume-permissions image registry | `REGISTRY_NAME` |
+| `volumePermissions.image.repository` | Init container volume-permissions image repository | `REPOSITORY_NAME/os-shell` |
+| `volumePermissions.image.digest` | Init container volume-permissions image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
+| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `IfNotPresent` |
+| `volumePermissions.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
+| `volumePermissions.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if volumePermissions.resources is set (volumePermissions.resources is recommended for production). | `nano` |
+| `volumePermissions.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
+| `volumePermissions.fips.openssl` | Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used | `""` |
+
+### Metrics parameters
+
+| Name | Description | Value |
+| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
+| `metrics.enabled` | Start a side-car prometheus exporter | `false` |
+| `metrics.image.registry` | Exporter image registry | `REGISTRY_NAME` |
+| `metrics.image.repository` | Exporter image repository | `REPOSITORY_NAME/mysqld-exporter` |
+| `metrics.image.digest` | Exporter image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
+| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` |
+| `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
+| `metrics.annotations` | Annotations for the Exporter pod | `{}` |
+| `metrics.extraArgs` | Extra args to be passed to mysqld_exporter | `{}` |
+| `metrics.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the MariaDB metrics container(s) | `{}` |
+| `metrics.containerPorts.http` | Container port for http | `9104` |
+| `metrics.containerSecurityContext.enabled` | Enable security context for MariaDB metrics container | `false` |
+| `metrics.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
+| `metrics.containerSecurityContext.runAsUser` | User ID for the MariaDB metrics container | `1001` |
+| `metrics.containerSecurityContext.runAsGroup` | Group ID for the MariaDB metrics container | `1001` |
+| `metrics.containerSecurityContext.runAsNonRoot` | Set metrics container's Security Context runAsNonRoot | `true` |
+| `metrics.containerSecurityContext.privileged` | Set metrics container's Security Context privileged | `false` |
+| `metrics.containerSecurityContext.allowPrivilegeEscalation` | Set metrics container's Security Context allowPrivilegeEscalation | `false` |
+| `metrics.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
+| `metrics.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
+| `metrics.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
+| `metrics.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if metrics.resources is set (metrics.resources is recommended for production). | `nano` |
+| `metrics.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
+| `metrics.fips.openssl` | Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used | `""` |
+| `metrics.fips.golang` | Configure Golang FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used | `relaxed` |
+| `metrics.livenessProbe.enabled` | Enable livenessProbe | `true` |
+| `metrics.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `120` |
+| `metrics.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
+| `metrics.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `1` |
+| `metrics.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
+| `metrics.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
+| `metrics.readinessProbe.enabled` | Enable readinessProbe | `true` |
+| `metrics.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `30` |
+| `metrics.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
+| `metrics.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
+| `metrics.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
+| `metrics.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
+| `metrics.serviceMonitor.enabled` | Create ServiceMonitor Resource for scraping metrics using PrometheusOperator | `false` |
+| `metrics.serviceMonitor.namespace` | Namespace which Prometheus is running in | `""` |
+| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in prometheus. | `""` |
+| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped | `30s` |
+| `metrics.serviceMonitor.scrapeTimeout` | Specify the timeout after which the scrape is ended | `""` |
+| `metrics.serviceMonitor.relabelings` | RelabelConfigs to apply to samples before scraping | `[]` |
+| `metrics.serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion | `[]` |
+| `metrics.serviceMonitor.honorLabels` | honorLabels chooses the metric's labels on collisions with target labels | `false` |
+| `metrics.serviceMonitor.selector` | ServiceMonitor selector labels | `{}` |
+| `metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{}` |
+| `metrics.prometheusRule.enabled` | if `true`, creates a Prometheus Operator PrometheusRule (also requires `metrics.enabled` to be `true` and `metrics.prometheusRule.rules`) | `false` |
+| `metrics.prometheusRule.namespace` | Namespace for the PrometheusRule Resource (defaults to the Release Namespace) | `""` |
+| `metrics.prometheusRule.additionalLabels` | Additional labels that can be used so PrometheusRule will be discovered by Prometheus | `{}` |
+| `metrics.prometheusRule.rules` | Prometheus Rule definitions | `[]` |
+
+### NetworkPolicy parameters
+
+| Name | Description | Value |
+| --------------------------------------- | --------------------------------------------------------------- | ------ |
+| `networkPolicy.enabled` | Enable creation of NetworkPolicy resources | `true` |
+| `networkPolicy.allowExternal` | The Policy model to apply | `true` |
+| `networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` |
+| `networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` |
+| `networkPolicy.extraEgress` | Add extra ingress rules to the NetworkPolicy | `[]` |
+| `networkPolicy.ingressNSMatchLabels` | Labels to match to allow traffic from other namespaces | `{}` |
+| `networkPolicy.ingressNSPodMatchLabels` | Pod labels to match to allow traffic from other namespaces | `{}` |
+
+The above parameters map to the env variables defined in [bitnami/mariadb](https://github.com/bitnami/containers/tree/main/bitnami/mariadb). For more information please refer to the [bitnami/mariadb](https://github.com/bitnami/containers/tree/main/bitnami/mariadb) image documentation.
+
+Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
+
+```console
+helm install my-release \
+ --set auth.rootPassword=secretpassword,auth.database=app_database \
+ oci://REGISTRY_NAME/REPOSITORY_NAME/mariadb
+```
+
+> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
+
+The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`.
+
+> NOTE: Once this chart is deployed, it is not possible to change the application's access credentials, such as usernames or passwords, using Helm. To change these application credentials after deployment, delete any persistent volumes (PVs) used by the chart and re-deploy it, or use the application's built-in administrative tools if available.
+
+Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
+
+```console
+helm install my-release -f values.yaml oci://REGISTRY_NAME/REPOSITORY_NAME/mariadb
+```
+
+> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
+> **Tip**: You can use the default [values.yaml](https://github.com/bitnami/charts/tree/main/bitnami/mariadb/values.yaml)
+
+## Troubleshooting
+
+Find more information about how to deal with common errors related to Bitnami's Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues).
+
+## Upgrading
+
+### To 20.2.0
+
+This version introduces image verification for security purposes. To disable it, set `global.security.allowInsecureImages` to `true`. More details at [GitHub issue](https://github.com/bitnami/charts/issues/30850).
+
+It's necessary to set the `auth.rootPassword` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart:
+
+```console
+helm upgrade my-release oci://REGISTRY_NAME/REPOSITORY_NAME/mariadb --set auth.rootPassword=[ROOT_PASSWORD]
+```
+
+> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
+
+| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes.
+
+### To 20.0.0
+
+This major bump updates the StatefulSet objects `serviceName` to use a headless service, as the current non-headless service attached to it was not providing DNS entries. This will cause an upgrade issue because it changes "immutable fields". To workaround it, delete the StatefulSet objects as follows (replace the RELEASE_NAME placeholder):
+
+```shell
+
+# If architecture = "standalone"
+kubectl delete sts RELEASE_NAME --cascade=false
+
+# If architecture = "replication"
+kubectl delete sts RELEASE_NAME-primary --cascade=false
+kubectl delete sts RELEASE_NAME-secondary --cascade=false
+```
+
+Then execute `helm upgrade` as usual.
+
+Additionally, this new major provides a new, optional, password update job for automating this second-day operation in the chart. See the [Update credential](#password-update-job) for detailed instructions.
+
+### To 19.0.0
+
+This major release bumps the MariaDB version to 11.4. Follow the [upstream instructions](https://mariadb.com/kb/en/upgrading-between-minor-versions-on-linux/) for upgrading from MariaDB 11.3 to 11.4. No major issues are expected during the upgrade.
+
+### To 18.0.0
+
+This major release bumps the MariaDB version to 11.3. Follow the [upstream instructions](https://mariadb.com/kb/en/upgrading-between-minor-versions-on-linux/) for upgrading from MariaDB 11.2 to 11.3. No major issues are expected during the upgrade.
+
+### To 17.0.0
+
+This major bump changes the following security defaults:
+
+- `runAsGroup` is changed from `0` to `1001`
+- `readOnlyRootFilesystem` is set to `true`
+- `resourcesPreset` is changed from `none` to the minimum size working in our test suites (NOTE: `resourcesPreset` is not meant for production usage, but `resources` adapted to your use case).
+- `global.compatibility.openshift.adaptSecurityContext` is changed from `disabled` to `auto`.
+
+This could potentially break any customization or init scripts used in your deployment. If this is the case, change the default values to the previous ones.
+
+### To 16.0.0
+
+This section enables NetworkPolicies by default to increase security of the application. It also adapts the values in the `networkPolicy` section to the current Bitnami standards. The removed sections are `networkPolicy.metrics.*`, `networkPolicy.ingressRules.*` and `networkPolicy.egressRules.*`. Check the Parameters table for the new structure.
+
+### To 14.0.0
+
+This major release bumps the MariaDB version to 11.1. Follow the [upstream instructions](https://mariadb.com/kb/en/upgrading-between-minor-versions-on-linux/) for upgrading from MariaDB 11.0 to 11.1. No major issues are expected during the upgrade.
+
+### To 13.0.0
+
+This major release bumps the MariaDB version to 11.0. Follow the [upstream instructions](https://mariadb.com/kb/en/upgrading-from-mariadb-10-11-to-mariadb-11-0/) for upgrading from MariaDB 10.11 to 11.0. No major issues are expected during the upgrade.
+
+### To 11.0.0
+
+This major release bumps default MariaDB branch to 10.6. Follow the [official instructions](https://mariadb.com/kb/en/upgrading-from-mariadb-105-to-mariadb-106/) from upgrading between 10.5 and 10.6.
+
+No major issues are expected during the upgrade.
+
+### To 10.0.0
+
+This major release renames several values in this chart and adds missing features, in order to be inline with the rest of assets in the Bitnami charts repository.
+
+Affected values:
+
+- `primary.service.port` was deprecated, we recommend using `primary.service.ports.mysql` instead.
+- `primary.service.nodePort` was deprecated, we recommend using `primary.service.nodePorts.mysql` instead.
+- `secondary.service.port` was deprecated, we recommend using `secondary.service.ports.mysql` instead.
+- `secondary.service.nodePort` was deprecated, we recommend using `secondary.service.nodePorts.mysql` instead.
+- `metrics.serviceMonitor.additionalLabels` was deprecated, we recommend using `metrics.serviceMonitor.selector` instead.
+- `primary.pdb.enabled` renamed as `primary.pdb.create`.
+- `secondary.pdb.enabled` renamed as `secondary.pdb.create`.
+- `primary.updateStrategy` changed from String type (previously default to 'rollingUpdate') to Object type, allowing users to configure other updateStrategy parameters, similar to other charts.
+- Removed value `primary.rollingUpdatePartition`, now configured using `primary.updateStrategy` setting `primary.updateStrategy.rollingUpdate.partition`.
+- `secondary.updateStrategy` changed from String type (previously default to 'rollingUpdate') to Object type, allowing users to configure other updateStrategy parameters, similar to other charts.
+- Removed value `secondary.rollingUpdatePartition`, now configured using `secondary.updateStrategy` setting `secondary.updateStrategy.rollingUpdate.partition`.
+- `metrics.serviceMonitor.relabellings`, previously used to configure ServiceMonitor metricRelabelings, has been replaced with the value `metrics.serviceMonitor.metricRelabelings`, and new value `metrics.serviceMonitor.relabelings` can be used to set ServiceMonitor relabelings parameter
+
+### To 9.0.0
+
+[On November 13, 2020, Helm v2 support was formally finished](https://github.com/helm/charts#status-of-the-project), this major version is the result of the required changes applied to the Helm Chart to be able to incorporate the different features added in Helm v3 and to be consistent with the Helm project itself regarding the Helm v2 EOL.
+
+### To 8.0.0
+
+- Several parameters were renamed or disappeared in favor of new ones on this major version:
+ - The terms _master_ and _slave_ have been replaced by the terms _primary_ and _secondary_. Therefore, parameters prefixed with `master` or `slave` are now prefixed with `primary` or `secondary`, respectively.
+ - `securityContext.*` is deprecated in favor of `primary.podSecurityContext`, `primary.containerSecurityContext`, `secondary.podSecurityContext`, and `secondary.containerSecurityContext`.
+ - Credentials parameter are reorganized under the `auth` parameter.
+ - `replication.enabled` parameter is deprecated in favor of `architecture` parameter that accepts two values: `standalone` and `replication`.
+- The default MariaDB version was updated from 10.3 to 10.5. According to the official documentation, upgrading from 10.3 should be painless. However, there are some things that have changed which could affect an upgrade:
+ - [Incompatible changes upgrading from MariaDB 10.3 to MariaDB 10.4](https://mariadb.com/kb/en/upgrading-from-mariadb-103-to-mariadb-104/#incompatible-changes-between-103-and-104).
+ - [Incompatible changes upgrading from MariaDB 10.4 to MariaDB 10.5](https://mariadb.com/kb/en/upgrading-from-mariadb-104-to-mariadb-105/#incompatible-changes-between-104-and-105).
+- Chart labels were adapted to follow the [Helm charts standard labels](https://helm.sh/docs/chart_best_practices/labels/#standard-labels).
+- This version also introduces `bitnami/common`, a [library chart](https://helm.sh/docs/topics/library_charts/#helm) as a dependency. More documentation about this new utility could be found [here](https://github.com/bitnami/charts/tree/main/bitnami/common#bitnami-common-library-chart). Please, make sure that you have updated the chart dependencies before executing any upgrade.
+
+Consequences:
+
+Backwards compatibility is not guaranteed. To upgrade to `8.0.0`, install a new release of the MariaDB chart, and migrate the data from your previous release. You have 2 alternatives to do so:
+
+- Create a backup of the database, and restore it on the new release using tools such as [mysqldump](https://mariadb.com/kb/en/mysqldump/).
+- Reuse the PVC used to hold the master data on your previous release. To do so, use the `primary.persistence.existingClaim` parameter. The following example assumes that the release name is `mariadb`:
+
+```console
+helm install mariadb oci://REGISTRY_NAME/REPOSITORY_NAME/mariadb --set auth.rootPassword=[ROOT_PASSWORD] --set primary.persistence.existingClaim=[EXISTING_PVC]
+```
+
+> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
+
+| Note: you need to substitute the placeholder _[EXISTING_PVC]_ with the name of the PVC used on your previous release, and _[ROOT_PASSWORD]_ with the root password used in your previous release.
+
+### To 7.0.0
+
+Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec.
+
+In the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage.
+
+This major version bump signifies this change.
+
+### To 6.0.0
+
+MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade:
+
+- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102)
+- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103)
+
+### To 5.0.0
+
+Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments.
+Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb:
+
+```console
+kubectl delete statefulset opencart-mariadb --cascade=false
+```
+
+## License
+
+Copyright © 2025 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/charts/semaphore/charts/mariadb/charts/common/.helmignore b/charts/semaphore/charts/mariadb/charts/common/.helmignore
new file mode 100644
index 0000000..d0e1084
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/.helmignore
@@ -0,0 +1,26 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
+# img folder
+img/
+# Changelog
+CHANGELOG.md
diff --git a/charts/semaphore/charts/mariadb/charts/common/Chart.yaml b/charts/semaphore/charts/mariadb/charts/common/Chart.yaml
new file mode 100644
index 0000000..91ccb4b
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/Chart.yaml
@@ -0,0 +1,25 @@
+annotations:
+ fips: "true"
+ images: |
+ []
+ licenses: Apache-2.0
+apiVersion: v2
+appVersion: 2.33.1
+description: A Library Helm Chart for grouping common logic between bitnami charts.
+ This chart is not deployable by itself.
+home: https://bitnami.com
+icon: https://dyltqmyl993wv.cloudfront.net/downloads/logos/bitnami-mark.png
+keywords:
+- common
+- helper
+- template
+- function
+- bitnami
+maintainers:
+- name: Broadcom, Inc. All Rights Reserved.
+ url: https://github.com/bitnami/charts
+name: common
+sources:
+- https://github.com/bitnami/charts/tree/main/bitnami/common
+type: library
+version: 2.33.1
diff --git a/charts/semaphore/charts/mariadb/charts/common/README.md b/charts/semaphore/charts/mariadb/charts/common/README.md
new file mode 100644
index 0000000..76fa2ec
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/README.md
@@ -0,0 +1,395 @@
+
+
+# Common library for Bitnami packages
+
+A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself.
+
+[Overview of Common](https://github.com/bitnami/charts/tree/main/bitnami/common)
+
+Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
+
+## TL;DR
+
+```yaml
+dependencies:
+ - name: common
+ version: 2.x.x
+ repository: oci://MY-OCI-REGISTRY
+```
+
+```console
+helm dependency update
+```
+
+```yaml
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.names.fullname" . }}
+data:
+ myvalue: "Hello World"
+```
+
+Looking to use our applications in production? Try [VMware Tanzu Application Catalog](https://bitnami.com/enterprise), the commercial edition of the Bitnami catalog.
+
+## Introduction
+
+This chart provides a common template helpers which can be used to develop new charts using [Helm](https://helm.sh) package manager.
+
+## Prerequisites
+
+- Kubernetes 1.23+
+- Helm 3.8.0+
+
+## Parameters
+
+The following table lists the helpers available in the library which are scoped in different sections.
+
+### Affinities
+
+| Helper identifier | Description | Expected Input |
+| ------------------------------- | ---------------------------------------------------- | ------------------------------------------------------------ |
+| `common.affinities.nodes.soft` | Return a soft nodeAffinity definition | `dict "key" "FOO" "values" (list "BAR" "BAZ")` |
+| `common.affinities.nodes.hard` | Return a hard nodeAffinity definition | `dict "key" "FOO" "values" (list "BAR" "BAZ")` |
+| `common.affinities.nodes` | Return a nodeAffinity definition | `dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")` |
+| `common.affinities.topologyKey` | Return a topologyKey definition | `dict "topologyKey" "FOO"` |
+| `common.affinities.pods.soft` | Return a soft podAffinity/podAntiAffinity definition | `dict "component" "FOO" "context" $` |
+| `common.affinities.pods.hard` | Return a hard podAffinity/podAntiAffinity definition | `dict "component" "FOO" "context" $` |
+| `common.affinities.pods` | Return a podAffinity/podAntiAffinity definition | `dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")` |
+
+### Capabilities
+
+| Helper identifier | Description | Expected Input |
+| --------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | --------------------------------------- |
+| `common.capabilities.kubeVersion` | Return the target Kubernetes version (using client default if .Values.kubeVersion is not set). | `.` Chart context |
+| `common.capabilities.apiVersions.has` | Return true if the apiVersion is supported | `dict "version" "batch/v1" "context" $` |
+| `common.capabilities.job.apiVersion` | Return the appropriate apiVersion for job. | `.` Chart context |
+| `common.capabilities.cronjob.apiVersion` | Return the appropriate apiVersion for cronjob. | `.` Chart context |
+| `common.capabilities.daemonset.apiVersion` | Return the appropriate apiVersion for daemonset. | `.` Chart context |
+| `common.capabilities.deployment.apiVersion` | Return the appropriate apiVersion for deployment. | `.` Chart context |
+| `common.capabilities.statefulset.apiVersion` | Return the appropriate apiVersion for statefulset. | `.` Chart context |
+| `common.capabilities.ingress.apiVersion` | Return the appropriate apiVersion for ingress. | `.` Chart context |
+| `common.capabilities.rbac.apiVersion` | Return the appropriate apiVersion for RBAC resources. | `.` Chart context |
+| `common.capabilities.crd.apiVersion` | Return the appropriate apiVersion for CRDs. | `.` Chart context |
+| `common.capabilities.policy.apiVersion` | Return the appropriate apiVersion for podsecuritypolicy. | `.` Chart context |
+| `common.capabilities.networkPolicy.apiVersion` | Return the appropriate apiVersion for networkpolicy. | `.` Chart context |
+| `common.capabilities.apiService.apiVersion` | Return the appropriate apiVersion for APIService. | `.` Chart context |
+| `common.capabilities.hpa.apiVersion` | Return the appropriate apiVersion for Horizontal Pod Autoscaler | `.` Chart context |
+| `common.capabilities.vpa.apiVersion` | Return the appropriate apiVersion for Vertical Pod Autoscaler. | `.` Chart context |
+| `common.capabilities.psp.supported` | Returns true if PodSecurityPolicy is supported | `.` Chart context |
+| `common.capabilities.supportsHelmVersion` | Returns true if the used Helm version is 3.3+ | `.` Chart context |
+| `common.capabilities.admissionConfiguration.supported` | Returns true if AdmissionConfiguration is supported | `.` Chart context |
+| `common.capabilities.admissionConfiguration.apiVersion` | Return the appropriate apiVersion for AdmissionConfiguration. | `.` Chart context |
+| `common.capabilities.podSecurityConfiguration.apiVersion` | Return the appropriate apiVersion for PodSecurityConfiguration. | `.` Chart context |
+
+### Certificates
+
+| Helper identifier | Description | Expected Input |
+| ------------------ | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
+| `common.certs.sans`| Returns a space-separated list of Subject Alternative Names (SANs) to create a TLS certificate | `dict "namespace" "default" "clusterDomain" "cluster.local" "serviceName" "my-service" "headlessServiceName" "my-service-headless"` |
+
+### Compatibility
+
+| Helper identifier | Description | Expected Input |
+| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
+| `common.compatibility.isOpenshift` | Return true if the detected platform is Openshift | `.` Chart context |
+| `common.compatibility.renderSecurityContext` | Render a compatible securityContext depending on the platform. By default it is maintained as it is. In other platforms like Openshift we remove default user/group values that do not work out of the box with the restricted-v1 SCC | `dict "secContext" .Values.containerSecurityContext "context" $` |
+
+### Errors
+
+| Helper identifier | Description | Expected Input |
+| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
+| `common.errors.upgrade.passwords.empty` | It will ensure required passwords are given when we are upgrading a chart. If `validationErrors` is not empty it will throw an error and will stop the upgrade action. | `dict "validationErrors" (list $validationError00 $validationError01) "context" $` |
+| `common.errors.insecureImages` | Throw error when original container images are replaced. The error can be bypassed by setting the `global.security.allowInsecureImages` to true. | `dict "images" (list .Values.path.to.the.imageRoot) "context" $` |
+
+### Images
+
+| Helper identifier | Description | Expected Input |
+| --------------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
+| `common.images.image` | Return the proper and full image name | `dict "imageRoot" .Values.path.to.the.image "global" $`, see [ImageRoot](#imageroot) for the structure. |
+| `common.images.pullSecrets` | Return the proper Docker Image Registry Secret Names (deprecated: use common.images.renderPullSecrets instead) | `dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global` |
+| `common.images.renderPullSecrets` | Return the proper Docker Image Registry Secret Names (evaluates values as templates) | `dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "context" $` |
+| `common.images.version` | Return the proper image version | `dict "imageRoot" .Values.path.to.the.image "chart" .Chart` , see [ImageRoot](#imageroot) for the structure. |
+
+### Ingress
+
+| Helper identifier | Description | Expected Input |
+| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `common.ingress.backend` | Generate a proper Ingress backend entry depending on the API version | `dict "serviceName" "foo" "servicePort" "bar"`, see the [Ingress deprecation notice](https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/) for the syntax differences |
+| `common.ingress.certManagerRequest` | Prints "true" if required cert-manager annotations for TLS signed certificates are set in the Ingress annotations | `dict "annotations" .Values.path.to.the.ingress.annotations` |
+
+### Labels
+
+| Helper identifier | Description | Expected Input |
+| --------------------------- | --------------------------------------------------------------------------- | ----------------- |
+| `common.labels.standard` | Return Kubernetes standard labels | `.` Chart context |
+| `common.labels.matchLabels` | Labels to use on `deploy.spec.selector.matchLabels` and `svc.spec.selector` | `.` Chart context |
+
+### Names
+
+| Helper identifier | Description | Expected Input |
+| ---------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
+| `common.names.name` | Expand the name of the chart or use `.Values.nameOverride` | `.` Chart context |
+| `common.names.fullname` | Create a default fully qualified app name. | `.` Chart context |
+| `common.names.namespace` | Allow the release namespace to be overridden | `.` Chart context |
+| `common.names.fullname.namespace` | Create a fully qualified app name adding the installation's namespace | `.` Chart context |
+| `common.names.chart` | Chart name plus version | `.` Chart context |
+| `common.names.dependency.fullname` | Create a default fully qualified dependency name. | `dict "chartName" "dependency-chart-name" "chartValues" .Values.dependency-chart "context" $` |
+
+### Resources
+
+| Helper identifier | Description | Expected Input |
+| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |
+| `common.resources.preset` | Return a resource request/limit object based on a given preset. These presets are for basic testing and not meant to be used in production. | `dict "type" "nano"` |
+
+### Secrets
+
+| Helper identifier | Description | Expected Input |
+| --------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `common.secrets.name` | Generate the name of the secret. | `dict "existingSecret" .Values.path.to.the.existingSecret "defaultNameSuffix" "mySuffix" "context" $` see [ExistingSecret](#existingsecret) for the structure. |
+| `common.secrets.key` | Generate secret key. | `dict "existingSecret" .Values.path.to.the.existingSecret "key" "keyName"` see [ExistingSecret](#existingsecret) for the structure. |
+| `common.secrets.passwords.manage` | Generate secret password or retrieve one if already created. | `dict "secret" "secret-name" "key" "keyName" "providedValues" (list "path.to.password1" "path.to.password2") "length" 10 "strong" false "chartName" "chartName" "honorProvidedValues" false "context" $`, length, strong, honorProvidedValues and chartName fields are optional. |
+| `common.secrets.exists` | Returns whether a previous generated secret already exists. | `dict "secret" "secret-name" "context" $` |
+| `common.secrets.lookup` | Reuses the value from an existing secret, otherwise sets its value to a default value. | `dict "secret" "secret-name" "key" "keyName" "defaultValue" .Values.myValue "context" $` |
+
+### Storage
+
+| Helper identifier | Description | Expected Input |
+| ---------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
+| `common.storage.class` | Return the proper Storage Class | `dict "persistence" .Values.path.to.the.persistence "global" $`, see [Persistence](#persistence) for the structure. |
+
+### TplValues
+
+| Helper identifier | Description | Expected Input |
+| ---------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `common.tplvalues.render` | Renders a value that contains template | `dict "value" .Values.path.to.the.Value "context" $`, value is the value should rendered as template, context frequently is the chart context `$` or `.` |
+| `common.tplvalues.merge` | Merge a list of values that contains template after rendering them. | `dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $` |
+| `common.tplvalues.merge-overwrite` | Merge a list of values that contains template after rendering them. | `dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $` |
+
+### Utils
+
+| Helper identifier | Description | Expected Input |
+| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
+| `common.utils.fieldToEnvVar` | Build environment variable name given a field. | `dict "field" "my-password"` |
+| `common.utils.secret.getvalue` | Print instructions to get a secret value. | `dict "secret" "secret-name" "field" "secret-value-field" "context" $` |
+| `common.utils.getValueFromKey` | Gets a value from `.Values` object given its key path | `dict "key" "path.to.key" "context" $` |
+| `common.utils.getKeyFromList` | Returns first `.Values` key with a defined value or first of the list if all non-defined | `dict "keys" (list "path.to.key1" "path.to.key2") "context" $` |
+| `common.utils.checksumTemplate` | Checksum a template at "path" containing a *single* resource (ConfigMap,Secret) for use in pod annotations, excluding the metadata (see #18376) | `dict "path" "/configmap.yaml" "context" $` |
+
+### Validations
+
+| Helper identifier | Description | Expected Input |
+| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `common.validations.values.single.empty` | Validate a value must not be empty. | `dict "valueKey" "path.to.value" "secret" "secret.name" "field" "my-password" "subchart" "subchart" "context" $` secret, field and subchart are optional. In case they are given, the helper will generate a how to get instruction. See [ValidateValue](#validatevalue) |
+| `common.validations.values.multiple.empty` | Validate a multiple values must not be empty. It returns a shared error for all the values. | `dict "required" (list $validateValueConf00 $validateValueConf01) "context" $`. See [ValidateValue](#validatevalue) |
+| `common.validations.values.mariadb.passwords` | This helper will ensure required password for MariaDB are not empty. It returns a shared error for all the values. | `dict "secret" "mariadb-secret" "subchart" "true" "context" $` subchart field is optional and could be true or false it depends on where you will use mariadb chart and the helper. |
+
+### Warnings
+
+| Helper identifier | Description | Expected Input |
+| -------------------------------- | ----------------------------------------------------------------- | ---------------------------------------------------------- |
+| `common.warnings.rollingTag` | Warning about using rolling tag. | `ImageRoot` see [ImageRoot](#imageroot) for the structure. |
+| `common.warnings.modifiedImages` | Warning about replaced images from the original. | `ImageRoot` see [ImageRoot](#imageroot) for the structure. |
+| `common.warnings.resources` | Warning about not setting the resource object in all deployments. | `dict "sections" (list "path1" "path2") context $` |
+
+### FIPS
+
+| Helper identifier | Description | Expected Input |
+| -------------------- | ------------------- | ------------------------------------------------------------------------------- |
+| `common.fips.enabled` | Enable FIPS mode | `.` Chart context |
+| `common.fips.config` | Configure FIPS mode | `dict "tech" "openssl|java|golang" "fips" .Values.fips "global" .Values.global` |
+
+## Special input schemas
+
+### ImageRoot
+
+```yaml
+registry:
+ type: string
+ description: Docker registry where the image is located
+ example: docker.io
+
+repository:
+ type: string
+ description: Repository and image name
+ example: bitnami/nginx
+
+tag:
+ type: string
+ description: image tag
+ example: 1.16.1-debian-10-r63
+
+pullPolicy:
+ type: string
+ description: Specify a imagePullPolicy.'
+
+pullSecrets:
+ type: array
+ items:
+ type: string
+ description: Optionally specify an array of imagePullSecrets (evaluated as templates).
+
+debug:
+ type: boolean
+ description: Set to true if you would like to see extra information on logs
+ example: false
+
+## An instance would be:
+# registry: docker.io
+# repository: bitnami/nginx
+# tag: 1.16.1-debian-10-r63
+# pullPolicy: IfNotPresent
+# debug: false
+```
+
+### Persistence
+
+```yaml
+enabled:
+ type: boolean
+ description: Whether enable persistence.
+ example: true
+
+storageClass:
+ type: string
+ description: Ghost data Persistent Volume Storage Class, If set to "-", storageClassName: "" which disables dynamic provisioning.
+ example: "-"
+
+accessMode:
+ type: string
+ description: Access mode for the Persistent Volume Storage.
+ example: ReadWriteOnce
+
+size:
+ type: string
+ description: Size the Persistent Volume Storage.
+ example: 8Gi
+
+path:
+ type: string
+ description: Path to be persisted.
+ example: /bitnami
+
+## An instance would be:
+# enabled: true
+# storageClass: "-"
+# accessMode: ReadWriteOnce
+# size: 8Gi
+# path: /bitnami
+```
+
+### ExistingSecret
+
+```yaml
+name:
+ type: string
+ description: Name of the existing secret.
+ example: mySecret
+keyMapping:
+ description: Mapping between the expected key name and the name of the key in the existing secret.
+ type: object
+
+## An instance would be:
+# name: mySecret
+# keyMapping:
+# password: myPasswordKey
+```
+
+#### Example of use
+
+When we store sensitive data for a deployment in a secret, some times we want to give to users the possibility of using theirs existing secrets.
+
+```yaml
+# templates/secret.yaml
+---
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ include "common.names.fullname" . }}
+ labels:
+ app: {{ include "common.names.fullname" . }}
+type: Opaque
+data:
+ password: {{ .Values.password | b64enc | quote }}
+
+# templates/dpl.yaml
+---
+...
+ env:
+ - name: PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ include "common.secrets.name" (dict "existingSecret" .Values.existingSecret "context" $) }}
+ key: {{ include "common.secrets.key" (dict "existingSecret" .Values.existingSecret "key" "password") }}
+...
+
+# values.yaml
+---
+name: mySecret
+keyMapping:
+ password: myPasswordKey
+```
+
+### ValidateValue
+
+#### NOTES.txt
+
+```console
+{{- $validateValueConf00 := (dict "valueKey" "path.to.value00" "secret" "secretName" "field" "password-00") -}}
+{{- $validateValueConf01 := (dict "valueKey" "path.to.value01" "secret" "secretName" "field" "password-01") -}}
+
+{{ include "common.validations.values.multiple.empty" (dict "required" (list $validateValueConf00 $validateValueConf01) "context" $) }}
+```
+
+If we force those values to be empty we will see some alerts
+
+```console
+helm install test mychart --set path.to.value00="",path.to.value01=""
+ 'path.to.value00' must not be empty, please add '--set path.to.value00=$PASSWORD_00' to the command. To get the current value:
+
+ export PASSWORD_00=$(kubectl get secret --namespace default secretName -o jsonpath="{.data.password-00}" | base64 -d)
+
+ 'path.to.value01' must not be empty, please add '--set path.to.value01=$PASSWORD_01' to the command. To get the current value:
+
+ export PASSWORD_01=$(kubectl get secret --namespace default secretName -o jsonpath="{.data.password-01}" | base64 -d)
+```
+
+## Upgrading
+
+### To 1.0.0
+
+[On November 13, 2020, Helm v2 support was formally finished](https://github.com/helm/charts#status-of-the-project), this major version is the result of the required changes applied to the Helm Chart to be able to incorporate the different features added in Helm v3 and to be consistent with the Helm project itself regarding the Helm v2 EOL.
+
+#### What changes were introduced in this major version?
+
+- Previous versions of this Helm Chart use `apiVersion: v1` (installable by both Helm 2 and 3), this Helm Chart was updated to `apiVersion: v2` (installable by Helm 3 only). [Here](https://helm.sh/docs/topics/charts/#the-apiversion-field) you can find more information about the `apiVersion` field.
+- Use `type: library`. [Here](https://v3.helm.sh/docs/faq/#library-chart-support) you can find more information.
+- The different fields present in the *Chart.yaml* file has been ordered alphabetically in a homogeneous way for all the Bitnami Helm Charts
+
+#### Considerations when upgrading to this version
+
+- If you want to upgrade to this version from a previous one installed with Helm v3, you shouldn't face any issues
+- If you want to upgrade to this version using Helm v2, this scenario is not supported as this version doesn't support Helm v2 anymore
+- If you installed the previous version with Helm v2 and wants to upgrade to this version with Helm v3, please refer to the [official Helm documentation](https://helm.sh/docs/topics/v2_v3_migration/#migration-use-cases) about migrating from Helm v2 to v3
+
+#### Useful links
+
+-
+-
+-
+
+## License
+
+Copyright © 2025 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_affinities.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_affinities.tpl
new file mode 100644
index 0000000..c6ccc62
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_affinities.tpl
@@ -0,0 +1,169 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Return a soft nodeAffinity definition
+{{ include "common.affinities.nodes.soft" (dict "key" "FOO" "values" (list "BAR" "BAZ")) -}}
+*/}}
+{{- define "common.affinities.nodes.soft" -}}
+preferredDuringSchedulingIgnoredDuringExecution:
+ - preference:
+ matchExpressions:
+ - key: {{ .key }}
+ operator: In
+ values:
+ {{- range .values }}
+ - {{ . | quote }}
+ {{- end }}
+ weight: 1
+{{- end -}}
+
+{{/*
+Return a hard nodeAffinity definition
+{{ include "common.affinities.nodes.hard" (dict "key" "FOO" "values" (list "BAR" "BAZ")) -}}
+*/}}
+{{- define "common.affinities.nodes.hard" -}}
+requiredDuringSchedulingIgnoredDuringExecution:
+ nodeSelectorTerms:
+ - matchExpressions:
+ - key: {{ .key }}
+ operator: In
+ values:
+ {{- range .values }}
+ - {{ . | quote }}
+ {{- end }}
+{{- end -}}
+
+{{/*
+Return a nodeAffinity definition
+{{ include "common.affinities.nodes" (dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")) -}}
+*/}}
+{{- define "common.affinities.nodes" -}}
+ {{- if eq .type "soft" }}
+ {{- include "common.affinities.nodes.soft" . -}}
+ {{- else if eq .type "hard" }}
+ {{- include "common.affinities.nodes.hard" . -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Return a topologyKey definition
+{{ include "common.affinities.topologyKey" (dict "topologyKey" "BAR") -}}
+*/}}
+{{- define "common.affinities.topologyKey" -}}
+{{ .topologyKey | default "kubernetes.io/hostname" -}}
+{{- end -}}
+
+{{/*
+Return a soft podAffinity/podAntiAffinity definition
+{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "extraNamespaces" (list "namespace1" "namespace2") "context" $) -}}
+*/}}
+{{- define "common.affinities.pods.soft" -}}
+{{- $component := default "" .component -}}
+{{- $customLabels := default (dict) .customLabels -}}
+{{- $extraMatchLabels := default (dict) .extraMatchLabels -}}
+{{- $extraPodAffinityTerms := default (list) .extraPodAffinityTerms -}}
+{{- $extraNamespaces := default (list) .extraNamespaces -}}
+preferredDuringSchedulingIgnoredDuringExecution:
+ - podAffinityTerm:
+ labelSelector:
+ matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }}
+ {{- if not (empty $component) }}
+ {{ printf "app.kubernetes.io/component: %s" $component }}
+ {{- end }}
+ {{- range $key, $value := $extraMatchLabels }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+ {{- if $extraNamespaces }}
+ namespaces:
+ - {{ .context.Release.Namespace }}
+ {{- with $extraNamespaces }}
+ {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }}
+ weight: 1
+ {{- range $extraPodAffinityTerms }}
+ - podAffinityTerm:
+ labelSelector:
+ matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" $.context )) | nindent 10 }}
+ {{- if not (empty $component) }}
+ {{ printf "app.kubernetes.io/component: %s" $component }}
+ {{- end }}
+ {{- range $key, $value := .extraMatchLabels }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+ {{- if .namespaces }}
+ namespaces:
+ - {{ $.context.Release.Namespace }}
+ {{- with .namespaces }}
+ {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }}
+ weight: {{ .weight | default 1 -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Return a hard podAffinity/podAntiAffinity definition
+{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "extraNamespaces" (list "namespace1" "namespace2") "context" $) -}}
+*/}}
+{{- define "common.affinities.pods.hard" -}}
+{{- $component := default "" .component -}}
+{{- $customLabels := default (dict) .customLabels -}}
+{{- $extraMatchLabels := default (dict) .extraMatchLabels -}}
+{{- $extraPodAffinityTerms := default (list) .extraPodAffinityTerms -}}
+{{- $extraNamespaces := default (list) .extraNamespaces -}}
+requiredDuringSchedulingIgnoredDuringExecution:
+ - labelSelector:
+ matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }}
+ {{- if not (empty $component) }}
+ {{ printf "app.kubernetes.io/component: %s" $component }}
+ {{- end }}
+ {{- range $key, $value := $extraMatchLabels }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+ {{- if $extraNamespaces }}
+ namespaces:
+ - {{ .context.Release.Namespace }}
+ {{- with $extraNamespaces }}
+ {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 6 }}
+ {{- end }}
+ {{- end }}
+ topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }}
+ {{- range $extraPodAffinityTerms }}
+ - labelSelector:
+ matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" $.context )) | nindent 8 }}
+ {{- if not (empty $component) }}
+ {{ printf "app.kubernetes.io/component: %s" $component }}
+ {{- end }}
+ {{- range $key, $value := .extraMatchLabels }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+ {{- if .namespaces }}
+ namespaces:
+ - {{ $.context.Release.Namespace }}
+ {{- with .namespaces }}
+ {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 6 }}
+ {{- end }}
+ {{- end }}
+ topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Return a podAffinity/podAntiAffinity definition
+{{ include "common.affinities.pods" (dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")) -}}
+*/}}
+{{- define "common.affinities.pods" -}}
+ {{- if eq .type "soft" }}
+ {{- include "common.affinities.pods.soft" . -}}
+ {{- else if eq .type "hard" }}
+ {{- include "common.affinities.pods.hard" . -}}
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_capabilities.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_capabilities.tpl
new file mode 100644
index 0000000..58f58c1
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_capabilities.tpl
@@ -0,0 +1,178 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Return the target Kubernetes version
+*/}}
+{{- define "common.capabilities.kubeVersion" -}}
+{{- default (default .Capabilities.KubeVersion.Version .Values.kubeVersion) ((.Values.global).kubeVersion) -}}
+{{- end -}}
+
+{{/*
+Return true if the apiVersion is supported
+Usage:
+{{ include "common.capabilities.apiVersions.has" (dict "version" "batch/v1" "context" $) }}
+*/}}
+{{- define "common.capabilities.apiVersions.has" -}}
+{{- $providedAPIVersions := default .context.Values.apiVersions ((.context.Values.global).apiVersions) -}}
+{{- if and (empty $providedAPIVersions) (.context.Capabilities.APIVersions.Has .version) -}}
+ {{- true -}}
+{{- else if has .version $providedAPIVersions -}}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for poddisruptionbudget.
+*/}}
+{{- define "common.capabilities.policy.apiVersion" -}}
+{{- print "policy/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for networkpolicy.
+*/}}
+{{- define "common.capabilities.networkPolicy.apiVersion" -}}
+{{- print "networking.k8s.io/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for job.
+*/}}
+{{- define "common.capabilities.job.apiVersion" -}}
+{{- print "batch/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for cronjob.
+*/}}
+{{- define "common.capabilities.cronjob.apiVersion" -}}
+{{- print "batch/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for daemonset.
+*/}}
+{{- define "common.capabilities.daemonset.apiVersion" -}}
+{{- print "apps/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for deployment.
+*/}}
+{{- define "common.capabilities.deployment.apiVersion" -}}
+{{- print "apps/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for statefulset.
+*/}}
+{{- define "common.capabilities.statefulset.apiVersion" -}}
+{{- print "apps/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for ingress.
+*/}}
+{{- define "common.capabilities.ingress.apiVersion" -}}
+{{- print "networking.k8s.io/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for RBAC resources.
+*/}}
+{{- define "common.capabilities.rbac.apiVersion" -}}
+{{- print "rbac.authorization.k8s.io/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for CRDs.
+*/}}
+{{- define "common.capabilities.crd.apiVersion" -}}
+{{- print "apiextensions.k8s.io/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for APIService.
+*/}}
+{{- define "common.capabilities.apiService.apiVersion" -}}
+{{- print "apiregistration.k8s.io/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for Horizontal Pod Autoscaler.
+*/}}
+{{- define "common.capabilities.hpa.apiVersion" -}}
+{{- $kubeVersion := include "common.capabilities.kubeVersion" .context -}}
+{{- print "autoscaling/v2" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for Vertical Pod Autoscaler.
+*/}}
+{{- define "common.capabilities.vpa.apiVersion" -}}
+{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}}
+{{- if and (not (empty $kubeVersion)) (semverCompare "<1.25-0" $kubeVersion) -}}
+{{- print "autoscaling/v1beta2" -}}
+{{- else -}}
+{{- print "autoscaling/v1" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Returns true if PodSecurityPolicy is supported
+*/}}
+{{- define "common.capabilities.psp.supported" -}}
+{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}}
+{{- if or (empty $kubeVersion) (semverCompare "<1.25-0" $kubeVersion) -}}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Returns true if AdmissionConfiguration is supported
+*/}}
+{{- define "common.capabilities.admissionConfiguration.supported" -}}
+{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}}
+ {{- true -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for AdmissionConfiguration.
+*/}}
+{{- define "common.capabilities.admissionConfiguration.apiVersion" -}}
+{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}}
+{{- if and (not (empty $kubeVersion)) (semverCompare "<1.25-0" $kubeVersion) -}}
+{{- print "apiserver.config.k8s.io/v1beta1" -}}
+{{- else -}}
+{{- print "apiserver.config.k8s.io/v1" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for PodSecurityConfiguration.
+*/}}
+{{- define "common.capabilities.podSecurityConfiguration.apiVersion" -}}
+{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}}
+{{- if and (not (empty $kubeVersion)) (semverCompare "<1.25-0" $kubeVersion) -}}
+{{- print "pod-security.admission.config.k8s.io/v1beta1" -}}
+{{- else -}}
+{{- print "pod-security.admission.config.k8s.io/v1" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Returns true if the used Helm version is 3.3+.
+A way to check the used Helm version was not introduced until version 3.3.0 with .Capabilities.HelmVersion, which contains an additional "{}}" structure.
+This check is introduced as a regexMatch instead of {{ if .Capabilities.HelmVersion }} because checking for the key HelmVersion in <3.3 results in a "interface not found" error.
+**To be removed when the catalog's minimun Helm version is 3.3**
+*/}}
+{{- define "common.capabilities.supportsHelmVersion" -}}
+{{- if regexMatch "{(v[0-9])*[^}]*}}$" (.Capabilities | toString ) }}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_certs.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_certs.tpl
new file mode 100644
index 0000000..55efc51
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_certs.tpl
@@ -0,0 +1,51 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Returns a space-separated list of Subject Alternative Names (SANs) to create a TLS certificate
+Usage:
+{{ include "common.certs.sans" (dict "namespace" "default" "clusterDomain" "cluster.local" "serviceName" "my-service" "headlessServiceName" "my-service-headless" "loopback" true "extraSANs" (list "custom.domain.com")) }}
+
+Params:
+ - namespace - String - Required - Namespace where the app which we are generating the certificate for is deployed.
+ - clusterDomain - String - Optional - Cluster domain. Default is "cluster.local".
+ - serviceName - String - Optional - App service name. If provided, the following SANs will be generated:
+ - serviceName.namespace.svc.clusterDomain
+ - serviceName.namespace.svc
+ - serviceName.namespace
+ - serviceName
+ - headlessServiceName - String - Optional - App headless service name. If provided, the following wildcard SANs will be generated:
+ - *.headlessServiceName.namespace.svc.clusterDomain
+ - *.headlessServiceName.namespace.svc
+ - *.headlessServiceName.namespace
+ - *.headlessServiceName
+ - extraSANs - List - Optional - Additional custom SANs to be added.
+ - loopback - Boolean - Optional - If true, "localhost" will be added to the SANs.
+*/}}
+{{- define "common.certs.sans" -}}
+{{- $sans := list }}
+{{- if .serviceName -}}
+ {{- $sans = append $sans (printf "%s.%s.svc.%s" .serviceName .namespace (default "cluster.local" .clusterDomain)) -}}
+ {{- $sans = append $sans (printf "%s.%s.svc" .serviceName .namespace) -}}
+ {{- $sans = append $sans (printf "%s.%s" .serviceName .namespace) -}}
+ {{- $sans = append $sans .serviceName -}}
+{{- end -}}
+{{- if .headlessServiceName -}}
+ {{- /* Include wildcard SANs for headless service */ -}}
+ {{- $sans = append $sans (printf "*.%s.%s.svc.%s" .headlessServiceName .namespace (default "cluster.local" .clusterDomain)) -}}
+ {{- $sans = append $sans (printf "*.%s.%s.svc" .headlessServiceName .namespace) -}}
+ {{- $sans = append $sans (printf "*.%s.%s" .headlessServiceName .namespace) -}}
+ {{- $sans = append $sans (printf "*.%s" .headlessServiceName) -}}
+{{- end -}}
+{{- range .extraSANs }}
+ {{- $sans = append $sans . -}}
+{{- end -}}
+{{- if (default false .loopback) -}}
+ {{- $sans = append $sans "localhost" }}
+{{- end -}}
+{{- join " " $sans | trim -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_compatibility.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_compatibility.tpl
new file mode 100644
index 0000000..19c26db
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_compatibility.tpl
@@ -0,0 +1,46 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Return true if the detected platform is Openshift
+Usage:
+{{- include "common.compatibility.isOpenshift" . -}}
+*/}}
+{{- define "common.compatibility.isOpenshift" -}}
+{{- if .Capabilities.APIVersions.Has "security.openshift.io/v1" -}}
+{{- true -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Render a compatible securityContext depending on the platform. By default it is maintained as it is. In other platforms like Openshift we remove default user/group values that do not work out of the box with the restricted-v1 SCC
+Usage:
+{{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.containerSecurityContext "context" $) -}}
+*/}}
+{{- define "common.compatibility.renderSecurityContext" -}}
+{{- $adaptedContext := .secContext -}}
+
+{{- if (((.context.Values.global).compatibility).openshift) -}}
+ {{- if or (eq .context.Values.global.compatibility.openshift.adaptSecurityContext "force") (and (eq .context.Values.global.compatibility.openshift.adaptSecurityContext "auto") (include "common.compatibility.isOpenshift" .context)) -}}
+ {{/* Remove incompatible user/group values that do not work in Openshift out of the box */}}
+ {{- $adaptedContext = omit $adaptedContext "fsGroup" "runAsUser" "runAsGroup" -}}
+ {{- if not .secContext.seLinuxOptions -}}
+ {{/* If it is an empty object, we remove it from the resulting context because it causes validation issues */}}
+ {{- $adaptedContext = omit $adaptedContext "seLinuxOptions" -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+{{/* Remove empty seLinuxOptions object if global.compatibility.omitEmptySeLinuxOptions is set to true */}}
+{{- if and (((.context.Values.global).compatibility).omitEmptySeLinuxOptions) (not .secContext.seLinuxOptions) -}}
+ {{- $adaptedContext = omit $adaptedContext "seLinuxOptions" -}}
+{{- end -}}
+{{/* Remove fields that are disregarded when running the container in privileged mode */}}
+{{- if $adaptedContext.privileged -}}
+ {{- $adaptedContext = omit $adaptedContext "capabilities" -}}
+{{- end -}}
+{{- omit $adaptedContext "enabled" | toYaml -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_errors.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_errors.tpl
new file mode 100644
index 0000000..fb704c9
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_errors.tpl
@@ -0,0 +1,92 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Throw error when upgrading using empty passwords values that must not be empty.
+
+Usage:
+{{- $validationError00 := include "common.validations.values.single.empty" (dict "valueKey" "path.to.password00" "secret" "secretName" "field" "password-00") -}}
+{{- $validationError01 := include "common.validations.values.single.empty" (dict "valueKey" "path.to.password01" "secret" "secretName" "field" "password-01") -}}
+{{ include "common.errors.upgrade.passwords.empty" (dict "validationErrors" (list $validationError00 $validationError01) "context" $) }}
+
+Required password params:
+ - validationErrors - String - Required. List of validation strings to be return, if it is empty it won't throw error.
+ - context - Context - Required. Parent context.
+*/}}
+{{- define "common.errors.upgrade.passwords.empty" -}}
+ {{- $validationErrors := join "" .validationErrors -}}
+ {{- if and $validationErrors .context.Release.IsUpgrade -}}
+ {{- $errorString := "\nPASSWORDS ERROR: You must provide your current passwords when upgrading the release." -}}
+ {{- $errorString = print $errorString "\n Note that even after reinstallation, old credentials may be needed as they may be kept in persistent volume claims." -}}
+ {{- $errorString = print $errorString "\n Further information can be obtained at https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues/#credential-errors-while-upgrading-chart-releases" -}}
+ {{- $errorString = print $errorString "\n%s" -}}
+ {{- printf $errorString $validationErrors | fail -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Throw error when original container images are replaced.
+The error can be bypassed by setting the "global.security.allowInsecureImages" to true. In this case,
+a warning message will be shown instead.
+
+Usage:
+{{ include "common.errors.insecureImages" (dict "images" (list .Values.path.to.the.imageRoot) "context" $) }}
+*/}}
+{{- define "common.errors.insecureImages" -}}
+{{- $relocatedImages := list -}}
+{{- $replacedImages := list -}}
+{{- $bitnamiLegacyImages := list -}}
+{{- $retaggedImages := list -}}
+{{- $globalRegistry := ((.context.Values.global).imageRegistry) -}}
+{{- $originalImages := .context.Chart.Annotations.images -}}
+{{- range .images -}}
+ {{- $registryName := default .registry $globalRegistry -}}
+ {{- $fullImageNameNoTag := printf "%s/%s" $registryName .repository -}}
+ {{- $fullImageName := printf "%s:%s" $fullImageNameNoTag .tag -}}
+ {{- if not (contains $fullImageNameNoTag $originalImages) -}}
+ {{- if not (contains $registryName $originalImages) -}}
+ {{- $relocatedImages = append $relocatedImages $fullImageName -}}
+ {{- else if not (contains .repository $originalImages) -}}
+ {{- $replacedImages = append $replacedImages $fullImageName -}}
+ {{- if contains "docker.io/bitnamilegacy/" $fullImageNameNoTag -}}
+ {{- $bitnamiLegacyImages = append $bitnamiLegacyImages $fullImageName -}}
+ {{- end -}}
+ {{- end -}}
+ {{- end -}}
+ {{- if not (contains (printf "%s:%s" .repository .tag) $originalImages) -}}
+ {{- $retaggedImages = append $retaggedImages $fullImageName -}}
+ {{- end -}}
+{{- end -}}
+
+{{- if and (or (gt (len $relocatedImages) 0) (gt (len $replacedImages) 0)) (((.context.Values.global).security).allowInsecureImages) -}}
+ {{- print "\n\n⚠ SECURITY WARNING: Verifying original container images was skipped. Please note this Helm chart was designed, tested, and validated on multiple platforms using a specific set of Bitnami and Bitnami Secure Images containers. Substituting other containers is likely to cause degraded security and performance, broken chart features, and missing environment variables.\n" -}}
+{{- else if (or (gt (len $relocatedImages) 0) (gt (len $replacedImages) 0)) -}}
+ {{- $errorString := "Original containers have been substituted for unrecognized ones. Deploying this chart with non-standard containers is likely to cause degraded security and performance, broken chart features, and missing environment variables." -}}
+ {{- $errorString = print $errorString "\n\nUnrecognized images:" -}}
+ {{- range (concat $relocatedImages $replacedImages) -}}
+ {{- $errorString = print $errorString "\n - " . -}}
+ {{- end -}}
+ {{- if and (eq (len $relocatedImages) 0) (eq (len $replacedImages) (len $bitnamiLegacyImages)) -}}
+ {{- $errorString = print "\n\n⚠ WARNING: " $errorString -}}
+ {{- print $errorString -}}
+ {{- else if or (contains "docker.io/bitnami/" $originalImages) (contains "docker.io/bitnamiprem/" $originalImages) (contains "docker.io/bitnamisecure/" $originalImages) -}}
+ {{- $errorString = print "\n\n⚠ ERROR: " $errorString -}}
+ {{- $errorString = print $errorString "\n\nIf you are sure you want to proceed with non-standard containers, you can skip container image verification by setting the global parameter 'global.security.allowInsecureImages' to true." -}}
+ {{- $errorString = print $errorString "\nFurther information can be obtained at https://github.com/bitnami/charts/issues/30850" -}}
+ {{- print $errorString | fail -}}
+ {{- else if gt (len $replacedImages) 0 -}}
+ {{- $errorString = print "\n\n⚠ WARNING: " $errorString -}}
+ {{- print $errorString -}}
+ {{- end -}}
+{{- else if gt (len $retaggedImages) 0 -}}
+ {{- $warnString := "\n\n⚠ WARNING: Original containers have been retagged. Please note this Helm chart was tested, and validated on multiple platforms using a specific set of Bitnami and Bitnami Secure Images containers. Substituting original image tags could cause unexpected behavior." -}}
+ {{- $warnString = print $warnString "\n\nRetagged images:" -}}
+ {{- range $retaggedImages -}}
+ {{- $warnString = print $warnString "\n - " . -}}
+ {{- end -}}
+ {{- print $warnString -}}
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_fips.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_fips.tpl
new file mode 100644
index 0000000..fd0d06a
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_fips.tpl
@@ -0,0 +1,73 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Enable FIPS features
+{{ include "common.fips.enabled" . }}
+*/}}
+{{- define "common.fips.enabled" -}}
+ {{- $fips := .Chart.Annotations.fips -}}
+ {{- if eq "true" $fips -}}
+ {{- true -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Get FIPS environment variable value for the given tech
+{{ include "common.fips.config" (dict "tech" "openssl|java|golang" "fips" .Values.fips "global" .Values.global) }}
+*/}}
+{{- define "common.fips.config" -}}
+ {{- $availableTechs := list "openssl" "java" "golang" -}}
+ {{- if not (has .tech $availableTechs) -}}
+ {{- printf "The common.fips.config method can only provide configuration for: %s" $availableTechs | fail -}}
+ {{- end -}}
+ {{- $tech := get (.fips) .tech -}}
+ {{- $value := $tech | default (.global).defaultFips -}}
+ {{- if empty $value -}}
+ {{- printf "Please configure a value for 'fips.%s' or 'global.defaultFips'" .tech | fail -}}
+ {{- else -}}
+ {{- $method := printf "common.fips.%s" .tech -}}
+ {{- include $method (dict "value" $value) | trim | print -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Map OpenSSL values for FIPS configuration
+{{ include "common.fips.openssl" (dict "value" "restricted") }}
+*/}}
+{{- define "common.fips.openssl" -}}
+ {{- ternary "yes" "no" (eq .value "restricted") | print -}}
+{{- end -}}
+
+{{/*
+Map JAVA values for FIPS configuration
+{{ include "common.fips.java" (dict "value" "restricted") }}
+*/}}
+{{- define "common.fips.java" -}}
+ {{- $suffix := ternary "original" .value (eq .value "off") -}}
+ {{- $javaSecurityFile := printf "java.security.%s" $suffix -}}
+ {{/* The two equals signs mean the property file will completely override the master properties file */}}
+ {{- $javaSecurityOpt := printf "-Djava.security.properties==/opt/bitnami/java/conf/security/%s" $javaSecurityFile -}}
+ {{- $bcModulesFlag := "--module-path=/opt/bitnami/bc-fips/" -}}
+ {{- $restrictedFlags := printf "%s %s" $bcModulesFlag $javaSecurityOpt -}}
+
+ {{- ternary $restrictedFlags $javaSecurityOpt (eq .value "restricted") | print -}}
+{{- end -}}
+
+{{/*
+Map Golang values for FIPS configuration
+{{ include "common.fips.golang" (dict "value" "restricted") }}
+*/}}
+{{- define "common.fips.golang" -}}
+ {{- if eq .value "restricted" -}}
+ {{- print "fips140=only" -}}
+ {{- else if eq .value "relaxed" -}}
+ {{- print "fips140=on" -}}
+ {{- else -}}
+ {{- print "fips140=off" -}}
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_images.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_images.tpl
new file mode 100644
index 0000000..76bb7ce
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_images.tpl
@@ -0,0 +1,115 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Return the proper image name.
+If image tag and digest are not defined, termination fallbacks to chart appVersion.
+{{ include "common.images.image" ( dict "imageRoot" .Values.path.to.the.image "global" .Values.global "chart" .Chart ) }}
+*/}}
+{{- define "common.images.image" -}}
+{{- $registryName := default .imageRoot.registry ((.global).imageRegistry) -}}
+{{- $repositoryName := .imageRoot.repository -}}
+{{- $separator := ":" -}}
+{{- $termination := .imageRoot.tag | toString -}}
+
+{{- if not .imageRoot.tag }}
+ {{- if .chart }}
+ {{- $termination = .chart.AppVersion | toString -}}
+ {{- end -}}
+{{- end -}}
+{{- if .imageRoot.digest }}
+ {{- $separator = "@" -}}
+ {{- $termination = .imageRoot.digest | toString -}}
+{{- end -}}
+{{- if $registryName }}
+ {{- printf "%s/%s%s%s" $registryName $repositoryName $separator $termination -}}
+{{- else -}}
+ {{- printf "%s%s%s" $repositoryName $separator $termination -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the proper Docker Image Registry Secret Names (deprecated: use common.images.renderPullSecrets instead)
+{{ include "common.images.pullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global) }}
+*/}}
+{{- define "common.images.pullSecrets" -}}
+ {{- $pullSecrets := list }}
+
+ {{- range ((.global).imagePullSecrets) -}}
+ {{- if kindIs "map" . -}}
+ {{- $pullSecrets = append $pullSecrets .name -}}
+ {{- else -}}
+ {{- $pullSecrets = append $pullSecrets . -}}
+ {{- end }}
+ {{- end -}}
+
+ {{- range .images -}}
+ {{- range .pullSecrets -}}
+ {{- if kindIs "map" . -}}
+ {{- $pullSecrets = append $pullSecrets .name -}}
+ {{- else -}}
+ {{- $pullSecrets = append $pullSecrets . -}}
+ {{- end -}}
+ {{- end -}}
+ {{- end -}}
+
+ {{- if (not (empty $pullSecrets)) -}}
+imagePullSecrets:
+ {{- range $pullSecrets | uniq }}
+ - name: {{ . }}
+ {{- end }}
+ {{- end }}
+{{- end -}}
+
+{{/*
+Return the proper Docker Image Registry Secret Names evaluating values as templates
+{{ include "common.images.renderPullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "context" $) }}
+*/}}
+{{- define "common.images.renderPullSecrets" -}}
+ {{- $pullSecrets := list }}
+ {{- $context := .context }}
+
+ {{- range (($context.Values.global).imagePullSecrets) -}}
+ {{- if kindIs "map" . -}}
+ {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" .name "context" $context)) -}}
+ {{- else -}}
+ {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" . "context" $context)) -}}
+ {{- end -}}
+ {{- end -}}
+
+ {{- range .images -}}
+ {{- range .pullSecrets -}}
+ {{- if kindIs "map" . -}}
+ {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" .name "context" $context)) -}}
+ {{- else -}}
+ {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" . "context" $context)) -}}
+ {{- end -}}
+ {{- end -}}
+ {{- end -}}
+
+ {{- if (not (empty $pullSecrets)) -}}
+imagePullSecrets:
+ {{- range $pullSecrets | uniq }}
+ - name: {{ . }}
+ {{- end }}
+ {{- end }}
+{{- end -}}
+
+{{/*
+Return the proper image version (ingores image revision/prerelease info & fallbacks to chart appVersion)
+{{ include "common.images.version" ( dict "imageRoot" .Values.path.to.the.image "chart" .Chart ) }}
+*/}}
+{{- define "common.images.version" -}}
+{{- $imageTag := .imageRoot.tag | toString -}}
+{{/* regexp from https://github.com/Masterminds/semver/blob/23f51de38a0866c5ef0bfc42b3f735c73107b700/version.go#L41-L44 */}}
+{{- if regexMatch `^([0-9]+)(\.[0-9]+)?(\.[0-9]+)?(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?$` $imageTag -}}
+ {{- $version := semver $imageTag -}}
+ {{- printf "%d.%d.%d" $version.Major $version.Minor $version.Patch -}}
+{{- else -}}
+ {{- print .chart.AppVersion -}}
+{{- end -}}
+{{- end -}}
+
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_ingress.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_ingress.tpl
new file mode 100644
index 0000000..2d0dbf1
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_ingress.tpl
@@ -0,0 +1,41 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Generate backend entry that is compatible with all Kubernetes API versions.
+
+Usage:
+{{ include "common.ingress.backend" (dict "serviceName" "backendName" "servicePort" "backendPort" "context" $) }}
+
+Params:
+ - serviceName - String. Name of an existing service backend
+ - servicePort - String/Int. Port name (or number) of the service. It will be translated to different yaml depending if it is a string or an integer.
+ - context - Dict - Required. The context for the template evaluation.
+*/}}
+{{- define "common.ingress.backend" -}}
+service:
+ name: {{ .serviceName }}
+ port:
+ {{- if typeIs "string" .servicePort }}
+ name: {{ .servicePort }}
+ {{- else if or (typeIs "int" .servicePort) (typeIs "float64" .servicePort) }}
+ number: {{ .servicePort | int }}
+ {{- end }}
+{{- end -}}
+
+{{/*
+Return true if cert-manager required annotations for TLS signed
+certificates are set in the Ingress annotations
+Ref: https://cert-manager.io/docs/usage/ingress/#supported-annotations
+Usage:
+{{ include "common.ingress.certManagerRequest" ( dict "annotations" .Values.path.to.the.ingress.annotations ) }}
+*/}}
+{{- define "common.ingress.certManagerRequest" -}}
+{{ if or (hasKey .annotations "cert-manager.io/cluster-issuer") (hasKey .annotations "cert-manager.io/issuer") (hasKey .annotations "kubernetes.io/tls-acme") }}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_labels.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_labels.tpl
new file mode 100644
index 0000000..4c98597
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_labels.tpl
@@ -0,0 +1,46 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Kubernetes standard labels
+{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}}
+*/}}
+{{- define "common.labels.standard" -}}
+{{- if and (hasKey . "customLabels") (hasKey . "context") -}}
+{{- $default := dict "app.kubernetes.io/name" (include "common.names.name" .context) "helm.sh/chart" (include "common.names.chart" .context) "app.kubernetes.io/instance" .context.Release.Name "app.kubernetes.io/managed-by" .context.Release.Service -}}
+{{- with .context.Chart.AppVersion -}}
+{{- $_ := set $default "app.kubernetes.io/version" . -}}
+{{- end -}}
+{{ template "common.tplvalues.merge" (dict "values" (list .customLabels $default) "context" .context) }}
+{{- else -}}
+app.kubernetes.io/name: {{ include "common.names.name" . }}
+helm.sh/chart: {{ include "common.names.chart" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- with .Chart.AppVersion }}
+app.kubernetes.io/version: {{ . | replace "+" "_" | quote }}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector
+{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}}
+
+We don't want to loop over custom labels appending them to the selector
+since it's very likely that it will break deployments, services, etc.
+However, it's important to overwrite the standard labels if the user
+overwrote them on metadata.labels fields.
+*/}}
+{{- define "common.labels.matchLabels" -}}
+{{- if and (hasKey . "customLabels") (hasKey . "context") -}}
+{{ merge (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") (dict "app.kubernetes.io/name" (include "common.names.name" .context) "app.kubernetes.io/instance" .context.Release.Name ) | toYaml }}
+{{- else -}}
+app.kubernetes.io/name: {{ include "common.names.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_names.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_names.tpl
new file mode 100644
index 0000000..d5d0ae4
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_names.tpl
@@ -0,0 +1,72 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "common.names.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "common.names.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "common.names.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- $releaseName := regexReplaceAll "(-?[^a-z\\d\\-])+-?" (lower .Release.Name) "-" -}}
+{{- if contains $name $releaseName -}}
+{{- $releaseName | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" $releaseName $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified dependency name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+Usage:
+{{ include "common.names.dependency.fullname" (dict "chartName" "dependency-chart-name" "chartValues" .Values.dependency-chart "context" $) }}
+*/}}
+{{- define "common.names.dependency.fullname" -}}
+{{- if .chartValues.fullnameOverride -}}
+{{- .chartValues.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .chartName .chartValues.nameOverride -}}
+{{- if contains $name .context.Release.Name -}}
+{{- .context.Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .context.Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Allow the release namespace to be overridden for multi-namespace deployments in combined charts.
+*/}}
+{{- define "common.names.namespace" -}}
+{{- default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a fully qualified app name adding the installation's namespace.
+*/}}
+{{- define "common.names.fullname.namespace" -}}
+{{- printf "%s-%s" (include "common.names.fullname" .) (include "common.names.namespace" .) | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_resources.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_resources.tpl
new file mode 100644
index 0000000..d8a43e1
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_resources.tpl
@@ -0,0 +1,50 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Return a resource request/limit object based on a given preset.
+These presets are for basic testing and not meant to be used in production
+{{ include "common.resources.preset" (dict "type" "nano") -}}
+*/}}
+{{- define "common.resources.preset" -}}
+{{/* The limits are the requests increased by 50% (except ephemeral-storage and xlarge/2xlarge sizes)*/}}
+{{- $presets := dict
+ "nano" (dict
+ "requests" (dict "cpu" "100m" "memory" "128Mi" "ephemeral-storage" "50Mi")
+ "limits" (dict "cpu" "150m" "memory" "192Mi" "ephemeral-storage" "2Gi")
+ )
+ "micro" (dict
+ "requests" (dict "cpu" "250m" "memory" "256Mi" "ephemeral-storage" "50Mi")
+ "limits" (dict "cpu" "375m" "memory" "384Mi" "ephemeral-storage" "2Gi")
+ )
+ "small" (dict
+ "requests" (dict "cpu" "500m" "memory" "512Mi" "ephemeral-storage" "50Mi")
+ "limits" (dict "cpu" "750m" "memory" "768Mi" "ephemeral-storage" "2Gi")
+ )
+ "medium" (dict
+ "requests" (dict "cpu" "500m" "memory" "1024Mi" "ephemeral-storage" "50Mi")
+ "limits" (dict "cpu" "750m" "memory" "1536Mi" "ephemeral-storage" "2Gi")
+ )
+ "large" (dict
+ "requests" (dict "cpu" "1.0" "memory" "2048Mi" "ephemeral-storage" "50Mi")
+ "limits" (dict "cpu" "1.5" "memory" "3072Mi" "ephemeral-storage" "2Gi")
+ )
+ "xlarge" (dict
+ "requests" (dict "cpu" "1.0" "memory" "3072Mi" "ephemeral-storage" "50Mi")
+ "limits" (dict "cpu" "3.0" "memory" "6144Mi" "ephemeral-storage" "2Gi")
+ )
+ "2xlarge" (dict
+ "requests" (dict "cpu" "1.0" "memory" "3072Mi" "ephemeral-storage" "50Mi")
+ "limits" (dict "cpu" "6.0" "memory" "12288Mi" "ephemeral-storage" "2Gi")
+ )
+ }}
+{{- if hasKey $presets .type -}}
+{{- index $presets .type | toYaml -}}
+{{- else -}}
+{{- printf "ERROR: Preset key '%s' invalid. Allowed values are %s" .type (join "," (keys $presets)) | fail -}}
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_secrets.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_secrets.tpl
new file mode 100644
index 0000000..7868c00
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_secrets.tpl
@@ -0,0 +1,192 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Generate secret name.
+
+Usage:
+{{ include "common.secrets.name" (dict "existingSecret" .Values.path.to.the.existingSecret "defaultNameSuffix" "mySuffix" "context" $) }}
+
+Params:
+ - existingSecret - ExistingSecret/String - Optional. The path to the existing secrets in the values.yaml given by the user
+ to be used instead of the default one. Allows for it to be of type String (just the secret name) for backwards compatibility.
+ +info: https://github.com/bitnami/charts/tree/main/bitnami/common#existingsecret
+ - defaultNameSuffix - String - Optional. It is used only if we have several secrets in the same deployment.
+ - context - Dict - Required. The context for the template evaluation.
+*/}}
+{{- define "common.secrets.name" -}}
+{{- $name := (include "common.names.fullname" .context) -}}
+
+{{- if .defaultNameSuffix -}}
+{{- $name = printf "%s-%s" $name .defaultNameSuffix | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- with .existingSecret -}}
+{{- if not (typeIs "string" .) -}}
+{{- with .name -}}
+{{- $name = . -}}
+{{- end -}}
+{{- else -}}
+{{- $name = . -}}
+{{- end -}}
+{{- end -}}
+
+{{- printf "%s" $name -}}
+{{- end -}}
+
+{{/*
+Generate secret key.
+
+Usage:
+{{ include "common.secrets.key" (dict "existingSecret" .Values.path.to.the.existingSecret "key" "keyName") }}
+
+Params:
+ - existingSecret - ExistingSecret/String - Optional. The path to the existing secrets in the values.yaml given by the user
+ to be used instead of the default one. Allows for it to be of type String (just the secret name) for backwards compatibility.
+ +info: https://github.com/bitnami/charts/tree/main/bitnami/common#existingsecret
+ - key - String - Required. Name of the key in the secret.
+*/}}
+{{- define "common.secrets.key" -}}
+{{- $key := .key -}}
+
+{{- if .existingSecret -}}
+ {{- if not (typeIs "string" .existingSecret) -}}
+ {{- if .existingSecret.keyMapping -}}
+ {{- $key = index .existingSecret.keyMapping $.key -}}
+ {{- end -}}
+ {{- end }}
+{{- end -}}
+
+{{- printf "%s" $key -}}
+{{- end -}}
+
+{{/*
+Generate secret password or retrieve one if already created.
+
+Usage:
+{{ include "common.secrets.passwords.manage" (dict "secret" "secret-name" "key" "keyName" "providedValues" (list "path.to.password1" "path.to.password2") "length" 10 "strong" false "chartName" "chartName" "honorProvidedValues" false "context" $) }}
+
+Params:
+ - secret - String - Required - Name of the 'Secret' resource where the password is stored.
+ - key - String - Required - Name of the key in the secret.
+ - providedValues - List - Required - The path to the validating value in the values.yaml, e.g: "mysql.password". Will pick first parameter with a defined value.
+ - length - int - Optional - Length of the generated random password.
+ - strong - Boolean - Optional - Whether to add symbols to the generated random password.
+ - chartName - String - Optional - Name of the chart used when said chart is deployed as a subchart.
+ - context - Context - Required - Parent context.
+ - failOnNew - Boolean - Optional - Default to true. If set to false, skip errors adding new keys to existing secrets.
+ - skipB64enc - Boolean - Optional - Default to false. If set to true, no the secret will not be base64 encrypted.
+ - skipQuote - Boolean - Optional - Default to false. If set to true, no quotes will be added around the secret.
+ - honorProvidedValues - Boolean - Optional - Default to false. If set to true, the values in providedValues have higher priority than an existing secret
+The order in which this function returns a secret password:
+ 1. Password provided via the values.yaml if honorProvidedValues = true
+ (If one of the keys passed to the 'providedValues' parameter to this function is a valid path to a key in the values.yaml and has a value, the value of the first key with a value will be returned)
+ 2. Already existing 'Secret' resource
+ (If a 'Secret' resource is found under the name provided to the 'secret' parameter to this function and that 'Secret' resource contains a key with the name passed as the 'key' parameter to this function then the value of this existing secret password will be returned)
+ 3. Password provided via the values.yaml if honorProvidedValues = false
+ (If one of the keys passed to the 'providedValues' parameter to this function is a valid path to a key in the values.yaml and has a value, the value of the first key with a value will be returned)
+ 4. Randomly generated secret password
+ (A new random secret password with the length specified in the 'length' parameter will be generated and returned)
+
+*/}}
+{{- define "common.secrets.passwords.manage" -}}
+
+{{- $password := "" }}
+{{- $subchart := "" }}
+{{- $chartName := default "" .chartName }}
+{{- $passwordLength := default 10 .length }}
+{{- $providedPasswordKey := include "common.utils.getKeyFromList" (dict "keys" .providedValues "context" $.context) }}
+{{- $providedPasswordValue := include "common.utils.getValueFromKey" (dict "key" $providedPasswordKey "context" $.context) }}
+{{- $secretData := (lookup "v1" "Secret" (include "common.names.namespace" .context) .secret).data }}
+{{- if $secretData }}
+ {{- if hasKey $secretData .key }}
+ {{- $password = index $secretData .key | b64dec }}
+ {{- else if not (eq .failOnNew false) }}
+ {{- printf "\nPASSWORDS ERROR: The secret \"%s\" does not contain the key \"%s\"\n" .secret .key | fail -}}
+ {{- end -}}
+{{- end }}
+
+{{- if and $providedPasswordValue .honorProvidedValues }}
+ {{- $password = tpl ($providedPasswordValue | toString) .context }}
+{{- end }}
+
+{{- if not $password }}
+ {{- if $providedPasswordValue }}
+ {{- $password = tpl ($providedPasswordValue | toString) .context }}
+ {{- else }}
+ {{- if .context.Values.enabled }}
+ {{- $subchart = $chartName }}
+ {{- end -}}
+
+ {{- if not (eq .failOnNew false) }}
+ {{- $requiredPassword := dict "valueKey" $providedPasswordKey "secret" .secret "field" .key "subchart" $subchart "context" $.context -}}
+ {{- $requiredPasswordError := include "common.validations.values.single.empty" $requiredPassword -}}
+ {{- $passwordValidationErrors := list $requiredPasswordError -}}
+ {{- include "common.errors.upgrade.passwords.empty" (dict "validationErrors" $passwordValidationErrors "context" $.context) -}}
+ {{- end }}
+
+ {{- if .strong }}
+ {{- $subStr := list (lower (randAlpha 1)) (randNumeric 1) (upper (randAlpha 1)) | join "_" }}
+ {{- $password = randAscii $passwordLength }}
+ {{- $password = regexReplaceAllLiteral "\\W" $password "@" | substr 5 $passwordLength }}
+ {{- $password = printf "%s%s" $subStr $password | toString | shuffle }}
+ {{- else }}
+ {{- $password = randAlphaNum $passwordLength }}
+ {{- end }}
+ {{- end -}}
+{{- end -}}
+{{- if not .skipB64enc }}
+{{- $password = $password | b64enc }}
+{{- end -}}
+{{- if .skipQuote -}}
+{{- printf "%s" $password -}}
+{{- else -}}
+{{- printf "%s" $password | quote -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Reuses the value from an existing secret, otherwise sets its value to a default value.
+
+Usage:
+{{ include "common.secrets.lookup" (dict "secret" "secret-name" "key" "keyName" "defaultValue" .Values.myValue "context" $) }}
+
+Params:
+ - secret - String - Required - Name of the 'Secret' resource where the password is stored.
+ - key - String - Required - Name of the key in the secret.
+ - defaultValue - String - Required - The path to the validating value in the values.yaml, e.g: "mysql.password". Will pick first parameter with a defined value.
+ - context - Context - Required - Parent context.
+
+*/}}
+{{- define "common.secrets.lookup" -}}
+{{- $value := "" -}}
+{{- $secretData := (lookup "v1" "Secret" (include "common.names.namespace" .context) .secret).data -}}
+{{- if and $secretData (hasKey $secretData .key) -}}
+ {{- $value = index $secretData .key -}}
+{{- else if .defaultValue -}}
+ {{- $value = .defaultValue | toString | b64enc -}}
+{{- end -}}
+{{- if $value -}}
+{{- printf "%s" $value -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Returns whether a previous generated secret already exists
+
+Usage:
+{{ include "common.secrets.exists" (dict "secret" "secret-name" "context" $) }}
+
+Params:
+ - secret - String - Required - Name of the 'Secret' resource where the password is stored.
+ - context - Context - Required - Parent context.
+*/}}
+{{- define "common.secrets.exists" -}}
+{{- $secret := (lookup "v1" "Secret" (include "common.names.namespace" .context) .secret) }}
+{{- if $secret }}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_storage.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_storage.tpl
new file mode 100644
index 0000000..aa75856
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_storage.tpl
@@ -0,0 +1,21 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Return the proper Storage Class
+{{ include "common.storage.class" ( dict "persistence" .Values.path.to.the.persistence "global" $) }}
+*/}}
+{{- define "common.storage.class" -}}
+{{- $storageClass := (.global).storageClass | default .persistence.storageClass | default (.global).defaultStorageClass | default "" -}}
+{{- if $storageClass -}}
+ {{- if (eq "-" $storageClass) -}}
+ {{- printf "storageClassName: \"\"" -}}
+ {{- else -}}
+ {{- printf "storageClassName: %s" $storageClass -}}
+ {{- end -}}
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_tplvalues.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_tplvalues.tpl
new file mode 100644
index 0000000..a04f4c1
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_tplvalues.tpl
@@ -0,0 +1,52 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Renders a value that contains template perhaps with scope if the scope is present.
+Usage:
+{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ ) }}
+{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ "scope" $app ) }}
+*/}}
+{{- define "common.tplvalues.render" -}}
+{{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }}
+{{- if contains "{{" (toJson .value) }}
+ {{- if .scope }}
+ {{- tpl (cat "{{- with $.RelativeScope -}}" $value "{{- end }}") (merge (dict "RelativeScope" .scope) .context) }}
+ {{- else }}
+ {{- tpl $value .context }}
+ {{- end }}
+{{- else }}
+ {{- $value }}
+{{- end }}
+{{- end -}}
+
+{{/*
+Merge a list of values that contains template after rendering them.
+Merge precedence is consistent with http://masterminds.github.io/sprig/dicts.html#merge-mustmerge
+Usage:
+{{ include "common.tplvalues.merge" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }}
+*/}}
+{{- define "common.tplvalues.merge" -}}
+{{- $dst := dict -}}
+{{- range .values -}}
+{{- $dst = include "common.tplvalues.render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | merge $dst -}}
+{{- end -}}
+{{ $dst | toYaml }}
+{{- end -}}
+
+{{/*
+Merge a list of values that contains template after rendering them.
+Merge precedence is consistent with https://masterminds.github.io/sprig/dicts.html#mergeoverwrite-mustmergeoverwrite
+Usage:
+{{ include "common.tplvalues.merge-overwrite" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }}
+*/}}
+{{- define "common.tplvalues.merge-overwrite" -}}
+{{- $dst := dict -}}
+{{- range .values -}}
+{{- $dst = include "common.tplvalues.render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | mergeOverwrite $dst -}}
+{{- end -}}
+{{ $dst | toYaml }}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_utils.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_utils.tpl
new file mode 100644
index 0000000..d53c74a
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_utils.tpl
@@ -0,0 +1,77 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Print instructions to get a secret value.
+Usage:
+{{ include "common.utils.secret.getvalue" (dict "secret" "secret-name" "field" "secret-value-field" "context" $) }}
+*/}}
+{{- define "common.utils.secret.getvalue" -}}
+{{- $varname := include "common.utils.fieldToEnvVar" . -}}
+export {{ $varname }}=$(kubectl get secret --namespace {{ include "common.names.namespace" .context | quote }} {{ .secret }} -o jsonpath="{.data.{{ .field }}}" | base64 -d)
+{{- end -}}
+
+{{/*
+Build env var name given a field
+Usage:
+{{ include "common.utils.fieldToEnvVar" dict "field" "my-password" }}
+*/}}
+{{- define "common.utils.fieldToEnvVar" -}}
+ {{- $fieldNameSplit := splitList "-" .field -}}
+ {{- $upperCaseFieldNameSplit := list -}}
+
+ {{- range $fieldNameSplit -}}
+ {{- $upperCaseFieldNameSplit = append $upperCaseFieldNameSplit ( upper . ) -}}
+ {{- end -}}
+
+ {{ join "_" $upperCaseFieldNameSplit }}
+{{- end -}}
+
+{{/*
+Gets a value from .Values given
+Usage:
+{{ include "common.utils.getValueFromKey" (dict "key" "path.to.key" "context" $) }}
+*/}}
+{{- define "common.utils.getValueFromKey" -}}
+{{- $splitKey := splitList "." .key -}}
+{{- $value := "" -}}
+{{- $latestObj := $.context.Values -}}
+{{- range $splitKey -}}
+ {{- if not $latestObj -}}
+ {{- printf "please review the entire path of '%s' exists in values" $.key | fail -}}
+ {{- end -}}
+ {{- $value = ( index $latestObj . ) -}}
+ {{- $latestObj = $value -}}
+{{- end -}}
+{{- printf "%v" (default "" $value) -}}
+{{- end -}}
+
+{{/*
+Returns first .Values key with a defined value or first of the list if all non-defined
+Usage:
+{{ include "common.utils.getKeyFromList" (dict "keys" (list "path.to.key1" "path.to.key2") "context" $) }}
+*/}}
+{{- define "common.utils.getKeyFromList" -}}
+{{- $key := first .keys -}}
+{{- $reverseKeys := reverse .keys }}
+{{- range $reverseKeys }}
+ {{- $value := include "common.utils.getValueFromKey" (dict "key" . "context" $.context ) }}
+ {{- if $value -}}
+ {{- $key = . }}
+ {{- end -}}
+{{- end -}}
+{{- printf "%s" $key -}}
+{{- end -}}
+
+{{/*
+Checksum a template at "path" containing a *single* resource (ConfigMap,Secret) for use in pod annotations, excluding the metadata (see #18376).
+Usage:
+{{ include "common.utils.checksumTemplate" (dict "path" "/configmap.yaml" "context" $) }}
+*/}}
+{{- define "common.utils.checksumTemplate" -}}
+{{- $obj := include (print .context.Template.BasePath .path) .context | fromYaml -}}
+{{ omit $obj "apiVersion" "kind" "metadata" | toYaml | sha256sum }}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/_warnings.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/_warnings.tpl
new file mode 100644
index 0000000..62c44df
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/_warnings.tpl
@@ -0,0 +1,109 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Warning about using rolling tag.
+Usage:
+{{ include "common.warnings.rollingTag" .Values.path.to.the.imageRoot }}
+*/}}
+{{- define "common.warnings.rollingTag" -}}
+
+{{- if and (contains "bitnami/" .repository) (not (.tag | toString | regexFind "-r\\d+$|sha256:")) }}
+WARNING: Rolling tag detected ({{ .repository }}:{{ .tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment.
++info https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-understand-rolling-tags-containers-index.html
+{{- end }}
+{{- end -}}
+
+{{/*
+Warning about replaced images from the original.
+Usage:
+{{ include "common.warnings.modifiedImages" (dict "images" (list .Values.path.to.the.imageRoot) "context" $) }}
+*/}}
+{{- define "common.warnings.modifiedImages" -}}
+{{- $affectedImages := list -}}
+{{- $printMessage := false -}}
+{{- $originalImages := .context.Chart.Annotations.images -}}
+{{- range .images -}}
+ {{- $fullImageName := printf (printf "%s/%s:%s" .registry .repository .tag) -}}
+ {{- if not (contains $fullImageName $originalImages) }}
+ {{- $affectedImages = append $affectedImages (printf "%s/%s:%s" .registry .repository .tag) -}}
+ {{- $printMessage = true -}}
+ {{- end -}}
+{{- end -}}
+{{- if $printMessage }}
+
+⚠ SECURITY WARNING: Original containers have been substituted. This Helm chart was designed, tested, and validated on multiple platforms using a specific set of Bitnami and Tanzu Application Catalog containers. Substituting other containers is likely to cause degraded security and performance, broken chart features, and missing environment variables.
+
+Substituted images detected:
+{{- range $affectedImages }}
+ - {{ . }}
+{{- end }}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Warning about not setting the resource object in all deployments.
+Usage:
+{{ include "common.warnings.resources" (dict "sections" (list "path1" "path2") context $) }}
+Example:
+{{- include "common.warnings.resources" (dict "sections" (list "csiProvider.provider" "server" "volumePermissions" "") "context" $) }}
+The list in the example assumes that the following values exist:
+ - csiProvider.provider.resources
+ - server.resources
+ - volumePermissions.resources
+ - resources
+*/}}
+{{- define "common.warnings.resources" -}}
+{{- $values := .context.Values -}}
+{{- $printMessage := false -}}
+{{ $affectedSections := list -}}
+{{- range .sections -}}
+ {{- if eq . "" -}}
+ {{/* Case where the resources section is at the root (one main deployment in the chart) */}}
+ {{- if not (index $values "resources") -}}
+ {{- $affectedSections = append $affectedSections "resources" -}}
+ {{- $printMessage = true -}}
+ {{- end -}}
+ {{- else -}}
+ {{/* Case where the are multiple resources sections (more than one main deployment in the chart) */}}
+ {{- $keys := split "." . -}}
+ {{/* We iterate through the different levels until arriving to the resource section. Example: a.b.c.resources */}}
+ {{- $section := $values -}}
+ {{- range $keys -}}
+ {{- $section = index $section . -}}
+ {{- end -}}
+ {{- if not (index $section "resources") -}}
+ {{/* If the section has enabled=false or replicaCount=0, do not include it */}}
+ {{- if and (hasKey $section "enabled") -}}
+ {{- if index $section "enabled" -}}
+ {{/* enabled=true */}}
+ {{- $affectedSections = append $affectedSections (printf "%s.resources" .) -}}
+ {{- $printMessage = true -}}
+ {{- end -}}
+ {{- else if and (hasKey $section "replicaCount") -}}
+ {{/* We need a casting to int because number 0 is not treated as an int by default */}}
+ {{- if (gt (index $section "replicaCount" | int) 0) -}}
+ {{/* replicaCount > 0 */}}
+ {{- $affectedSections = append $affectedSections (printf "%s.resources" .) -}}
+ {{- $printMessage = true -}}
+ {{- end -}}
+ {{- else -}}
+ {{/* Default case, add it to the affected sections */}}
+ {{- $affectedSections = append $affectedSections (printf "%s.resources" .) -}}
+ {{- $printMessage = true -}}
+ {{- end -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+{{- if $printMessage }}
+
+WARNING: There are "resources" sections in the chart not set. Using "resourcesPreset" is not recommended for production. For production installations, please set the following values according to your workload needs:
+{{- range $affectedSections }}
+ - {{ . }}
+{{- end }}
++info https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/validations/_cassandra.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/validations/_cassandra.tpl
new file mode 100644
index 0000000..f8fd213
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/validations/_cassandra.tpl
@@ -0,0 +1,51 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Auxiliary function to get the right value for existingSecret.
+
+Usage:
+{{ include "common.cassandra.values.existingSecret" (dict "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether Cassandra is used as subchart or not. Default: false
+*/}}
+{{- define "common.cassandra.values.existingSecret" -}}
+ {{- if .subchart -}}
+ {{- .context.Values.cassandra.dbUser.existingSecret | quote -}}
+ {{- else -}}
+ {{- .context.Values.dbUser.existingSecret | quote -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for enabled cassandra.
+
+Usage:
+{{ include "common.cassandra.values.enabled" (dict "context" $) }}
+*/}}
+{{- define "common.cassandra.values.enabled" -}}
+ {{- if .subchart -}}
+ {{- printf "%v" .context.Values.cassandra.enabled -}}
+ {{- else -}}
+ {{- printf "%v" (not .context.Values.enabled) -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for the key dbUser
+
+Usage:
+{{ include "common.cassandra.values.key.dbUser" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether Cassandra is used as subchart or not. Default: false
+*/}}
+{{- define "common.cassandra.values.key.dbUser" -}}
+ {{- if .subchart -}}
+ cassandra.dbUser
+ {{- else -}}
+ dbUser
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/validations/_mariadb.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/validations/_mariadb.tpl
new file mode 100644
index 0000000..6ea8c0f
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/validations/_mariadb.tpl
@@ -0,0 +1,108 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Validate MariaDB required passwords are not empty.
+
+Usage:
+{{ include "common.validations.values.mariadb.passwords" (dict "secret" "secretName" "subchart" false "context" $) }}
+Params:
+ - secret - String - Required. Name of the secret where MariaDB values are stored, e.g: "mysql-passwords-secret"
+ - subchart - Boolean - Optional. Whether MariaDB is used as subchart or not. Default: false
+*/}}
+{{- define "common.validations.values.mariadb.passwords" -}}
+ {{- $existingSecret := include "common.mariadb.values.auth.existingSecret" . -}}
+ {{- $enabled := include "common.mariadb.values.enabled" . -}}
+ {{- $architecture := include "common.mariadb.values.architecture" . -}}
+ {{- $authPrefix := include "common.mariadb.values.key.auth" . -}}
+ {{- $valueKeyRootPassword := printf "%s.rootPassword" $authPrefix -}}
+ {{- $valueKeyUsername := printf "%s.username" $authPrefix -}}
+ {{- $valueKeyPassword := printf "%s.password" $authPrefix -}}
+ {{- $valueKeyReplicationPassword := printf "%s.replicationPassword" $authPrefix -}}
+
+ {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}}
+ {{- $requiredPasswords := list -}}
+
+ {{- $requiredRootPassword := dict "valueKey" $valueKeyRootPassword "secret" .secret "field" "mariadb-root-password" -}}
+ {{- $requiredPasswords = append $requiredPasswords $requiredRootPassword -}}
+
+ {{- $valueUsername := include "common.utils.getValueFromKey" (dict "key" $valueKeyUsername "context" .context) }}
+ {{- if not (empty $valueUsername) -}}
+ {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "mariadb-password" -}}
+ {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}}
+ {{- end -}}
+
+ {{- if (eq $architecture "replication") -}}
+ {{- $requiredReplicationPassword := dict "valueKey" $valueKeyReplicationPassword "secret" .secret "field" "mariadb-replication-password" -}}
+ {{- $requiredPasswords = append $requiredPasswords $requiredReplicationPassword -}}
+ {{- end -}}
+
+ {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}}
+
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for existingSecret.
+
+Usage:
+{{ include "common.mariadb.values.auth.existingSecret" (dict "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MariaDB is used as subchart or not. Default: false
+*/}}
+{{- define "common.mariadb.values.auth.existingSecret" -}}
+ {{- if .subchart -}}
+ {{- .context.Values.mariadb.auth.existingSecret | quote -}}
+ {{- else -}}
+ {{- .context.Values.auth.existingSecret | quote -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for enabled mariadb.
+
+Usage:
+{{ include "common.mariadb.values.enabled" (dict "context" $) }}
+*/}}
+{{- define "common.mariadb.values.enabled" -}}
+ {{- if .subchart -}}
+ {{- printf "%v" .context.Values.mariadb.enabled -}}
+ {{- else -}}
+ {{- printf "%v" (not .context.Values.enabled) -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for architecture
+
+Usage:
+{{ include "common.mariadb.values.architecture" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MariaDB is used as subchart or not. Default: false
+*/}}
+{{- define "common.mariadb.values.architecture" -}}
+ {{- if .subchart -}}
+ {{- .context.Values.mariadb.architecture -}}
+ {{- else -}}
+ {{- .context.Values.architecture -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for the key auth
+
+Usage:
+{{ include "common.mariadb.values.key.auth" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MariaDB is used as subchart or not. Default: false
+*/}}
+{{- define "common.mariadb.values.key.auth" -}}
+ {{- if .subchart -}}
+ mariadb.auth
+ {{- else -}}
+ auth
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/validations/_mongodb.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/validations/_mongodb.tpl
new file mode 100644
index 0000000..e678a6d
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/validations/_mongodb.tpl
@@ -0,0 +1,67 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Auxiliary function to get the right value for existingSecret.
+
+Usage:
+{{ include "common.mongodb.values.auth.existingSecret" (dict "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MongoDb is used as subchart or not. Default: false
+*/}}
+{{- define "common.mongodb.values.auth.existingSecret" -}}
+ {{- if .subchart -}}
+ {{- .context.Values.mongodb.auth.existingSecret | quote -}}
+ {{- else -}}
+ {{- .context.Values.auth.existingSecret | quote -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for enabled mongodb.
+
+Usage:
+{{ include "common.mongodb.values.enabled" (dict "context" $) }}
+*/}}
+{{- define "common.mongodb.values.enabled" -}}
+ {{- if .subchart -}}
+ {{- printf "%v" .context.Values.mongodb.enabled -}}
+ {{- else -}}
+ {{- printf "%v" (not .context.Values.enabled) -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for the key auth
+
+Usage:
+{{ include "common.mongodb.values.key.auth" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MongoDB® is used as subchart or not. Default: false
+*/}}
+{{- define "common.mongodb.values.key.auth" -}}
+ {{- if .subchart -}}
+ mongodb.auth
+ {{- else -}}
+ auth
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for architecture
+
+Usage:
+{{ include "common.mongodb.values.architecture" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MongoDB® is used as subchart or not. Default: false
+*/}}
+{{- define "common.mongodb.values.architecture" -}}
+ {{- if .subchart -}}
+ {{- .context.Values.mongodb.architecture -}}
+ {{- else -}}
+ {{- .context.Values.architecture -}}
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/validations/_mysql.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/validations/_mysql.tpl
new file mode 100644
index 0000000..fbb65c3
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/validations/_mysql.tpl
@@ -0,0 +1,67 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Auxiliary function to get the right value for existingSecret.
+
+Usage:
+{{ include "common.mysql.values.auth.existingSecret" (dict "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false
+*/}}
+{{- define "common.mysql.values.auth.existingSecret" -}}
+ {{- if .subchart -}}
+ {{- .context.Values.mysql.auth.existingSecret | quote -}}
+ {{- else -}}
+ {{- .context.Values.auth.existingSecret | quote -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for enabled mysql.
+
+Usage:
+{{ include "common.mysql.values.enabled" (dict "context" $) }}
+*/}}
+{{- define "common.mysql.values.enabled" -}}
+ {{- if .subchart -}}
+ {{- printf "%v" .context.Values.mysql.enabled -}}
+ {{- else -}}
+ {{- printf "%v" (not .context.Values.enabled) -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for architecture
+
+Usage:
+{{ include "common.mysql.values.architecture" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false
+*/}}
+{{- define "common.mysql.values.architecture" -}}
+ {{- if .subchart -}}
+ {{- .context.Values.mysql.architecture -}}
+ {{- else -}}
+ {{- .context.Values.architecture -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for the key auth
+
+Usage:
+{{ include "common.mysql.values.key.auth" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false
+*/}}
+{{- define "common.mysql.values.key.auth" -}}
+ {{- if .subchart -}}
+ mysql.auth
+ {{- else -}}
+ auth
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/validations/_postgresql.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/validations/_postgresql.tpl
new file mode 100644
index 0000000..51d4716
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/validations/_postgresql.tpl
@@ -0,0 +1,105 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Auxiliary function to decide whether evaluate global values.
+
+Usage:
+{{ include "common.postgresql.values.use.global" (dict "key" "key-of-global" "context" $) }}
+Params:
+ - key - String - Required. Field to be evaluated within global, e.g: "existingSecret"
+*/}}
+{{- define "common.postgresql.values.use.global" -}}
+ {{- if .context.Values.global -}}
+ {{- if .context.Values.global.postgresql -}}
+ {{- index .context.Values.global.postgresql .key | quote -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for existingSecret.
+
+Usage:
+{{ include "common.postgresql.values.existingSecret" (dict "context" $) }}
+*/}}
+{{- define "common.postgresql.values.existingSecret" -}}
+ {{- $globalValue := include "common.postgresql.values.use.global" (dict "key" "existingSecret" "context" .context) -}}
+
+ {{- if .subchart -}}
+ {{- default (.context.Values.postgresql.existingSecret | quote) $globalValue -}}
+ {{- else -}}
+ {{- default (.context.Values.existingSecret | quote) $globalValue -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for enabled postgresql.
+
+Usage:
+{{ include "common.postgresql.values.enabled" (dict "context" $) }}
+*/}}
+{{- define "common.postgresql.values.enabled" -}}
+ {{- if .subchart -}}
+ {{- printf "%v" .context.Values.postgresql.enabled -}}
+ {{- else -}}
+ {{- printf "%v" (not .context.Values.enabled) -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for the key postgressPassword.
+
+Usage:
+{{ include "common.postgresql.values.key.postgressPassword" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether postgresql is used as subchart or not. Default: false
+*/}}
+{{- define "common.postgresql.values.key.postgressPassword" -}}
+ {{- $globalValue := include "common.postgresql.values.use.global" (dict "key" "postgresqlUsername" "context" .context) -}}
+
+ {{- if not $globalValue -}}
+ {{- if .subchart -}}
+ postgresql.postgresqlPassword
+ {{- else -}}
+ postgresqlPassword
+ {{- end -}}
+ {{- else -}}
+ global.postgresql.postgresqlPassword
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for enabled.replication.
+
+Usage:
+{{ include "common.postgresql.values.enabled.replication" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether postgresql is used as subchart or not. Default: false
+*/}}
+{{- define "common.postgresql.values.enabled.replication" -}}
+ {{- if .subchart -}}
+ {{- printf "%v" .context.Values.postgresql.replication.enabled -}}
+ {{- else -}}
+ {{- printf "%v" .context.Values.replication.enabled -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for the key replication.password.
+
+Usage:
+{{ include "common.postgresql.values.key.replicationPassword" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether postgresql is used as subchart or not. Default: false
+*/}}
+{{- define "common.postgresql.values.key.replicationPassword" -}}
+ {{- if .subchart -}}
+ postgresql.replication.password
+ {{- else -}}
+ replication.password
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/validations/_redis.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/validations/_redis.tpl
new file mode 100644
index 0000000..9fedfef
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/validations/_redis.tpl
@@ -0,0 +1,48 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Auxiliary function to get the right value for enabled redis.
+
+Usage:
+{{ include "common.redis.values.enabled" (dict "context" $) }}
+*/}}
+{{- define "common.redis.values.enabled" -}}
+ {{- if .subchart -}}
+ {{- printf "%v" .context.Values.redis.enabled -}}
+ {{- else -}}
+ {{- printf "%v" (not .context.Values.enabled) -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right prefix path for the values
+
+Usage:
+{{ include "common.redis.values.key.prefix" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether redis is used as subchart or not. Default: false
+*/}}
+{{- define "common.redis.values.keys.prefix" -}}
+ {{- if .subchart -}}redis.{{- else -}}{{- end -}}
+{{- end -}}
+
+{{/*
+Checks whether the redis chart's includes the standarizations (version >= 14)
+
+Usage:
+{{ include "common.redis.values.standarized.version" (dict "context" $) }}
+*/}}
+{{- define "common.redis.values.standarized.version" -}}
+
+ {{- $standarizedAuth := printf "%s%s" (include "common.redis.values.keys.prefix" .) "auth" -}}
+ {{- $standarizedAuthValues := include "common.utils.getValueFromKey" (dict "key" $standarizedAuth "context" .context) }}
+
+ {{- if $standarizedAuthValues -}}
+ {{- true -}}
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/templates/validations/_validations.tpl b/charts/semaphore/charts/mariadb/charts/common/templates/validations/_validations.tpl
new file mode 100644
index 0000000..7cdee61
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/templates/validations/_validations.tpl
@@ -0,0 +1,51 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Validate values must not be empty.
+
+Usage:
+{{- $validateValueConf00 := (dict "valueKey" "path.to.value" "secret" "secretName" "field" "password-00") -}}
+{{- $validateValueConf01 := (dict "valueKey" "path.to.value" "secret" "secretName" "field" "password-01") -}}
+{{ include "common.validations.values.empty" (dict "required" (list $validateValueConf00 $validateValueConf01) "context" $) }}
+
+Validate value params:
+ - valueKey - String - Required. The path to the validating value in the values.yaml, e.g: "mysql.password"
+ - secret - String - Optional. Name of the secret where the validating value is generated/stored, e.g: "mysql-passwords-secret"
+ - field - String - Optional. Name of the field in the secret data, e.g: "mysql-password"
+*/}}
+{{- define "common.validations.values.multiple.empty" -}}
+ {{- range .required -}}
+ {{- include "common.validations.values.single.empty" (dict "valueKey" .valueKey "secret" .secret "field" .field "context" $.context) -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Validate a value must not be empty.
+
+Usage:
+{{ include "common.validations.value.empty" (dict "valueKey" "mariadb.password" "secret" "secretName" "field" "my-password" "subchart" "subchart" "context" $) }}
+
+Validate value params:
+ - valueKey - String - Required. The path to the validating value in the values.yaml, e.g: "mysql.password"
+ - secret - String - Optional. Name of the secret where the validating value is generated/stored, e.g: "mysql-passwords-secret"
+ - field - String - Optional. Name of the field in the secret data, e.g: "mysql-password"
+ - subchart - String - Optional - Name of the subchart that the validated password is part of.
+*/}}
+{{- define "common.validations.values.single.empty" -}}
+ {{- $value := include "common.utils.getValueFromKey" (dict "key" .valueKey "context" .context) }}
+ {{- $subchart := ternary "" (printf "%s." .subchart) (empty .subchart) }}
+
+ {{- if not $value -}}
+ {{- $varname := "my-value" -}}
+ {{- $getCurrentValue := "" -}}
+ {{- if and .secret .field -}}
+ {{- $varname = include "common.utils.fieldToEnvVar" . -}}
+ {{- $getCurrentValue = printf " To get the current value:\n\n %s\n" (include "common.utils.secret.getvalue" .) -}}
+ {{- end -}}
+ {{- printf "\n '%s' must not be empty, please add '--set %s%s=$%s' to the command.%s" .valueKey $subchart .valueKey $varname $getCurrentValue -}}
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/charts/common/values.yaml b/charts/semaphore/charts/mariadb/charts/common/values.yaml
new file mode 100644
index 0000000..de2cac5
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/charts/common/values.yaml
@@ -0,0 +1,8 @@
+# Copyright Broadcom, Inc. All Rights Reserved.
+# SPDX-License-Identifier: APACHE-2.0
+
+## bitnami/common
+## It is required by CI/CD tools and processes.
+## @skip exampleValue
+##
+exampleValue: common-chart
diff --git a/charts/semaphore/charts/mariadb/templates/NOTES.txt b/charts/semaphore/charts/mariadb/templates/NOTES.txt
new file mode 100644
index 0000000..96f06f0
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/NOTES.txt
@@ -0,0 +1,89 @@
+CHART NAME: {{ .Chart.Name }}
+CHART VERSION: {{ .Chart.Version }}
+APP VERSION: {{ .Chart.AppVersion }}
+
+⚠ WARNING: Since August 28th, 2025, only a limited subset of images/charts are available for free.
+ Subscribe to Bitnami Secure Images to receive continued support and security updates.
+ More info at https://bitnami.com and https://github.com/bitnami/containers/issues/83267
+
+** Please be patient while the chart is being deployed **
+
+{{- if .Values.diagnosticMode.enabled }}
+The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with:
+
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }}
+
+Get the list of pods by executing:
+
+ kubectl get pods --namespace {{ .Release.Namespace }} -l app.kubernetes.io/instance={{ .Release.Name }}
+
+Access the pod you want to debug by executing
+
+ kubectl exec --namespace {{ .Release.Namespace }} -ti -- bash
+
+In order to replicate the container startup scripts execute this command:
+
+ /opt/bitnami/scripts/mariadb/entrypoint.sh /opt/bitnami/scripts/mariadb/run.sh
+
+{{- else }}
+
+Tip:
+
+ Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l app.kubernetes.io/instance={{ .Release.Name }}
+
+Services:
+
+ echo Primary: {{ include "mariadb.primary.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:{{ coalesce .Values.primary.service.ports.mysql .Values.primary.service.port }}
+{{- if eq .Values.architecture "replication" }}
+ echo Secondary: {{ include "mariadb.secondary.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:{{ coalesce .Values.secondary.service.ports.mysql .Values.secondary.service.port }}
+{{- end }}
+
+Administrator credentials:
+
+ Username: root
+ Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 -d)
+
+To connect to your database, create a client pod:
+
+ kubectl run {{ include "common.names.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash
+
+{{- if .Values.tls.enabled }}
+
+Copy your CA TLS certificates to your client pod:
+
+ kubectl get secret --namespace {{ include "common.names.namespace" . }} {{ include "mariadb.tls.secretName" . }} -o json | jq -r '.data["{{ ternary "ca.crt" .Values.tls.certCAFilename .Values.tls.autoGenerated.enabled }}"]' | base64 --decode > /tmp/ca.crt
+ kubectl cp --namespace {{ include "common.names.namespace" . }} /tmp/ca.crt {{ include "common.names.fullname" . }}-client:/tmp/ca.crt
+
+{{- end }}
+
+To connect to primary service (read/write):
+
+ mysql -h {{ include "mariadb.primary.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} -uroot -p {{ .Values.auth.database }}{{ if .Values.tls.enabled }} --ssl --ssl-ca=/tmp/ca.crt{{ end }}
+
+{{- if eq .Values.architecture "replication" }}
+
+To connect to secondary service (read-only):
+
+ mysql -h {{ include "mariadb.secondary.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} -uroot -p {{ .Values.auth.database }}{{ if .Values.tls.enabled }} --ssl --ssl-ca=/tmp/ca.crt{{ end }}
+{{- end }}
+
+To upgrade this helm chart:
+
+ 1. Obtain the password as described on the 'Administrator credentials' section and set the 'auth.rootPassword' parameter as shown below:
+
+ ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 -d)
+ helm upgrade --namespace {{ .Release.Namespace }} {{ .Release.Name }} oci://MY-OCI-REGISTRY/mariadb --set auth.rootPassword=$ROOT_PASSWORD
+
+{{- include "common.warnings.rollingTag" .Values.image }}
+{{- include "common.warnings.rollingTag" .Values.metrics.image }}
+{{- include "common.warnings.rollingTag" .Values.volumePermissions.image }}
+{{- include "mariadb.validateValues" . }}
+{{- if not .Values.auth.customPasswordFiles -}}
+ {{- $passwordValidationErrors := include "common.validations.values.mariadb.passwords" (dict "secret" (include "common.names.fullname" .) "context" $) -}}
+ {{- include "common.errors.upgrade.passwords.empty" (dict "validationErrors" (list $passwordValidationErrors) "context" $) -}}
+{{- end }}
+{{- end }}
+{{- include "common.warnings.resources" (dict "sections" (list "metrics" "primary" "secondary" "volumePermissions") "context" $) }}
+{{- include "common.warnings.modifiedImages" (dict "images" (list .Values.image .Values.volumePermissions.image .Values.metrics.image) "context" $) }}
+{{- include "common.errors.insecureImages" (dict "images" (list .Values.image .Values.volumePermissions.image .Values.metrics.image) "context" $) }}
diff --git a/charts/semaphore/charts/mariadb/templates/_helpers.tpl b/charts/semaphore/charts/mariadb/templates/_helpers.tpl
new file mode 100644
index 0000000..4364fdf
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/_helpers.tpl
@@ -0,0 +1,220 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{- define "mariadb.primary.fullname" -}}
+{{- if eq .Values.architecture "replication" }}
+{{- printf "%s-%s" (include "common.names.fullname" .) .Values.primary.name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- include "common.names.fullname" . -}}
+{{- end -}}
+{{- end -}}
+
+{{- define "mariadb.secondary.fullname" -}}
+{{- printf "%s-%s" (include "common.names.fullname" .) .Values.secondary.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Return the proper MariaDB image name
+*/}}
+{{- define "mariadb.image" -}}
+{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
+{{- end -}}
+
+{{/*
+Return the proper metrics image name
+*/}}
+{{- define "mariadb.metrics.image" -}}
+{{ include "common.images.image" (dict "imageRoot" .Values.metrics.image "global" .Values.global) }}
+{{- end -}}
+
+{{/*
+Return the proper image name (for the init container volume-permissions image)
+*/}}
+{{- define "mariadb.volumePermissions.image" -}}
+{{ include "common.images.image" (dict "imageRoot" .Values.volumePermissions.image "global" .Values.global) }}
+{{- end -}}
+
+{{/*
+Return the proper Docker Image Registry Secret Names
+*/}}
+{{- define "mariadb.imagePullSecrets" -}}
+{{ include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.metrics.image .Values.volumePermissions.image) "global" .Values.global) }}
+{{- end -}}
+
+{{ template "mariadb.initdbScriptsCM" . }}
+{{/*
+Get the initialization scripts ConfigMap name.
+*/}}
+{{- define "mariadb.initdbScriptsCM" -}}
+{{- if .Values.initdbScriptsConfigMap -}}
+{{- printf "%s" (tpl .Values.initdbScriptsConfigMap $) -}}
+{{- else -}}
+{{- printf "%s-init-scripts" (include "mariadb.primary.fullname" .) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "mariadb.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+ {{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+ {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the name of the secret containing the TLS certificates for MariaDB replicas
+*/}}
+{{- define "mariadb.tls.secretName" -}}
+{{- if or .Values.tls.autoGenerated.enabled (and (not (empty .Values.tls.cert)) (not (empty .Values.tls.key))) -}}
+ {{- printf "%s-crt" (include "common.names.fullname" .) -}}
+{{- else -}}
+ {{- required "An existing secret name must be provided with TLS certs for MariaDB replicas if cert and key are not provided!" (tpl .Values.tls.existingSecret .) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the configmap with the MariaDB Primary configuration
+*/}}
+{{- define "mariadb.primary.configmapName" -}}
+{{- if .Values.primary.existingConfigmap -}}
+ {{- printf "%s" (tpl .Values.primary.existingConfigmap $) -}}
+{{- else -}}
+ {{- printf "%s" (include "mariadb.primary.fullname" .) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return true if a configmap object should be created for MariaDB Secondary
+*/}}
+{{- define "mariadb.primary.createConfigmap" -}}
+{{- if and .Values.primary.configuration (not .Values.primary.existingConfigmap) }}
+ {{- true -}}
+{{- else -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the configmap with the MariaDB Primary configuration
+*/}}
+{{- define "mariadb.secondary.configmapName" -}}
+{{- if .Values.secondary.existingConfigmap -}}
+ {{- printf "%s" (tpl .Values.secondary.existingConfigmap $) -}}
+{{- else -}}
+ {{- printf "%s" (include "mariadb.secondary.fullname" .) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return true if a configmap object should be created for MariaDB Secondary
+*/}}
+{{- define "mariadb.secondary.createConfigmap" -}}
+{{- if and (eq .Values.architecture "replication") .Values.secondary.configuration (not .Values.secondary.existingConfigmap) }}
+ {{- true -}}
+{{- else -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the secret with MariaDB credentials
+*/}}
+{{- define "mariadb.secretName" -}}
+ {{- if .Values.auth.existingSecret -}}
+ {{- printf "%s" (tpl .Values.auth.existingSecret $) -}}
+ {{- else -}}
+ {{- include "common.names.fullname" . -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Return the secret with previous MariaDB credentials
+*/}}
+{{- define "mariadb.update-job.previousSecretName" -}}
+ {{- if .Values.passwordUpdateJob.previousPasswords.existingSecret -}}
+ {{- /* The secret with the new password is managed externally */ -}}
+ {{- tpl .Values.passwordUpdateJob.previousPasswords.existingSecret $ -}}
+ {{- else if .Values.passwordUpdateJob.previousPasswords.rootPassword -}}
+ {{- /* The secret with the new password is managed externally */ -}}
+ {{- printf "%s-previous-secret" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
+ {{- else -}}
+ {{- /* The secret with the new password is managed by the helm chart. We use the current secret name as it has the old password */ -}}
+ {{- include "common.names.fullname" . -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Return the secret with new MariaDB credentials
+*/}}
+{{- define "mariadb.update-job.newSecretName" -}}
+ {{- if and (not .Values.passwordUpdateJob.previousPasswords.existingSecret) (not .Values.passwordUpdateJob.previousPasswords.rootPassword) -}}
+ {{- /* The secret with the new password is managed by the helm chart. We create a new secret as the current one has the old password */ -}}
+ {{- printf "%s-new-secret" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
+ {{- else -}}
+ {{- /* The secret with the new password is managed externally */ -}}
+ {{- include "mariadb.secretName" . -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Return true if a secret object should be created for MariaDB
+*/}}
+{{- define "mariadb.createSecret" -}}
+{{- if not (or .Values.auth.existingSecret .Values.auth.customPasswordFiles) }}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return true if a secret object should be created for MariaDB
+*/}}
+{{- define "mariadb.createPreviousSecret" -}}
+{{- if and .Values.passwordUpdateJob.previousPasswords.rootPassword (not .Values.passwordUpdateJob.previousPasswords.existingSecret) }}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Compile all warnings into a single message, and call fail.
+*/}}
+{{- define "mariadb.validateValues" -}}
+{{- $messages := list -}}
+{{- $messages := append $messages (include "mariadb.validateValues.architecture" .) -}}
+{{- $messages := without $messages "" -}}
+{{- $message := join "\n" $messages -}}
+
+{{- if $message -}}
+{{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}}
+{{- end -}}
+{{- end -}}
+
+{{/* Validate values of MariaDB - must provide a valid architecture */}}
+{{- define "mariadb.validateValues.architecture" -}}
+{{- if and (ne .Values.architecture "standalone") (ne .Values.architecture "replication") -}}
+mariadb: architecture
+ Invalid architecture selected. Valid values are "standalone" and
+ "replication". Please set a valid architecture (--set architecture="xxxx")
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get existing password to access MariaDB
+*/}}
+{{- define "mariadb.secret.existPassword" -}}
+{{- $secret := (lookup "v1" "Secret" .Release.Namespace (include "mariadb.secretName" .)).data -}}
+{{- if hasKey $secret "mariadb-password" }}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Generate TDE secretProviderClass custom resource name
+*/}}
+{{- define "mariadb.tde.secretProviderClassName" -}}
+{{- printf "%s-spc-tde" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/templates/ca-cert.yaml b/charts/semaphore/charts/mariadb/templates/ca-cert.yaml
new file mode 100644
index 0000000..206abc8
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/ca-cert.yaml
@@ -0,0 +1,53 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.tls.enabled .Values.tls.autoGenerated.enabled (eq .Values.tls.autoGenerated.engine "cert-manager") }}
+{{- if empty .Values.tls.autoGenerated.certManager.existingIssuer }}
+apiVersion: cert-manager.io/v1
+kind: Issuer
+metadata:
+ name: {{ printf "%s-clusterissuer" (include "common.names.fullname" .) }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ selfSigned: {}
+---
+{{- end }}
+apiVersion: cert-manager.io/v1
+kind: Certificate
+metadata:
+ name: {{ printf "%s-ca-crt" (include "common.names.fullname" .) }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ secretName: {{ printf "%s-ca-crt" (include "common.names.fullname" .) }}
+ commonName: {{ printf "%s-ca" (include "common.names.fullname" .) }}
+ isCA: true
+ issuerRef:
+ name: {{ default (printf "%s-clusterissuer" (include "common.names.fullname" .)) .Values.tls.autoGenerated.certManager.existingIssuer }}
+ kind: {{ default "Issuer" .Values.tls.autoGenerated.certManager.existingIssuerKind }}
+---
+apiVersion: cert-manager.io/v1
+kind: Issuer
+metadata:
+ name: {{ printf "%s-ca-issuer" (include "common.names.fullname" .) }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ ca:
+ secretName: {{ printf "%s-ca-crt" (include "common.names.fullname" .) }}
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/cert.yaml b/charts/semaphore/charts/mariadb/templates/cert.yaml
new file mode 100644
index 0000000..9fca26c
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/cert.yaml
@@ -0,0 +1,42 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.tls.enabled .Values.tls.autoGenerated.enabled (eq .Values.tls.autoGenerated.engine "cert-manager") }}
+apiVersion: cert-manager.io/v1
+kind: Certificate
+metadata:
+ name: {{ printf "%s-crt" (include "common.names.fullname" .) }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ secretName: {{ template "mariadb.tls.secretName" . }}
+ commonName: {{ printf "%s.%s.svc.%s" (include "common.names.fullname" .) (include "common.names.namespace" .) .Values.clusterDomain }}
+ issuerRef:
+ name: {{ printf "%s-ca-issuer" (include "common.names.fullname" .) }}
+ kind: Issuer
+ subject:
+ organizations:
+ - "MariaDB"
+ dnsNames:
+ {{- $headlessServiceName := printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
+ {{- $dnsNames := include "common.certs.sans" (dict "namespace" (include "common.names.namespace" .) "clusterDomain" .Values.clusterDomain "serviceName" (include "mariadb.primary.fullname" .) "headlessServiceName" $headlessServiceName "loopback" .Values.tls.autoGenerated.loopback "extraSANs" (.Values.tls.autoGenerated.extraSANs | default (list))) | splitList " " | uniq }}
+ {{- $dnsNames = include "common.certs.sans" (dict "namespace" (include "common.names.namespace" .) "clusterDomain" .Values.clusterDomain "serviceName" (include "mariadb.secondary.fullname" .)) | splitList " " | concat $dnsNames | uniq }}
+ {{- range $dnsNames }}
+ - {{ . | quote }}
+ {{- end }}
+ {{- if .Values.tls.autoGenerated.loopback }}
+ ipAddresses:
+ - 127.0.0.1
+ {{- end }}
+ privateKey:
+ algorithm: {{ .Values.tls.autoGenerated.certManager.keyAlgorithm }}
+ size: {{ int .Values.tls.autoGenerated.certManager.keySize }}
+ duration: {{ .Values.tls.autoGenerated.certManager.duration }}
+ renewBefore: {{ .Values.tls.autoGenerated.certManager.renewBefore }}
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/extra-list.yaml b/charts/semaphore/charts/mariadb/templates/extra-list.yaml
new file mode 100644
index 0000000..329f5c6
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/extra-list.yaml
@@ -0,0 +1,9 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- range .Values.extraDeploy }}
+---
+{{ include "common.tplvalues.render" (dict "value" . "context" $) }}
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/headless-svc.yaml b/charts/semaphore/charts/mariadb/templates/headless-svc.yaml
new file mode 100644
index 0000000..9c03277
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/headless-svc.yaml
@@ -0,0 +1,36 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ {{- if or .Values.primary.service.headless.annotations .Values.commonAnnotations }}
+ annotations:
+ {{- if or .Values.primary.service.headless.annotations .Values.commonAnnotations }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.service.headless.annotations .Values.commonAnnotations ) "context" . ) }}
+ {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
+ {{- end }}
+ {{- end }}
+spec:
+ type: ClusterIP
+ publishNotReadyAddresses: true
+ clusterIP: None
+ ports:
+ - name: mysql
+ port: {{ .Values.primary.containerPorts.mysql }}
+ protocol: TCP
+ targetPort: mysql
+ {{- if .Values.metrics.enabled }}
+ - name: metrics
+ port: {{ .Values.metrics.containerPorts.http }}
+ protocol: TCP
+ targetPort: metrics
+ {{- end }}
+ selector: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
diff --git a/charts/semaphore/charts/mariadb/templates/networkpolicy.yaml b/charts/semaphore/charts/mariadb/templates/networkpolicy.yaml
new file mode 100644
index 0000000..a019b8e
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/networkpolicy.yaml
@@ -0,0 +1,77 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if .Values.networkPolicy.enabled }}
+kind: NetworkPolicy
+apiVersion: {{ template "common.capabilities.networkPolicy.apiVersion" . }}
+metadata:
+ name: {{ template "common.names.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ podSelector:
+ matchLabels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
+ policyTypes:
+ - Ingress
+ - Egress
+ {{- if .Values.networkPolicy.allowExternalEgress }}
+ egress:
+ - {}
+ {{- else }}
+ egress:
+ # Allow dns resolution
+ - ports:
+ - port: 53
+ protocol: UDP
+ - port: 53
+ protocol: TCP
+ # Allow connection to other cluster pods
+ - ports:
+ - port: {{ .Values.primary.containerPorts.mysql }}
+ - port: {{ .Values.secondary.containerPorts.mysql }}
+ to:
+ - podSelector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }}
+ {{- if .Values.networkPolicy.extraEgress }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraEgress "context" $ ) | nindent 4 }}
+ {{- end }}
+ {{- end }}
+ ingress:
+ - ports:
+ - port: {{ .Values.primary.containerPorts.mysql }}
+ - port: {{ .Values.secondary.containerPorts.mysql }}
+ {{- if .Values.metrics.enabled }}
+ - port: {{ .Values.metrics.containerPorts.http }}
+ {{- end }}
+ {{- if not .Values.networkPolicy.allowExternal }}
+ from:
+ - podSelector:
+ matchLabels:
+ {{ template "common.names.fullname" . }}-client: "true"
+ - podSelector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }}
+ {{- if .Values.networkPolicy.ingressNSMatchLabels }}
+ - namespaceSelector:
+ matchLabels:
+ {{- range $key, $value := .Values.networkPolicy.ingressNSMatchLabels }}
+ {{ $key | quote }}: {{ $value | quote }}
+ {{- end }}
+ {{- if .Values.networkPolicy.ingressNSPodMatchLabels }}
+ podSelector:
+ matchLabels:
+ {{- range $key, $value := .Values.networkPolicy.ingressNSPodMatchLabels }}
+ {{ $key | quote }}: {{ $value | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.networkPolicy.extraIngress }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraIngress "context" $ ) | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/primary/configmap.yaml b/charts/semaphore/charts/mariadb/templates/primary/configmap.yaml
new file mode 100644
index 0000000..47e20ca
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/primary/configmap.yaml
@@ -0,0 +1,21 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if (include "mariadb.primary.createConfigmap" .) }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "mariadb.primary.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: primary
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+data:
+ my.cnf: |-
+ {{- include "common.tplvalues.render" ( dict "value" .Values.primary.configuration "context" $ ) | nindent 4 }}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/templates/primary/initialization-configmap.yaml b/charts/semaphore/charts/mariadb/templates/primary/initialization-configmap.yaml
new file mode 100644
index 0000000..3188895
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/primary/initialization-configmap.yaml
@@ -0,0 +1,20 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.initdbScripts (not .Values.initdbScriptsConfigMap) }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ printf "%s-init-scripts" (include "mariadb.primary.fullname" .) }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: primary
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+data:
+{{- include "common.tplvalues.render" (dict "value" .Values.initdbScripts "context" .) | nindent 2 }}
+{{ end }}
diff --git a/charts/semaphore/charts/mariadb/templates/primary/pdb.yaml b/charts/semaphore/charts/mariadb/templates/primary/pdb.yaml
new file mode 100644
index 0000000..7561726
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/primary/pdb.yaml
@@ -0,0 +1,29 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if .Values.primary.pdb.create }}
+apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
+kind: PodDisruptionBudget
+metadata:
+ name: {{ include "mariadb.primary.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: primary
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ {{- if .Values.primary.pdb.minAvailable }}
+ minAvailable: {{ .Values.primary.pdb.minAvailable }}
+ {{- end }}
+ {{- if or .Values.primary.pdb.maxUnavailable (not .Values.primary.pdb.minAvailable) }}
+ maxUnavailable: {{ .Values.primary.pdb.maxUnavailable | default 1 }}
+ {{- end }}
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.podLabels .Values.commonLabels ) "context" . ) }}
+ selector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
+ app.kubernetes.io/component: primary
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/primary/statefulset.yaml b/charts/semaphore/charts/mariadb/templates/primary/statefulset.yaml
new file mode 100644
index 0000000..96b0f84
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/primary/statefulset.yaml
@@ -0,0 +1,523 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
+kind: StatefulSet
+metadata:
+ name: {{ include "mariadb.primary.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: primary
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ replicas: 1
+ revisionHistoryLimit: {{ .Values.primary.revisionHistoryLimit }}
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.podLabels .Values.commonLabels ) "context" . ) }}
+ selector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: primary
+ serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
+ {{- if .Values.primary.updateStrategy }}
+ updateStrategy: {{- toYaml .Values.primary.updateStrategy | nindent 4 }}
+ {{- end }}
+ template:
+ metadata:
+ annotations:
+ {{- if (include "mariadb.primary.createConfigmap" .) }}
+ checksum/configuration: {{ include (print $.Template.BasePath "/primary/configmap.yaml") . | sha256sum }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.enabled }}
+ charts.bitnami.com/password-last-update: {{ now | date "20060102150405" | quote }}
+ {{- end }}
+ {{- if .Values.primary.podAnnotations }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.primary.podAnnotations "context" $) | nindent 8 }}
+ {{- end }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: primary
+ spec:
+ {{- include "mariadb.imagePullSecrets" . | nindent 6 }}
+ automountServiceAccountToken: {{ .Values.primary.automountServiceAccountToken }}
+ {{- if .Values.primary.hostAliases }}
+ hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.primary.hostAliases "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if or .Values.primary.schedulerName .Values.schedulerName }}
+ schedulerName: {{ (coalesce .Values.primary.schedulerName .Values.schedulerName) | quote }}
+ {{- end }}
+ serviceAccountName: {{ template "mariadb.serviceAccountName" . }}
+ {{- if .Values.primary.affinity }}
+ affinity: {{- include "common.tplvalues.render" (dict "value" .Values.primary.affinity "context" $) | nindent 8 }}
+ {{- else }}
+ affinity:
+ podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAffinityPreset "component" "primary" "customLabels" $podLabels "context" $) | nindent 10 }}
+ podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAntiAffinityPreset "component" "primary" "customLabels" $podLabels "context" $) | nindent 10 }}
+ nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.primary.nodeAffinityPreset.type "key" .Values.primary.nodeAffinityPreset.key "values" .Values.primary.nodeAffinityPreset.values) | nindent 10 }}
+ {{- end }}
+ {{- if .Values.primary.nodeSelector }}
+ nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.primary.nodeSelector "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.primary.tolerations }}
+ tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.primary.tolerations "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.primary.schedulerName }}
+ schedulerName: {{ .Values.primary.schedulerName }}
+ {{- end }}
+ {{- if .Values.primary.topologySpreadConstraints }}
+ topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.primary.topologySpreadConstraints "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.primary.priorityClassName }}
+ priorityClassName: {{ .Values.primary.priorityClassName | quote }}
+ {{- else if .Values.priorityClassName }}
+ priorityClassName: {{ .Values.priorityClassName | quote }}
+ {{- end }}
+ {{- if .Values.primary.runtimeClassName }}
+ runtimeClassName: {{ .Values.primary.runtimeClassName | quote }}
+ {{- else if .Values.runtimeClassName }}
+ runtimeClassName: {{ .Values.runtimeClassName | quote }}
+ {{- end }}
+ {{- if .Values.primary.podSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.primary.podSecurityContext "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.primary.terminationGracePeriodSeconds }}
+ terminationGracePeriodSeconds: {{ .Values.primary.terminationGracePeriodSeconds }}
+ {{- end }}
+ initContainers:
+ - name: preserve-logs-symlinks
+ image: {{ include "mariadb.image" . }}
+ imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+ {{- if .Values.primary.containerSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.primary.containerSecurityContext "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.primary.resources }}
+ resources: {{ toYaml .Values.primary.resources | nindent 12 }}
+ {{- else if ne .Values.primary.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.primary.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ command:
+ - /bin/bash
+ args:
+ - -ec
+ - |
+ #!/bin/bash
+
+ . /opt/bitnami/scripts/libfs.sh
+ # We copy the logs folder because it has symlinks to stdout and stderr
+ if ! is_dir_empty /opt/bitnami/mariadb/logs; then
+ cp -r /opt/bitnami/mariadb/logs /emptydir/app-logs-dir
+ fi
+ {{- if include "common.fips.enabled" . }}
+ env:
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.volumePermissions.fips "global" .Values.global) | quote }}
+ {{- end }}
+ volumeMounts:
+ - name: empty-dir
+ mountPath: /emptydir
+ {{- if and .Values.primary.podSecurityContext.enabled .Values.volumePermissions.enabled .Values.primary.persistence.enabled }}
+ - name: volume-permissions
+ image: {{ include "mariadb.volumePermissions.image" . }}
+ imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
+ command:
+ - /bin/bash
+ - -ec
+ - |
+ chown -R {{ .Values.primary.containerSecurityContext.runAsUser }}:{{ .Values.primary.podSecurityContext.fsGroup }} /bitnami/mariadb
+ securityContext:
+ runAsUser: 0
+ {{- if .Values.volumePermissions.resources }}
+ resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
+ {{- else if ne .Values.volumePermissions.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.volumePermissions.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ {{- if include "common.fips.enabled" . }}
+ env:
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.volumePermissions.fips "global" .Values.global) | quote }}
+ {{- end }}
+ volumeMounts:
+ - name: data
+ mountPath: /bitnami/mariadb
+ {{- if .Values.primary.persistence.subPath }}
+ subPath: {{ .Values.primary.persistence.subPath }}
+ {{- end }}
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: tmp-dir
+ {{- end }}
+ {{- if .Values.primary.initContainers }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.primary.initContainers "context" $) | nindent 8 }}
+ {{- end }}
+ containers:
+ - name: mariadb
+ image: {{ include "mariadb.image" . }}
+ imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+ {{- if .Values.primary.containerSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.primary.containerSecurityContext "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.diagnosticMode.enabled }}
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
+ {{- else if .Values.primary.command }}
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.primary.command "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.diagnosticMode.enabled }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
+ {{- else if .Values.primary.args }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.primary.args "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.primary.lifecycleHooks }}
+ lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.primary.lifecycleHooks "context" $) | nindent 12 }}
+ {{- end }}
+ env:
+ - name: BITNAMI_DEBUG
+ value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: MARIADB_ROOT_PASSWORD_FILE
+ value: {{ default "/opt/bitnami/mariadb/secrets/mariadb-root-password" .Values.auth.customPasswordFiles.root }}
+ {{- else }}
+ - name: MARIADB_ROOT_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "mariadb.secretName" . }}
+ key: mariadb-root-password
+ {{- end }}
+ {{- if not (empty .Values.auth.username) }}
+ - name: MARIADB_USER
+ value: {{ .Values.auth.username | quote }}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: MARIADB_PASSWORD_FILE
+ value: {{ default "/opt/bitnami/mariadb/secrets/mariadb-password" .Values.auth.customPasswordFiles.user }}
+ {{- else }}
+ - name: MARIADB_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "mariadb.secretName" . }}
+ key: mariadb-password
+ {{- end }}
+ {{- end }}
+ - name: MARIADB_DATABASE
+ value: {{ .Values.auth.database | quote }}
+ - name: MARIADB_ENABLE_SSL
+ value: {{ ternary "yes" "no" .Values.tls.enabled | quote }}
+ {{- if and .Values.tls.enabled (or .Values.tls.autoGenerated.enabled .Values.tls.ca .Values.tls.existingSecret) }}
+ - name: MYSQL_CLIENT_CA_FILE
+ value: "/opt/bitnami/mariadb/certs/ca.crt"
+ {{- end }}
+ {{- if eq .Values.architecture "replication" }}
+ - name: MARIADB_REPLICATION_MODE
+ value: "master"
+ - name: MARIADB_REPLICATION_USER
+ value: {{ .Values.auth.replicationUser | quote }}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: MARIADB_REPLICATION_PASSWORD_FILE
+ value: {{ default "/opt/bitnami/mariadb/secrets/mariadb-replication-password" .Values.auth.customPasswordFiles.replicator }}
+ {{- else }}
+ - name: MARIADB_REPLICATION_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "mariadb.secretName" . }}
+ key: mariadb-replication-password
+ {{- end }}
+ {{- end }}
+ {{- if .Values.primary.extraFlags }}
+ - name: MARIADB_EXTRA_FLAGS
+ value: "{{ .Values.primary.extraFlags }}"
+ {{- end }}
+ {{- if .Values.primary.startupWaitOptions }}
+ - name: MARIADB_STARTUP_WAIT_RETRIES
+ value: "{{ .Values.primary.startupWaitOptions.retries | default 300 }}"
+ - name: MARIADB_STARTUP_WAIT_SLEEP_TIME
+ value: "{{ .Values.primary.startupWaitOptions.sleepTime | default 2 }}"
+ {{- end }}
+ {{- if include "common.fips.enabled" . }}
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.primary.fips "global" .Values.global) | quote }}
+ {{- end }}
+ {{- if .Values.primary.extraEnvVars }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.primary.extraEnvVars "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if or .Values.primary.extraEnvVarsCM .Values.primary.extraEnvVarsSecret }}
+ envFrom:
+ {{- if .Values.primary.extraEnvVarsCM }}
+ - configMapRef:
+ name: {{ .Values.primary.extraEnvVarsCM }}
+ {{- end }}
+ {{- if .Values.primary.extraEnvVarsSecret }}
+ - secretRef:
+ name: {{ .Values.primary.extraEnvVarsSecret }}
+ {{- end }}
+ {{- end }}
+ ports:
+ - name: mysql
+ containerPort: {{ .Values.primary.containerPorts.mysql }}
+ {{- if not .Values.diagnosticMode.enabled }}
+ {{- if .Values.primary.customStartupProbe }}
+ startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.primary.customStartupProbe "context" $) | nindent 12 }}
+ {{- else if .Values.primary.startupProbe.enabled }}
+ startupProbe: {{- omit .Values.primary.startupProbe "enabled" | toYaml | nindent 12 }}
+ exec:
+ command:
+ - /bin/bash
+ - -ec
+ - |
+ password_aux="${MARIADB_ROOT_PASSWORD:-}"
+ if [[ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]]; then
+ password_aux=$(cat "$MARIADB_ROOT_PASSWORD_FILE")
+ fi
+ mariadb-admin ping -uroot -p"${password_aux}"
+ {{- end }}
+ {{- if .Values.primary.customLivenessProbe }}
+ livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.primary.customLivenessProbe "context" $) | nindent 12 }}
+ {{- else if .Values.primary.livenessProbe.enabled }}
+ livenessProbe: {{- omit .Values.primary.livenessProbe "enabled" | toYaml | nindent 12 }}
+ exec:
+ command:
+ - /bin/bash
+ - -ec
+ - |
+ password_aux="${MARIADB_ROOT_PASSWORD:-}"
+ if [[ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]]; then
+ password_aux=$(cat "$MARIADB_ROOT_PASSWORD_FILE")
+ fi
+ mariadb-admin status -uroot -p"${password_aux}"
+ {{- end }}
+ {{- if .Values.primary.customReadinessProbe }}
+ readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.primary.customReadinessProbe "context" $) | nindent 12 }}
+ {{- else if .Values.primary.readinessProbe.enabled }}
+ readinessProbe: {{- omit .Values.primary.readinessProbe "enabled" | toYaml | nindent 12 }}
+ exec:
+ command:
+ - /bin/bash
+ - -ec
+ - |
+ password_aux="${MARIADB_ROOT_PASSWORD:-}"
+ if [[ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]]; then
+ password_aux=$(cat "$MARIADB_ROOT_PASSWORD_FILE")
+ fi
+ mariadb-admin ping -uroot -p"${password_aux}"
+ {{- end }}
+ {{- end }}
+ {{- if .Values.primary.resources }}
+ resources: {{ toYaml .Values.primary.resources | nindent 12 }}
+ {{- else if ne .Values.primary.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.primary.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ volumeMounts:
+ - name: data
+ mountPath: /bitnami/mariadb
+ {{- if .Values.primary.persistence.subPath }}
+ subPath: {{ .Values.primary.persistence.subPath }}
+ {{- end }}
+ {{- if or .Values.initdbScriptsConfigMap .Values.initdbScripts }}
+ - name: custom-init-scripts
+ mountPath: /docker-entrypoint-initdb.d
+ {{- end }}
+ {{- if or .Values.primary.configuration .Values.primary.existingConfigmap }}
+ - name: config
+ mountPath: /opt/bitnami/mariadb/conf/my.cnf
+ subPath: my.cnf
+ {{- end }}
+ {{- if and .Values.auth.usePasswordFiles (not .Values.auth.customPasswordFiles) }}
+ - name: mariadb-credentials
+ mountPath: /opt/bitnami/mariadb/secrets/
+ {{- end }}
+ {{- if .Values.tls.enabled }}
+ - name: tls-certs
+ mountPath: /opt/bitnami/mariadb/certs
+ readOnly: true
+ {{- end }}
+ {{- if .Values.tde.enabled }}
+ - name: tde
+ mountPath: /opt/bitnami/mariadb/tde
+ {{- end }}
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: tmp-dir
+ - name: empty-dir
+ mountPath: /opt/bitnami/mariadb/conf
+ subPath: app-conf-dir
+ - name: empty-dir
+ mountPath: /opt/bitnami/mariadb/tmp
+ subPath: app-tmp-dir
+ - name: empty-dir
+ mountPath: /opt/bitnami/mariadb/logs
+ subPath: app-logs-dir
+ {{- if .Values.primary.extraVolumeMounts }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.primary.extraVolumeMounts "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.metrics.enabled }}
+ - name: metrics
+ image: {{ include "mariadb.metrics.image" . }}
+ imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
+ {{- if .Values.metrics.containerSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.metrics.containerSecurityContext "context" $) | nindent 12 }}
+ {{- end }}
+ env:
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: MARIADB_ROOT_PASSWORD_FILE
+ value: {{ default "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" .Values.auth.customPasswordFiles.root }}
+ {{- else }}
+ - name: MARIADB_ROOT_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "mariadb.secretName" . }}
+ key: mariadb-root-password
+ {{- end }}
+ {{- if .Values.diagnosticMode.enabled }}
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
+ {{- else }}
+ command:
+ - /bin/bash
+ - -ec
+ - |
+ password_aux="${MARIADB_ROOT_PASSWORD:-}"
+ if [[ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]]; then
+ password_aux=$(cat "$MARIADB_ROOT_PASSWORD_FILE")
+ fi
+ MYSQLD_EXPORTER_PASSWORD=${password_aux} /bin/mysqld_exporter --mysqld.address=localhost:{{ .Values.primary.containerPorts.mysql }} --mysqld.username=root --web.listen-address=:{{ .Values.metrics.containerPorts.http }} {{- range .Values.metrics.extraArgs.primary }} {{ . }} {{- end }}
+ {{- end }}
+ ports:
+ - name: metrics
+ containerPort: {{ .Values.metrics.containerPorts.http }}
+ {{- if not .Values.diagnosticMode.enabled }}
+ {{- if .Values.metrics.livenessProbe.enabled }}
+ livenessProbe: {{- omit .Values.metrics.livenessProbe "enabled" | toYaml | nindent 12 }}
+ httpGet:
+ path: /metrics
+ port: metrics
+ {{- end }}
+ {{- if .Values.metrics.readinessProbe.enabled }}
+ readinessProbe: {{- omit .Values.metrics.readinessProbe "enabled" | toYaml | nindent 12 }}
+ httpGet:
+ path: /metrics
+ port: metrics
+ {{- end }}
+ {{- end }}
+ {{- if .Values.metrics.resources }}
+ resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
+ {{- else if ne .Values.metrics.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.metrics.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ {{- if include "common.fips.enabled" . }}
+ env:
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.metrics.fips "global" .Values.global) | quote }}
+ - name: GODEBUG
+ value: {{ include "common.fips.config" (dict "tech" "golang" "fips" .Values.metrics.fips "global" .Values.global) | quote }}
+ {{- end }}
+ volumeMounts:
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: tmp-dir
+ {{- if and .Values.auth.usePasswordFiles (not .Values.auth.customPasswordFiles) }}
+ - name: mariadb-credentials
+ mountPath: /opt/bitnami/mysqld-exporter/secrets/
+ {{- end }}
+ {{- if .Values.metrics.extraVolumeMounts.primary }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.metrics.extraVolumeMounts.primary "context" $) | nindent 12 }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.primary.sidecars }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.primary.sidecars "context" $) | nindent 8 }}
+ {{- end }}
+ volumes:
+ - name: empty-dir
+ emptyDir: {}
+ {{- if or .Values.primary.configuration .Values.primary.existingConfigmap }}
+ - name: config
+ configMap:
+ name: {{ include "mariadb.primary.configmapName" . }}
+ {{- end }}
+ {{- if or .Values.initdbScriptsConfigMap .Values.initdbScripts }}
+ - name: custom-init-scripts
+ configMap:
+ name: {{ template "mariadb.initdbScriptsCM" . }}
+ {{- end }}
+ {{- if and .Values.auth.usePasswordFiles (not .Values.auth.customPasswordFiles) }}
+ - name: mariadb-credentials
+ secret:
+ secretName: {{ template "mariadb.secretName" . }}
+ items:
+ - key: mariadb-root-password
+ path: mariadb-root-password
+ {{- if .Values.auth.username }}
+ - key: mariadb-password
+ path: mariadb-password
+ {{- end -}}
+ {{- if eq .Values.architecture "replication" }}
+ - key: mariadb-replication-password
+ path: mariadb-replication-password
+ {{- end }}
+ {{- end }}
+ {{- if .Values.tls.enabled }}
+ - name: tls-certs
+ secret:
+ secretName: {{ template "mariadb.tls.secretName" . }}
+ defaultMode: 256
+ items:
+ - key: {{ ternary "tls.crt" .Values.tls.certFilename .Values.tls.autoGenerated.enabled }}
+ path: tls.crt
+ - key: {{ ternary "tls.key" .Values.tls.certKeyFilename .Values.tls.autoGenerated.enabled }}
+ path: tls.key
+ {{- if or .Values.tls.autoGenerated.enabled .Values.tls.ca .Values.tls.existingSecret }}
+ - key: {{ ternary "ca.crt" .Values.tls.certCAFilename .Values.tls.autoGenerated.enabled }}
+ path: ca.crt
+ {{- end }}
+ {{- end }}
+ {{- if and .Values.tde.enabled ( not .Values.tde.secretsStoreProvider.enabled ) }}
+ - name: tde
+ secret:
+ secretName: {{ .Values.tde.existingSecret }}
+ items:
+ - key: {{ .Values.tde.randomKeyFilename }}
+ path: {{ .Values.tde.randomKeyFilename }}
+ - key: {{ .Values.tde.encryptedKeyFilename }}
+ path: {{ .Values.tde.encryptedKeyFilename }}
+ defaultMode: 256
+ {{- else if and .Values.tde.enabled ( .Values.tde.secretsStoreProvider.enabled ) }}
+ - name: tde
+ csi:
+ driver: 'secrets-store.csi.k8s.io'
+ readOnly: true
+ volumeAttributes:
+ secretProviderClass: {{ include "mariadb.tde.secretProviderClassName" . }}
+ {{- end }}
+ {{- if .Values.primary.extraVolumes }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.primary.extraVolumes "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if and .Values.primary.persistence.enabled .Values.primary.persistence.existingClaim }}
+ - name: data
+ persistentVolumeClaim:
+ claimName: {{ tpl .Values.primary.persistence.existingClaim . }}
+ {{- else if not .Values.primary.persistence.enabled }}
+ - name: data
+ emptyDir: {}
+ {{- else if and .Values.primary.persistence.enabled (not .Values.primary.persistence.existingClaim) }}
+ volumeClaimTemplates:
+ - metadata:
+ name: data
+ {{- $claimLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.persistence.labels .Values.commonLabels ) "context" . ) }}
+ labels: {{- include "common.labels.matchLabels" ( dict "customLabels" $claimLabels "context" $ ) | nindent 10 }}
+ app.kubernetes.io/component: primary
+ {{- if .Values.primary.persistence.annotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.primary.persistence.annotations "context" $ ) | nindent 10 }}
+ {{- end }}
+ spec:
+ accessModes:
+ {{- range .Values.primary.persistence.accessModes }}
+ - {{ . | quote }}
+ {{- end }}
+ resources:
+ requests:
+ storage: {{ .Values.primary.persistence.size | quote }}
+ {{ include "common.storage.class" (dict "persistence" .Values.primary.persistence "global" .Values.global) }}
+ {{- if .Values.primary.persistence.selector }}
+ selector: {{- include "common.tplvalues.render" (dict "value" .Values.primary.persistence.selector "context" $) | nindent 10 }}
+ {{- end -}}
+ {{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/primary/svc.yaml b/charts/semaphore/charts/mariadb/templates/primary/svc.yaml
new file mode 100644
index 0000000..1a5be2a
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/primary/svc.yaml
@@ -0,0 +1,63 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "mariadb.primary.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: primary
+ annotations:
+ {{- if or .Values.primary.service.annotations .Values.commonAnnotations }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.service.annotations .Values.commonAnnotations ) "context" . ) }}
+ {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
+ {{- end }}
+ {{- if and .Values.metrics.enabled .Values.metrics.annotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.annotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ type: {{ .Values.primary.service.type }}
+ {{- if and .Values.primary.service.clusterIP (eq .Values.primary.service.type "ClusterIP") }}
+ clusterIP: {{ .Values.primary.service.clusterIP }}
+ {{- end }}
+ {{- if and .Values.primary.service.externalTrafficPolicy (or (eq .Values.primary.service.type "LoadBalancer") (eq .Values.primary.service.type "NodePort")) }}
+ externalTrafficPolicy: {{ .Values.primary.service.externalTrafficPolicy | quote }}
+ {{- end }}
+ {{- if and (eq .Values.primary.service.type "LoadBalancer") .Values.primary.service.loadBalancerSourceRanges }}
+ loadBalancerSourceRanges: {{- toYaml .Values.primary.service.loadBalancerSourceRanges | nindent 4 }}
+ {{ end }}
+ {{- if (and (eq .Values.primary.service.type "LoadBalancer") (not (empty .Values.primary.service.loadBalancerIP))) }}
+ loadBalancerIP: {{ .Values.primary.service.loadBalancerIP }}
+ {{- end }}
+ {{- if ne .Values.primary.service.sessionAffinity "None"}}
+ sessionAffinity: {{ .Values.primary.service.sessionAffinity }}
+ {{- if .Values.primary.service.sessionAffinityConfig }}
+ sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.primary.service.sessionAffinityConfig "context" $) | nindent 4 }}
+ {{- end }}
+ {{- end }}
+ ports:
+ - name: mysql
+ port: {{ coalesce .Values.primary.service.ports.mysql .Values.primary.service.port }}
+ protocol: TCP
+ targetPort: mysql
+ {{- if (and (or (eq .Values.primary.service.type "NodePort") (eq .Values.primary.service.type "LoadBalancer")) (coalesce .Values.primary.service.nodePorts.mysql .Values.primary.service.nodePort)) }}
+ nodePort: {{ coalesce .Values.primary.service.nodePorts.mysql .Values.primary.service.nodePort }}
+ {{- else if eq .Values.primary.service.type "ClusterIP" }}
+ nodePort: null
+ {{- end }}
+ {{- if and .Values.metrics.enabled (gt (.Values.primary.service.ports.metrics | int) 0) }}
+ - name: metrics
+ port: {{ .Values.primary.service.ports.metrics }}
+ protocol: TCP
+ targetPort: metrics
+ {{- end }}
+ {{- if .Values.primary.service.extraPorts }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.primary.service.extraPorts "context" $) | nindent 4 }}
+ {{- end }}
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.podLabels .Values.commonLabels ) "context" . ) }}
+ selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: primary
diff --git a/charts/semaphore/charts/mariadb/templates/prometheusrules.yaml b/charts/semaphore/charts/mariadb/templates/prometheusrules.yaml
new file mode 100644
index 0000000..75bc1a5
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/prometheusrules.yaml
@@ -0,0 +1,25 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
+apiVersion: monitoring.coreos.com/v1
+kind: PrometheusRule
+metadata:
+ name: {{ include "common.names.fullname" . }}
+ namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: metrics
+ {{- if .Values.metrics.prometheusRule.additionalLabels }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $ ) | nindent 4 }}
+ {{- end }}
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ groups:
+ - name: {{ include "common.names.fullname" . }}
+ rules: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.rules "context" $ ) | nindent 6 }}
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/role.yaml b/charts/semaphore/charts/mariadb/templates/role.yaml
new file mode 100644
index 0000000..0db435b
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/role.yaml
@@ -0,0 +1,24 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.serviceAccount.create .Values.rbac.create }}
+apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
+kind: Role
+metadata:
+ name: {{ include "common.names.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+rules:
+ - apiGroups:
+ - ""
+ resources:
+ - endpoints
+ verbs:
+ - get
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/rolebinding.yaml b/charts/semaphore/charts/mariadb/templates/rolebinding.yaml
new file mode 100644
index 0000000..bc91f61
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/rolebinding.yaml
@@ -0,0 +1,24 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.serviceAccount.create .Values.rbac.create }}
+kind: RoleBinding
+apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
+metadata:
+ name: {{ include "common.names.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+subjects:
+ - kind: ServiceAccount
+ name: {{ include "mariadb.serviceAccountName" . }}
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: Role
+ name: {{ include "common.names.fullname" . -}}
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/secondary/configmap.yaml b/charts/semaphore/charts/mariadb/templates/secondary/configmap.yaml
new file mode 100644
index 0000000..9d4544d
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/secondary/configmap.yaml
@@ -0,0 +1,21 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if (include "mariadb.secondary.createConfigmap" .) }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "mariadb.secondary.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: secondary
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+data:
+ my.cnf: |-
+ {{- include "common.tplvalues.render" ( dict "value" .Values.secondary.configuration "context" $ ) | nindent 4 }}
+{{- end -}}
diff --git a/charts/semaphore/charts/mariadb/templates/secondary/pdb.yaml b/charts/semaphore/charts/mariadb/templates/secondary/pdb.yaml
new file mode 100644
index 0000000..e79580e
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/secondary/pdb.yaml
@@ -0,0 +1,29 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and (eq .Values.architecture "replication") .Values.secondary.pdb.create }}
+apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
+kind: PodDisruptionBudget
+metadata:
+ name: {{ include "mariadb.secondary.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: secondary
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ {{- if .Values.secondary.pdb.minAvailable }}
+ minAvailable: {{ .Values.secondary.pdb.minAvailable }}
+ {{- end }}
+ {{- if or .Values.secondary.pdb.maxUnavailable (not .Values.secondary.pdb.minAvailable) }}
+ maxUnavailable: {{ .Values.secondary.pdb.maxUnavailable | default 1 }}
+ {{- end }}
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.secondary.podLabels .Values.commonLabels ) "context" . ) }}
+ selector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
+ app.kubernetes.io/component: secondary
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/secondary/statefulset.yaml b/charts/semaphore/charts/mariadb/templates/secondary/statefulset.yaml
new file mode 100644
index 0000000..a1db0ec
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/secondary/statefulset.yaml
@@ -0,0 +1,491 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if eq .Values.architecture "replication" }}
+apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
+kind: StatefulSet
+metadata:
+ name: {{ include "mariadb.secondary.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: secondary
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ replicas: {{ .Values.secondary.replicaCount }}
+ revisionHistoryLimit: {{ .Values.secondary.revisionHistoryLimit }}
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.secondary.podLabels .Values.commonLabels ) "context" . ) }}
+ selector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: secondary
+ serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
+ podManagementPolicy: {{ .Values.secondary.podManagementPolicy }}
+ {{- if .Values.secondary.updateStrategy }}
+ updateStrategy: {{- toYaml .Values.secondary.updateStrategy | nindent 4 }}
+ {{- end }}
+ template:
+ metadata:
+ annotations:
+ {{- if (include "mariadb.secondary.createConfigmap" .) }}
+ checksum/configuration: {{ include (print $.Template.BasePath "/secondary/configmap.yaml") . | sha256sum }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.enabled }}
+ charts.bitnami.com/password-last-update: {{ now | date "20060102150405" | quote }}
+ {{- end }}
+ {{- if .Values.secondary.podAnnotations }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.secondary.podAnnotations "context" $) | nindent 8 }}
+ {{- end }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: secondary
+ spec:
+ {{- include "mariadb.imagePullSecrets" . | nindent 6 }}
+ {{- if or .Values.secondary.schedulerName .Values.schedulerName }}
+ schedulerName: {{ (coalesce .Values.secondary.schedulerName .Values.schedulerName) | quote }}
+ {{- end }}
+ serviceAccountName: {{ template "mariadb.serviceAccountName" . }}
+ automountServiceAccountToken: {{ .Values.secondary.automountServiceAccountToken }}
+ {{- if .Values.secondary.hostAliases }}
+ hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.hostAliases "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.secondary.affinity }}
+ affinity: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.affinity "context" $) | nindent 8 }}
+ {{- else }}
+ affinity:
+ podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.secondary.podAffinityPreset "component" "secondary" "customLabels" $podLabels "context" $) | nindent 10 }}
+ podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.secondary.podAntiAffinityPreset "component" "secondary" "customLabels" $podLabels "context" $) | nindent 10 }}
+ nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.secondary.nodeAffinityPreset.type "key" .Values.secondary.nodeAffinityPreset.key "values" .Values.secondary.nodeAffinityPreset.values) | nindent 10 }}
+ {{- end }}
+ {{- if .Values.secondary.nodeSelector }}
+ nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.nodeSelector "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.secondary.tolerations }}
+ tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.tolerations "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.secondary.topologySpreadConstraints }}
+ topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.topologySpreadConstraints "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.secondary.priorityClassName }}
+ priorityClassName: {{ .Values.secondary.priorityClassName | quote }}
+ {{- else if .Values.priorityClassName }}
+ priorityClassName: {{ .Values.priorityClassName | quote }}
+ {{- end }}
+ {{- if .Values.secondary.runtimeClassName }}
+ runtimeClassName: {{ .Values.secondary.runtimeClassName | quote }}
+ {{- else if .Values.runtimeClassName }}
+ runtimeClassName: {{ .Values.runtimeClassName | quote }}
+ {{- end }}
+ {{- if .Values.secondary.podSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.secondary.podSecurityContext "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.secondary.terminationGracePeriodSeconds }}
+ terminationGracePeriodSeconds: {{ .Values.secondary.terminationGracePeriodSeconds }}
+ {{- end }}
+ initContainers:
+ - name: preserve-logs-symlinks
+ image: {{ include "mariadb.image" . }}
+ imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+ {{- if .Values.secondary.containerSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.primary.containerSecurityContext "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.secondary.resources }}
+ resources: {{ toYaml .Values.secondary.resources | nindent 12 }}
+ {{- else if ne .Values.secondary.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.secondary.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ command:
+ - /bin/bash
+ args:
+ - -ec
+ - |
+ #!/bin/bash
+
+ . /opt/bitnami/scripts/libfs.sh
+ # We copy the logs folder because it has symlinks to stdout and stderr
+ if ! is_dir_empty /opt/bitnami/mariadb/logs; then
+ cp -r /opt/bitnami/mariadb/logs /emptydir/app-logs-dir
+ fi
+ {{- if include "common.fips.enabled" . }}
+ env:
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.volumePermissions.fips "global" .Values.global) | quote }}
+ {{- end }}
+ volumeMounts:
+ - name: empty-dir
+ mountPath: /emptydir
+ {{- if and .Values.secondary.podSecurityContext.enabled .Values.volumePermissions.enabled .Values.secondary.persistence.enabled }}
+ - name: volume-permissions
+ image: {{ include "mariadb.volumePermissions.image" . }}
+ imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
+ command:
+ - /bin/bash
+ - -ec
+ - |
+ chown -R {{ .Values.secondary.containerSecurityContext.runAsUser }}:{{ .Values.secondary.podSecurityContext.fsGroup }} /bitnami/mariadb
+ securityContext:
+ runAsUser: 0
+ {{- if .Values.volumePermissions.resources }}
+ resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
+ {{- else if ne .Values.volumePermissions.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.volumePermissions.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ {{- if include "common.fips.enabled" . }}
+ env:
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.volumePermissions.fips "global" .Values.global) | quote }}
+ {{- end }}
+ volumeMounts:
+ - name: data
+ mountPath: /bitnami/mariadb
+ {{- if .Values.secondary.persistence.subPath }}
+ subPath: {{ .Values.secondary.persistence.subPath }}
+ {{- end }}
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: tmp-dir
+ {{- end }}
+ {{- if .Values.secondary.initContainers }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.secondary.initContainers "context" $) | nindent 8 }}
+ {{- end }}
+ containers:
+ - name: mariadb
+ image: {{ include "mariadb.image" . }}
+ imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+ {{- if .Values.secondary.containerSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.secondary.containerSecurityContext "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.diagnosticMode.enabled }}
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
+ {{- else if .Values.secondary.command }}
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.command "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.diagnosticMode.enabled }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
+ {{- else if .Values.secondary.args }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.args "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.secondary.lifecycleHooks }}
+ lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.lifecycleHooks "context" $) | nindent 12 }}
+ {{- end }}
+ env:
+ - name: BITNAMI_DEBUG
+ value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }}
+ - name: MARIADB_REPLICATION_MODE
+ value: "slave"
+ - name: MARIADB_MASTER_HOST
+ value: {{ include "mariadb.primary.fullname" . }}
+ - name: MARIADB_MASTER_PORT_NUMBER
+ value: {{ coalesce .Values.primary.service.ports.mysql .Values.primary.service.port | quote }}
+ - name: MARIADB_MASTER_ROOT_USER
+ value: "root"
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: MARIADB_MASTER_ROOT_PASSWORD_FILE
+ value: {{ default "/opt/bitnami/mariadb/secrets/mariadb-root-password" .Values.auth.customPasswordFiles.root }}
+ {{- else }}
+ - name: MARIADB_MASTER_ROOT_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "mariadb.secretName" . }}
+ key: mariadb-root-password
+ {{- end }}
+ - name: MARIADB_REPLICATION_USER
+ value: {{ .Values.auth.replicationUser | quote }}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: MARIADB_REPLICATION_PASSWORD_FILE
+ value: {{ default "/opt/bitnami/mariadb/secrets/mariadb-replication-password" .Values.auth.customPasswordFiles.replicator }}
+ {{- else }}
+ - name: MARIADB_REPLICATION_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "mariadb.secretName" . }}
+ key: mariadb-replication-password
+ {{- end }}
+ {{- if .Values.secondary.extraFlags }}
+ - name: MARIADB_EXTRA_FLAGS
+ value: "{{ .Values.secondary.extraFlags }}"
+ {{- end }}
+ {{- if .Values.secondary.startupWaitOptions }}
+ - name: MARIADB_STARTUP_WAIT_RETRIES
+ value: "{{ .Values.secondary.startupWaitOptions.retries | default 300 }}"
+ - name: MARIADB_STARTUP_WAIT_SLEEP_TIME
+ value: "{{ .Values.secondary.startupWaitOptions.sleepTime | default 2 }}"
+ {{- end }}
+ - name: MARIADB_ENABLE_SSL
+ value: {{ ternary "yes" "no" .Values.tls.enabled | quote }}
+ {{- if and .Values.tls.enabled (or .Values.tls.autoGenerated.enabled .Values.tls.ca .Values.tls.existingSecret) }}
+ - name: MYSQL_CLIENT_CA_FILE
+ value: "/opt/bitnami/mariadb/certs/ca.crt"
+ {{- end }}
+ {{- if include "common.fips.enabled" . }}
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.secondary.fips "global" .Values.global) | quote }}
+ {{- end }}
+ {{- if .Values.secondary.extraEnvVars }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.secondary.extraEnvVars "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if or .Values.secondary.extraEnvVarsCM .Values.secondary.extraEnvVarsSecret }}
+ envFrom:
+ {{- if .Values.secondary.extraEnvVarsCM }}
+ - configMapRef:
+ name: {{ .Values.secondary.extraEnvVarsCM }}
+ {{- end }}
+ {{- if .Values.secondary.extraEnvVarsSecret }}
+ - secretRef:
+ name: {{ .Values.secondary.extraEnvVarsSecret }}
+ {{- end }}
+ {{- end }}
+ ports:
+ - name: mysql
+ containerPort: {{ .Values.secondary.containerPorts.mysql }}
+ {{- if not .Values.diagnosticMode.enabled }}
+ {{- if .Values.secondary.customStartupProbe }}
+ startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.customStartupProbe "context" $) | nindent 12 }}
+ {{- else if .Values.secondary.startupProbe.enabled }}
+ startupProbe: {{- omit .Values.secondary.startupProbe "enabled" | toYaml | nindent 12 }}
+ exec:
+ command:
+ - /bin/bash
+ - -ec
+ - |
+ password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}"
+ if [[ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]]; then
+ password_aux=$(cat "$MARIADB_MASTER_ROOT_PASSWORD_FILE")
+ fi
+ mariadb-admin ping -uroot -p"${password_aux}"
+ {{- end }}
+ {{- if .Values.secondary.customLivenessProbe }}
+ livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.customLivenessProbe "context" $) | nindent 12 }}
+ {{- else if .Values.secondary.livenessProbe.enabled }}
+ livenessProbe: {{- omit .Values.secondary.livenessProbe "enabled" | toYaml | nindent 12 }}
+ exec:
+ command:
+ - /bin/bash
+ - -ec
+ - |
+ password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}"
+ if [[ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]]; then
+ password_aux=$(cat "$MARIADB_MASTER_ROOT_PASSWORD_FILE")
+ fi
+ mariadb-admin status -uroot -p"${password_aux}"
+ {{- end }}
+ {{- if .Values.secondary.customReadinessProbe }}
+ readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.customReadinessProbe "context" $) | nindent 12 }}
+ {{- else if .Values.secondary.readinessProbe.enabled }}
+ readinessProbe: {{- omit .Values.secondary.readinessProbe "enabled" | toYaml | nindent 12 }}
+ exec:
+ command:
+ - /bin/bash
+ - -ec
+ - |
+ password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}"
+ if [[ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]]; then
+ password_aux=$(cat "$MARIADB_MASTER_ROOT_PASSWORD_FILE")
+ fi
+ mariadb-admin ping -uroot -p"${password_aux}"
+ {{- end }}
+ {{- end }}
+ {{- if .Values.secondary.resources }}
+ resources: {{ toYaml .Values.secondary.resources | nindent 12 }}
+ {{- else if ne .Values.secondary.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.secondary.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ volumeMounts:
+ - name: data
+ mountPath: /bitnami/mariadb
+ {{- if .Values.secondary.persistence.subPath }}
+ subPath: {{ .Values.secondary.persistence.subPath }}
+ {{- end }}
+ {{- if or .Values.secondary.configuration .Values.secondary.existingConfigmap }}
+ - name: config
+ mountPath: /opt/bitnami/mariadb/conf/my.cnf
+ subPath: my.cnf
+ {{- end }}
+ {{- if and .Values.auth.usePasswordFiles (not .Values.auth.customPasswordFiles) }}
+ - name: mariadb-credentials
+ mountPath: /opt/bitnami/mariadb/secrets/
+ {{- end }}
+ {{- if .Values.secondary.extraVolumeMounts }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.secondary.extraVolumeMounts "context" $) | nindent 12 }}
+ {{- end }}
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: tmp-dir
+ - name: empty-dir
+ mountPath: /opt/bitnami/mariadb/conf
+ subPath: app-conf-dir
+ - name: empty-dir
+ mountPath: /opt/bitnami/mariadb/tmp
+ subPath: app-tmp-dir
+ - name: empty-dir
+ mountPath: /opt/bitnami/mariadb/logs
+ subPath: app-logs-dir
+ {{- if .Values.tls.enabled }}
+ - name: tls-certs
+ mountPath: /opt/bitnami/mariadb/certs
+ readOnly: true
+ {{- end }}
+ {{- if .Values.tde.enabled }}
+ - name: tde
+ mountPath: /opt/bitnami/mariadb/tde
+ {{- end }}
+ {{- if .Values.metrics.enabled }}
+ - name: metrics
+ image: {{ include "mariadb.metrics.image" . }}
+ imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
+ {{- if .Values.metrics.containerSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.metrics.containerSecurityContext "context" $) | nindent 12 }}
+ {{- end }}
+ env:
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: MARIADB_ROOT_PASSWORD_FILE
+ value: {{ default "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" .Values.auth.customPasswordFiles.root }}
+ {{- else }}
+ - name: MARIADB_ROOT_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "mariadb.secretName" . }}
+ key: mariadb-root-password
+ {{- end }}
+ {{- if include "common.fips.enabled" . }}
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.metrics.fips "global" .Values.global) | quote }}
+ - name: GODEBUG
+ value: {{ include "common.fips.config" (dict "tech" "golang" "fips" .Values.metrics.fips "global" .Values.global) | quote }}
+ {{- end }}
+ {{- if .Values.diagnosticMode.enabled }}
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
+ {{- else }}
+ command:
+ - /bin/bash
+ - -ec
+ - |
+ password_aux="${MARIADB_ROOT_PASSWORD:-}"
+ if [[ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]]; then
+ password_aux=$(cat "$MARIADB_ROOT_PASSWORD_FILE")
+ fi
+ MYSQLD_EXPORTER_PASSWORD=${password_aux} /bin/mysqld_exporter --mysqld.address=localhost:{{ .Values.secondary.containerPorts.mysql }} --mysqld.username=root --web.listen-address=:{{ .Values.metrics.containerPorts.http }} {{- range .Values.metrics.extraArgs.primary }} {{ . }} {{- end }}
+ {{- end }}
+ ports:
+ - name: metrics
+ containerPort: {{ .Values.metrics.containerPorts.http }}
+ {{- if not .Values.diagnosticMode.enabled }}
+ {{- if .Values.metrics.livenessProbe.enabled }}
+ livenessProbe: {{- omit .Values.metrics.livenessProbe "enabled" | toYaml | nindent 12 }}
+ httpGet:
+ path: /metrics
+ port: metrics
+ {{- end }}
+ {{- if .Values.metrics.readinessProbe.enabled }}
+ readinessProbe: {{- omit .Values.metrics.readinessProbe "enabled" | toYaml | nindent 12 }}
+ httpGet:
+ path: /metrics
+ port: metrics
+ {{- end }}
+ {{- end }}
+ {{- if .Values.metrics.resources }}
+ resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
+ {{- else if ne .Values.metrics.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.metrics.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ volumeMounts:
+ {{- if and .Values.auth.usePasswordFiles (not .Values.auth.customPasswordFiles) }}
+ - name: mariadb-credentials
+ mountPath: /opt/bitnami/mysqld-exporter/secrets/
+ {{- end }}
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: app-tmp-dir
+ {{- if .Values.metrics.extraVolumeMounts.secondary }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.metrics.extraVolumeMounts.secondary "context" $) | nindent 12 }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.secondary.sidecars }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.secondary.sidecars "context" $) | nindent 8 }}
+ {{- end }}
+ volumes:
+ {{- if or .Values.secondary.configuration .Values.secondary.existingConfigmap }}
+ - name: config
+ configMap:
+ name: {{ include "mariadb.secondary.configmapName" . }}
+ {{- end }}
+ {{- if and .Values.auth.usePasswordFiles (not .Values.auth.customPasswordFiles) }}
+ - name: mariadb-credentials
+ secret:
+ secretName: {{ template "mariadb.secretName" . }}
+ items:
+ - key: mariadb-root-password
+ path: mariadb-root-password
+ - key: mariadb-replication-password
+ path: mariadb-replication-password
+ {{- end }}
+ {{- if .Values.tls.enabled }}
+ - name: tls-certs
+ secret:
+ secretName: {{ template "mariadb.tls.secretName" . }}
+ defaultMode: 256
+ items:
+ - key: {{ ternary "tls.crt" .Values.tls.certFilename .Values.tls.autoGenerated.enabled }}
+ path: tls.crt
+ - key: {{ ternary "tls.key" .Values.tls.certKeyFilename .Values.tls.autoGenerated.enabled }}
+ path: tls.key
+ {{- if or .Values.tls.autoGenerated.enabled .Values.tls.ca .Values.tls.existingSecret }}
+ - key: {{ ternary "ca.crt" .Values.tls.certCAFilename .Values.tls.autoGenerated.enabled }}
+ path: ca.crt
+ {{- end }}
+ {{- end }}
+ {{- if and .Values.tde.enabled ( not .Values.tde.secretsStoreProvider.enabled ) }}
+ - name: tde
+ secret:
+ secretName: {{ .Values.tde.existingSecret }}
+ items:
+ - key: {{ .Values.tde.randomKeyFilename }}
+ path: {{ .Values.tde.randomKeyFilename }}
+ - key: {{ .Values.tde.encryptedKeyFilename }}
+ path: {{ .Values.tde.encryptedKeyFilename }}
+ defaultMode: 256
+ {{- else if and .Values.tde.enabled ( .Values.tde.secretsStoreProvider.enabled ) }}
+ - name: tde
+ csi:
+ driver: 'secrets-store.csi.k8s.io'
+ readOnly: true
+ volumeAttributes:
+ secretProviderClass: {{ include "mariadb.tde.secretProviderClassName" . }}
+ {{- end }}
+ - name: empty-dir
+ emptyDir: {}
+ {{- if .Values.secondary.extraVolumes }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.secondary.extraVolumes "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if not .Values.secondary.persistence.enabled }}
+ - name: data
+ emptyDir: {}
+ {{- else }}
+ volumeClaimTemplates:
+ - metadata:
+ name: data
+ {{- $claimLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.secondary.persistence.labels .Values.commonLabels ) "context" . ) }}
+ labels: {{- include "common.labels.matchLabels" ( dict "customLabels" $claimLabels "context" $ ) | nindent 10 }}
+ app.kubernetes.io/component: secondary
+ {{- if .Values.secondary.persistence.annotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.secondary.persistence.annotations "context" $ ) | nindent 10 }}
+ {{- end }}
+ spec:
+ accessModes:
+ {{- range .Values.secondary.persistence.accessModes }}
+ - {{ . | quote }}
+ {{- end }}
+ resources:
+ requests:
+ storage: {{ .Values.secondary.persistence.size | quote }}
+ {{ include "common.storage.class" (dict "persistence" .Values.secondary.persistence "global" .Values.global) }}
+ {{- if .Values.secondary.persistence.selector }}
+ selector: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.persistence.selector "context" $) | nindent 10 }}
+ {{- end -}}
+ {{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/secondary/svc.yaml b/charts/semaphore/charts/mariadb/templates/secondary/svc.yaml
new file mode 100644
index 0000000..44c02a2
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/secondary/svc.yaml
@@ -0,0 +1,66 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if eq .Values.architecture "replication" }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "mariadb.secondary.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: secondary
+ annotations:
+ {{- if or .Values.secondary.service.annotations .Values.commonAnnotations }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.secondary.service.annotations .Values.commonAnnotations ) "context" . ) }}
+ {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
+ {{- end }}
+ {{- if and .Values.metrics.enabled .Values.metrics.annotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.annotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ type: {{ .Values.secondary.service.type }}
+ {{- if and .Values.secondary.service.clusterIP (eq .Values.secondary.service.type "ClusterIP") }}
+ clusterIP: {{ .Values.secondary.service.clusterIP }}
+ {{- end }}
+ {{- if and .Values.secondary.service.externalTrafficPolicy (or (eq .Values.secondary.service.type "LoadBalancer") (eq .Values.secondary.service.type "NodePort")) }}
+ externalTrafficPolicy: {{ .Values.secondary.service.externalTrafficPolicy | quote }}
+ {{- end }}
+ {{- if and (eq .Values.secondary.service.type "LoadBalancer") .Values.secondary.service.loadBalancerSourceRanges }}
+ loadBalancerSourceRanges: {{- toYaml .Values.secondary.service.loadBalancerSourceRanges | nindent 4 }}
+ {{ end }}
+ {{- if and (eq .Values.secondary.service.type "LoadBalancer") (not (empty .Values.secondary.service.loadBalancerIP)) }}
+ loadBalancerIP: {{ .Values.secondary.service.loadBalancerIP }}
+ {{- end }}
+ {{- if ne .Values.secondary.service.sessionAffinity "None"}}
+ sessionAffinity: {{ .Values.secondary.service.sessionAffinity }}
+ {{- if .Values.secondary.service.sessionAffinityConfig }}
+ sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.service.sessionAffinityConfig "context" $) | nindent 4 }}
+ {{- end }}
+ {{- end }}
+ ports:
+ - name: mysql
+ port: {{ coalesce .Values.secondary.service.ports.mysql .Values.secondary.service.port }}
+ protocol: TCP
+ targetPort: mysql
+ {{- if (and (or (eq .Values.secondary.service.type "NodePort") (eq .Values.secondary.service.type "LoadBalancer")) (coalesce .Values.secondary.service.nodePorts.mysql .Values.secondary.service.nodePort)) }}
+ nodePort: {{ coalesce .Values.secondary.service.nodePorts.mysql .Values.secondary.service.nodePort }}
+ {{- else if eq .Values.secondary.service.type "ClusterIP" }}
+ nodePort: null
+ {{- end }}
+ {{- if and .Values.metrics.enabled (gt (.Values.secondary.service.ports.metrics | int) 0) }}
+ - name: metrics
+ port: {{ .Values.secondary.service.ports.metrics }}
+ protocol: TCP
+ targetPort: metrics
+ {{- end }}
+ {{- if .Values.secondary.service.extraPorts }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.secondary.service.extraPorts "context" $) | nindent 4 }}
+ {{- end }}
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.secondary.podLabels .Values.commonLabels ) "context" . ) }}
+ selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: secondary
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/secrets.yaml b/charts/semaphore/charts/mariadb/templates/secrets.yaml
new file mode 100644
index 0000000..bcf20de
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/secrets.yaml
@@ -0,0 +1,101 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- $host := include "mariadb.primary.fullname" . }}
+{{- $port := print .Values.primary.service.ports.mysql }}
+{{- $rootPassword := include "common.secrets.passwords.manage" ( dict "secret" ( include "mariadb.secretName" . ) "key" "mariadb-root-password" "providedValues" ( list "auth.rootPassword" ) "honorProvidedValues" true "context" $ ) | trimAll "\"" | b64dec }}
+{{- $password := .Values.auth.password }}
+{{- if and .Values.auth.username ( include "mariadb.secret.existPassword" . ) }}
+{{- $password = include "common.secrets.passwords.manage" ( dict "secret" ( include "mariadb.secretName" . ) "key" "mariadb-password" "providedValues" ( list "auth.password" ) "honorProvidedValues" true "context" $ ) | trimAll "\"" | b64dec }}
+{{- else if ( and .Values.auth.username ( not .Values.auth.forcePassword ) ( empty .Values.auth.password ) ) }}
+{{- $password = randAlphaNum 10 }}
+{{- end }}
+{{- if (include "mariadb.createSecret" .) }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ include "common.names.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+type: Opaque
+data:
+ {{- if ( not .Values.auth.forcePassword ) }}
+ mariadb-root-password: {{ print $rootPassword | b64enc | quote }}
+ {{- else }}
+ mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.auth.rootPassword | b64enc | quote }}
+ {{- end }}
+ {{- if .Values.auth.username }}
+ {{- if ( not .Values.auth.forcePassword ) }}
+ mariadb-password: {{ print $password | b64enc | quote }}
+ {{- else }}
+ mariadb-password: {{ required "A MariaDB Database Password is required!" $password | b64enc | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if eq .Values.architecture "replication" }}
+ {{- if ( not .Values.auth.forcePassword ) }}
+ mariadb-replication-password: {{ include "common.secrets.passwords.manage" ( dict "secret" ( include "common.names.fullname" . ) "key" "mariadb-replication-password" "providedValues" ( list "auth.replicationPassword" ) "honorProvidedValues" true "context" $ ) }}
+ {{- else }}
+ mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.auth.replicationPassword | b64enc | quote }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+
+{{- if .Values.serviceBindings.enabled }}
+---
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ include "common.names.fullname" . }}-svcbind-root
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+type: servicebinding.io/mysql
+data:
+ provider: {{ print "bitnami" | b64enc | quote }}
+ type: {{ print "mysql" | b64enc | quote }}
+ host: {{ print $host | b64enc | quote }}
+ port: {{ print $port | b64enc | quote }}
+ username: {{ print "root" | b64enc | quote }}
+ password: {{ print $rootPassword | b64enc | quote }}
+ uri: {{ printf "mysql://root:%s@%s:%s" $rootPassword $host $port | b64enc | quote }}
+
+{{- if .Values.auth.username }}
+{{- $database := .Values.auth.database }}
+---
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ include "common.names.fullname" . }}-svcbind-custom-user
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+type: servicebinding.io/mysql
+data:
+ provider: {{ print "bitnami" | b64enc | quote }}
+ type: {{ print "mysql" | b64enc | quote }}
+ host: {{ print $host | b64enc | quote }}
+ port: {{ print $port | b64enc | quote }}
+ username: {{ print .Values.auth.username | b64enc | quote }}
+ {{- if $database }}
+ database: {{ print $database | b64enc | quote }}
+ {{- end }}
+ {{- if and .Values.auth.forcePassword ( empty $password ) }}
+ password: {{ required "A MariaDB Database Password is required!" $password | b64enc | quote }}
+ {{- else }}
+ password: {{ print $password | b64enc | quote }}
+ {{- end }}
+ uri: {{ printf "mysql://%s:%s@%s:%s/%s" .Values.auth.username $password $host $port $database | b64enc | quote }}
+{{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/secretstoreproviderclass-tde.yaml b/charts/semaphore/charts/mariadb/templates/secretstoreproviderclass-tde.yaml
new file mode 100644
index 0000000..3ac1f2b
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/secretstoreproviderclass-tde.yaml
@@ -0,0 +1,37 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.tde.enabled ( .Values.tde.secretsStoreProvider.enabled ) }}
+apiVersion: secrets-store.csi.x-k8s.io/v1
+kind: SecretProviderClass
+metadata:
+ name: {{ include "mariadb.tde.secretProviderClassName" . | quote }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: mariadb
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ provider: {{ .Values.tde.secretsStoreProvider.provider }}
+ parameters:
+ roleName: {{ .Values.tde.secretsStoreProvider.vault.roleName | quote }}
+ {{- if .Values.tde.secretsStoreProvider.vault.address }}
+ vaultAddress: {{ .Values.tde.secretsStoreProvider.vault.address | quote }}
+ {{- end }}
+ {{- if .Values.tde.secretsStoreProvider.vault.authMountPath }}
+ vaultAuthMountPath: {{ .Values.tde.secretsStoreProvider.vault.authMountPath | quote }}
+ {{- end }}
+ objects: |
+ - objectName: {{ .Values.tde.randomKeyFilename | quote }}
+ secretPath: {{ .Values.tde.secretsStoreProvider.vault.randomKeySecretPath | quote }}
+ secretKey: {{ .Values.tde.secretsStoreProvider.vault.randomKeySecretKey | quote }}
+ encoding: "base64"
+ - objectName: {{ .Values.tde.encryptedKeyFilename | quote }}
+ secretPath: {{ .Values.tde.secretsStoreProvider.vault.encryptedKeySecretPath | quote }}
+ secretKey: {{ .Values.tde.secretsStoreProvider.vault.encryptedKeySecretKey | quote }}
+ encoding: "base64"
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/serviceaccount.yaml b/charts/semaphore/charts/mariadb/templates/serviceaccount.yaml
new file mode 100644
index 0000000..c167727
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/serviceaccount.yaml
@@ -0,0 +1,19 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if .Values.serviceAccount.create }}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ include "mariadb.serviceAccountName" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
+ {{- end }}
+automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/servicemonitor.yaml b/charts/semaphore/charts/mariadb/templates/servicemonitor.yaml
new file mode 100644
index 0000000..58e2fed
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/servicemonitor.yaml
@@ -0,0 +1,45 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+ name: {{ include "common.names.fullname" . }}
+ namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }}
+ {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel | quote }}
+ endpoints:
+ - port: metrics
+ {{- if .Values.metrics.serviceMonitor.interval }}
+ interval: {{ .Values.metrics.serviceMonitor.interval }}
+ {{- end }}
+ {{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
+ scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
+ {{- end }}
+ {{- if .Values.metrics.serviceMonitor.honorLabels }}
+ honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }}
+ {{- end }}
+ {{- if .Values.metrics.serviceMonitor.metricRelabelings }}
+ metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.metrics.serviceMonitor.relabelings }}
+ relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.relabelings "context" $) | nindent 8 }}
+ {{- end }}
+ namespaceSelector:
+ matchNames:
+ - {{ include "common.names.namespace" . | quote }}
+ selector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
+ {{- if .Values.metrics.serviceMonitor.selector }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }}
+ {{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/tls-secret.yaml b/charts/semaphore/charts/mariadb/templates/tls-secret.yaml
new file mode 100644
index 0000000..93ca81c
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/tls-secret.yaml
@@ -0,0 +1,50 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.tls.enabled (not .Values.tls.existingSecret) (or (not .Values.tls.autoGenerated.enabled) (and .Values.tls.autoGenerated.enabled (eq .Values.tls.autoGenerated.engine "helm"))) }}
+{{- $secretName := include "mariadb.tls.secretName" . }}
+{{- $caValue := "" }}
+{{- $certValue := "" }}
+{{- $keyValue := "" }}
+{{- if .Values.tls.autoGenerated.enabled }}
+ {{- $releaseNamespace := include "common.names.namespace" . }}
+ {{- $clusterDomain := .Values.clusterDomain }}
+ {{- $headlessServiceName := printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
+ {{- $loopback := .Values.tls.autoGenerated.loopback }}
+ {{- $ipAddresses := ternary (list "127.0.0.1") nil $loopback }}
+ {{- $extraSANs := .Values.tls.autoGenerated.extraSANs | default (list) }}
+ {{- $ca := genCA "mariadb-ca" 365 }}
+ {{- $caValue = $ca.Cert }}
+ {{- /* Cert generation */ -}}
+ {{- $primaryServiceName := include "mariadb.primary.fullname" . }}
+ {{- $secondaryServiceName := include "mariadb.secondary.fullname" . }}
+ {{- $sans := include "common.certs.sans" (dict "namespace" $releaseNamespace "clusterDomain" $clusterDomain "serviceName" $primaryServiceName "headlessServiceName" $headlessServiceName "loopback" $loopback "extraSANs" $extraSANs) | splitList " " | uniq }}
+ {{- $sans = include "common.certs.sans" (dict "namespace" $releaseNamespace "clusterDomain" $clusterDomain "serviceName" $secondaryServiceName) | splitList " " | concat $sans | uniq }}
+ {{- $cert := genSignedCert $primaryServiceName $ipAddresses $sans 365 $ca }}
+ {{- $certValue = $cert.Cert }}
+ {{- $keyValue = $cert.Key }}
+{{- else }}
+ {{- $caValue = .Values.tls.ca }}
+ {{- $certValue = required "When tls.autoGenerated.enabled=false you need to provide tls.cert" .Values.tls.cert }}
+ {{- $keyValue = required "When tls.autoGenerated.enabled=false you need to provide tls.key" .Values.tls.key }}
+{{- end }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ $secretName }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" .) | nindent 4 }}
+ {{- end }}
+type: kubernetes.io/tls
+data:
+ tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $certValue "context" .) }}
+ tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $keyValue "context" .) }}
+ {{- if $caValue }}
+ ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $caValue "context" .) }}
+ {{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/update-password/job.yaml b/charts/semaphore/charts/mariadb/templates/update-password/job.yaml
new file mode 100644
index 0000000..afa0e48
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/update-password/job.yaml
@@ -0,0 +1,251 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if .Values.passwordUpdateJob.enabled }}
+apiVersion: batch/v1
+kind: Job
+metadata:
+ name: {{ printf "%s-password-update" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: update-job
+ {{- $defaultAnnotations := dict "helm.sh/hook" "pre-upgrade" "helm.sh/hook-delete-policy" "hook-succeeded" }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonAnnotations $defaultAnnotations ) "context" . ) }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
+spec:
+ backoffLimit: {{ .Values.passwordUpdateJob.backoffLimit }}
+ template:
+ metadata:
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.passwordUpdateJob.podLabels .Values.commonLabels ) "context" . ) }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
+ app.kubernetes.io/part-of: mariadb
+ app.kubernetes.io/component: update-job
+ {{- if .Values.passwordUpdateJob.podAnnotations }}
+ annotations: {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.podAnnotations "context" $) | nindent 8 }}
+ {{- end }}
+ spec:
+ {{- include "mariadb.imagePullSecrets" . | nindent 6 }}
+ restartPolicy: OnFailure
+ {{- if .Values.passwordUpdateJob.podSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.passwordUpdateJob.podSecurityContext "context" $) | nindent 8 }}
+ {{- end }}
+ automountServiceAccountToken: {{ .Values.passwordUpdateJob.automountServiceAccountToken }}
+ {{- if .Values.passwordUpdateJob.hostAliases }}
+ hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.hostAliases "context" $) | nindent 8 }}
+ {{- end }}
+ initContainers:
+ {{- if .Values.passwordUpdateJob.initContainers }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.initContainers "context" $) | nindent 8 }}
+ {{- end }}
+ containers:
+ - name: update-credentials
+ image: {{ template "mariadb.image" . }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ {{- if .Values.passwordUpdateJob.command }}
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.command "context" $) | nindent 12 }}
+ {{- else }}
+ command:
+ - /bin/bash
+ - -ec
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.args }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.args "context" $) | nindent 12 }}
+ {{- else }}
+ args:
+ - |
+ {{- if .Values.usePasswordFiles }}
+ # We need to load all the secret env vars to the system
+ for file in $(find /bitnami/mariadb/secrets -type f); do
+ env_var_name="$(basename $file)"
+ echo "Exporting $env_var_name"
+ export $env_var_name="$(< $file)"
+ done
+ {{- end }}
+
+ . /opt/bitnami/scripts/mariadb-env.sh
+ . /opt/bitnami/scripts/libmariadb.sh
+ . /opt/bitnami/scripts/liblog.sh
+
+ primary_host={{ include "mariadb.primary.fullname" . }}-0.{{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
+ info "Starting password update job"
+ if [[ -f /job-status/root-password-changed ]]; then
+ info "Root password already updated. Skipping"
+ else
+ info "Updating root password"
+ echo "SET PASSWORD for 'root'@'%' = PASSWORD('$MARIADB_NEW_ROOT_PASSWORD');" | mysql_remote_execute $primary_host {{ .Values.primary.containerPorts.mysql }} "" root $MARIADB_PREVIOUS_ROOT_PASSWORD
+ touch /job-status/root-password-changed
+ info "Root password successfully updated"
+ fi
+ {{- if not (empty .Values.auth.username) }}
+ if [[ -f /job-status/password-changed ]]; then
+ info "User password already updated. Skipping"
+ else
+ info "Updating user password"
+ echo "SET PASSWORD for '$MARIADB_USER'@'%' = PASSWORD('$MARIADB_NEW_PASSWORD');" | mysql_remote_execute $primary_host {{ .Values.primary.containerPorts.mysql }} "" $MARIADB_USER $MARIADB_PREVIOUS_PASSWORD
+ touch /job-status/password-changed
+ info "User password successfully updated"
+ fi
+ {{- end }}
+ {{- if eq .Values.architecture "replication" }}
+ if [[ -f /job-status/replication-password-changed ]]; then
+ info "Replication password already updated. Skipping"
+ else
+ info "Updating replication password"
+ echo "SET PASSWORD for '$MARIADB_REPLICATION_USER'@'%' = PASSWORD('$MARIADB_NEW_REPLICATION_PASSWORD');" | mysql_remote_execute $primary_host {{ .Values.primary.containerPorts.mysql }} "" $MARIADB_REPLICATION_USER $MARIADB_PREVIOUS_REPLICATION_PASSWORD
+ touch /job-status/replication-password-changed
+ info "Replication password successfully updated"
+ fi
+
+ for i in $(seq 0 {{ sub .Values.secondary.replicaCount 1 }}); do
+ if [[ -f /job-status/replica-$i-changed ]]; then
+ info "Replica $i already updated. Skipping"
+ else
+ replica_host={{ include "mariadb.secondary.fullname" . }}-$i.{{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
+ info "Updating primary password in replica $i"
+ echo "STOP SLAVE; CHANGE MASTER TO MASTER_PASSWORD='$MARIADB_NEW_REPLICATION_PASSWORD'; START SLAVE;" | mysql_remote_execute $replica_host {{ .Values.secondary.containerPorts.mysql }} "" root $MARIADB_NEW_ROOT_PASSWORD
+ touch /job-status/replica-$i-changed
+ info "Replica $i updated"
+ fi
+ done
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.extraCommands }}
+ info "Running extra commmands"
+ {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.extraCommands "context" $) | nindent 14 }}
+ {{- end }}
+ info "Password update job finished successfully"
+ {{- end }}
+ env:
+ - name: BITNAMI_DEBUG
+ value: {{ ternary "true" "false" .Values.image.debug | quote }}
+ {{- if not .Values.auth.usePasswordFiles }}
+ - name: MARIADB_PREVIOUS_ROOT_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "mariadb.update-job.previousSecretName" . }}
+ key: mariadb-root-password
+ - name: MARIADB_NEW_ROOT_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "mariadb.update-job.newSecretName" . }}
+ key: mariadb-root-password
+ {{- end }}
+ {{- if not (empty .Values.auth.username) }}
+ - name: MARIADB_USER
+ value: {{ .Values.auth.username | quote }}
+ {{- if not .Values.auth.usePasswordFiles }}
+ - name: MARIADB_PREVIOUS_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "mariadb.update-job.previousSecretName" . }}
+ key: mariadb-password
+ - name: MARIADB_NEW_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "mariadb.update-job.newSecretName" . }}
+ key: mariadb-password
+ {{- end }}
+ {{- end }}
+ {{- if eq .Values.architecture "replication" }}
+ - name: MARIADB_REPLICATION_USER
+ value: {{ .Values.auth.replicationUser | quote }}
+ {{- if not .Values.auth.usePasswordFiles }}
+ - name: MARIADB_PREVIOUS_REPLICATION_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "mariadb.update-job.previousSecretName" . }}
+ key: mariadb-replication-password
+ - name: MARIADB_NEW_REPLICATION_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "mariadb.update-job.newSecretName" . }}
+ key: mariadb-replication-password
+ {{- end }}
+ {{- end }}
+ {{- if include "common.fips.enabled" . }}
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.passwordUpdateJob.fips "global" .Values.global) | quote }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.extraEnvVars }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.extraEnvVars "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if or .Values.passwordUpdateJob.extraEnvVarsCM .Values.passwordUpdateJob.extraEnvVarsSecret }}
+ envFrom:
+ {{- if .Values.passwordUpdateJob.extraEnvVarsCM }}
+ - configMapRef:
+ name: {{ .Values.passwordUpdateJob.extraEnvVarsCM }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.extraEnvVarsSecret }}
+ - secretRef:
+ name: {{ .Values.passwordUpdateJob.extraEnvVarsSecret }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.containerSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.passwordUpdateJob.containerSecurityContext "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.customLivenessProbe }}
+ livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.customLivenessProbe "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.customReadinessProbe }}
+ readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.customReadinessProbe "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.customStartupProbe }}
+ startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.customStartupProbe "context" $) | nindent 12 }}
+ {{- end }}
+ volumeMounts:
+ - name: empty-dir
+ mountPath: /job-status
+ subPath: job-dir
+ {{- if .Values.usePasswordFiles }}
+ - name: mariadb-previous-credentials
+ mountPath: /bitnami/mariadb/secrets/previous
+ - name: mariadb-new-credentials
+ mountPath: /bitnami/mariadb/secrets/new
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.extraVolumeMounts }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.extraVolumeMounts "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.resources }}
+ resources: {{- toYaml .Values.passwordUpdateJob.resources | nindent 12 }}
+ {{- else if ne .Values.passwordUpdateJob.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.passwordUpdateJob.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ volumes:
+ - name: empty-dir
+ emptyDir: {}
+ {{- if and .Values.auth.usePasswordFiles }}
+ - name: mariadb-previous-credentials
+ secret:
+ secretName: {{ template "mariadb.update-job.previousSecretName" . }}
+ items:
+ - key: mariadb-root-password
+ path: MARIADB_PREVIOUS_ROOT_PASSWORD
+ {{- if .Values.auth.username }}
+ - key: mariadb-password
+ path: MARIADB_PREVIOUS_PASSWORD
+ {{- end }}
+ {{- if eq .Values.architecture "replication" }}
+ - key: mariadb-replication-password
+ path: MARIADB_PREVIOUS_REPLICATION_PASSWORD
+ {{- end }}
+ - name: mariadb-new-credentials
+ secret:
+ secretName: {{ template "mariadb.update-job.newSecretName" . }}
+ items:
+ - key: mariadb-root-password
+ path: MARIADB_NEW_ROOT_PASSWORD
+ {{- if .Values.auth.username }}
+ - key: mariadb-password
+ path: MARIADB_NEW_PASSWORD
+ {{- end }}
+ {{- if eq .Values.architecture "replication" }}
+ - key: mariadb-replication-password
+ path: MARIADB_NEW_REPLICATION_PASSWORD
+ {{- end }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.extraVolumes }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.extraVolumes "context" $) | nindent 8 }}
+ {{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/update-password/new-secret.yaml b/charts/semaphore/charts/mariadb/templates/update-password/new-secret.yaml
new file mode 100644
index 0000000..01626b5
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/update-password/new-secret.yaml
@@ -0,0 +1,28 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.passwordUpdateJob.enabled (include "mariadb.createSecret" .) (not ( include "mariadb.createPreviousSecret" . )) (not .Values.passwordUpdateJob.previousPasswords.existingSecret) }}
+{{- $rootPassword := .Values.auth.rootPassword }}
+{{- $password := .Values.auth.password }}
+{{- $replicationPassword := .Values.auth.replicationPassword }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ printf "%s-new-secret" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ {{- $defaultAnnotations := dict "helm.sh/hook" "pre-upgrade" "helm.sh/hook-delete-policy" "hook-succeeded" }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonAnnotations $defaultAnnotations ) "context" . ) }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
+type: Opaque
+data:
+ mariadb-root-password: {{ required "The new root password is required!" $rootPassword | b64enc | quote }}
+ {{- if .Values.auth.username }}
+ mariadb-password: {{ required "The new user password is required!" $password | b64enc | quote }}
+ {{- end }}
+ {{- if eq .Values.architecture "replication" }}
+ mariadb-replication-password: {{ required "The new replication password is required!" $replicationPassword | b64enc | quote }}
+ {{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/templates/update-password/previous-secret.yaml b/charts/semaphore/charts/mariadb/templates/update-password/previous-secret.yaml
new file mode 100644
index 0000000..58feb7c
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/templates/update-password/previous-secret.yaml
@@ -0,0 +1,28 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.passwordUpdateJob.enabled (eq ( include "mariadb.createPreviousSecret" . ) "true") }}
+{{- $rootPassword := .Values.passwordUpdateJob.previousPasswords.rootPassword }}
+{{- $password := .Values.passwordUpdateJob.previousPasswords.password }}
+{{- $replicationPassword := .Values.passwordUpdateJob.previousPasswords.replicationPassword }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ printf "%s-previous-secret" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ {{- $defaultAnnotations := dict "helm.sh/hook" "pre-upgrade" "helm.sh/hook-delete-policy" "hook-succeeded" }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonAnnotations $defaultAnnotations ) "context" . ) }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
+type: Opaque
+data:
+ mariadb-root-password: {{ required "The previous root password is required!" $rootPassword | b64enc | quote }}
+ {{- if .Values.auth.username }}
+ mariadb-password: {{ required "The previous user password is required!" $password | b64enc | quote }}
+ {{- end }}
+ {{- if eq .Values.architecture "replication" }}
+ mariadb-replication-password: {{ required "The previous replication password is required!" $replicationPassword | b64enc | quote }}
+ {{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/mariadb/values.schema.json b/charts/semaphore/charts/mariadb/values.schema.json
new file mode 100644
index 0000000..5809c02
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/values.schema.json
@@ -0,0 +1,2289 @@
+{
+ "title": "Chart Values",
+ "type": "object",
+ "properties": {
+ "global": {
+ "type": "object",
+ "properties": {
+ "imageRegistry": {
+ "type": "string",
+ "description": "Global Docker Image registry",
+ "default": ""
+ },
+ "imagePullSecrets": {
+ "type": "array",
+ "description": "Global Docker registry secret names as an array",
+ "default": [],
+ "items": {}
+ },
+ "defaultStorageClass": {
+ "type": "string",
+ "description": "Global default StorageClass for Persistent Volume(s)",
+ "default": ""
+ },
+ "security": {
+ "type": "object",
+ "properties": {
+ "allowInsecureImages": {
+ "type": "boolean",
+ "description": "Allows skipping image verification",
+ "default": false
+ }
+ }
+ },
+ "compatibility": {
+ "type": "object",
+ "properties": {
+ "openshift": {
+ "type": "object",
+ "properties": {
+ "adaptSecurityContext": {
+ "type": "string",
+ "description": "Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation)",
+ "default": "auto"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "kubeVersion": {
+ "type": "string",
+ "description": "Force target Kubernetes version (using Helm capabilities if not set)",
+ "default": ""
+ },
+ "nameOverride": {
+ "type": "string",
+ "description": "String to partially override mariadb.fullname",
+ "default": ""
+ },
+ "fullnameOverride": {
+ "type": "string",
+ "description": "String to fully override mariadb.fullname",
+ "default": ""
+ },
+ "clusterDomain": {
+ "type": "string",
+ "description": "Default Kubernetes cluster domain",
+ "default": "cluster.local"
+ },
+ "commonAnnotations": {
+ "type": "object",
+ "description": "Common annotations to add to all MariaDB resources (sub-charts are not considered)",
+ "default": {}
+ },
+ "commonLabels": {
+ "type": "object",
+ "description": "Common labels to add to all MariaDB resources (sub-charts are not considered)",
+ "default": {}
+ },
+ "schedulerName": {
+ "type": "string",
+ "description": "Name of the scheduler (other than default) to dispatch pods",
+ "default": ""
+ },
+ "runtimeClassName": {
+ "type": "string",
+ "description": "Name of the Runtime Class for all MariaDB pods",
+ "default": ""
+ },
+ "extraDeploy": {
+ "type": "array",
+ "description": "Array of extra objects to deploy with the release (evaluated as a template)",
+ "default": [],
+ "items": {}
+ },
+ "diagnosticMode": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable diagnostic mode (all probes will be disabled and the command will be overridden)",
+ "default": false
+ },
+ "command": {
+ "type": "array",
+ "description": "Command to override all containers in the deployment",
+ "default": [
+ "sleep"
+ ],
+ "items": {
+ "type": "string"
+ }
+ },
+ "args": {
+ "type": "array",
+ "description": "Args to override all containers in the deployment",
+ "default": [
+ "infinity"
+ ],
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "serviceBindings": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Create secret for service binding (Experimental)",
+ "default": false
+ }
+ }
+ },
+ "image": {
+ "type": "object",
+ "properties": {
+ "registry": {
+ "type": "string",
+ "description": "MariaDB image registry",
+ "default": "REGISTRY_NAME"
+ },
+ "repository": {
+ "type": "string",
+ "description": "MariaDB image repository",
+ "default": "REPOSITORY_NAME/mariadb"
+ },
+ "digest": {
+ "type": "string",
+ "description": "MariaDB image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag",
+ "default": ""
+ },
+ "pullPolicy": {
+ "type": "string",
+ "description": "MariaDB image pull policy",
+ "default": "IfNotPresent"
+ },
+ "pullSecrets": {
+ "type": "array",
+ "description": "Specify docker-registry secret names as an array",
+ "default": [],
+ "items": {}
+ },
+ "debug": {
+ "type": "boolean",
+ "description": "Specify if debug logs should be enabled",
+ "default": false
+ }
+ }
+ },
+ "architecture": {
+ "type": "string",
+ "description": "MariaDB architecture (`standalone` or `replication`)",
+ "default": "standalone"
+ },
+ "auth": {
+ "type": "object",
+ "properties": {
+ "rootPassword": {
+ "type": "string",
+ "description": "Password for the `root` user. Ignored if existing secret is provided.",
+ "default": ""
+ },
+ "database": {
+ "type": "string",
+ "description": "Name for a custom database to create",
+ "default": "my_database"
+ },
+ "username": {
+ "type": "string",
+ "description": "Name for a custom user to create",
+ "default": ""
+ },
+ "password": {
+ "type": "string",
+ "description": "Password for the new user. Ignored if existing secret is provided",
+ "default": ""
+ },
+ "replicationUser": {
+ "type": "string",
+ "description": "MariaDB replication user",
+ "default": "replicator"
+ },
+ "replicationPassword": {
+ "type": "string",
+ "description": "MariaDB replication user password. Ignored if existing secret is provided",
+ "default": ""
+ },
+ "existingSecret": {
+ "type": "string",
+ "description": "Use existing secret for password details (`auth.rootPassword`, `auth.password`, `auth.replicationPassword` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`",
+ "default": ""
+ },
+ "forcePassword": {
+ "type": "boolean",
+ "description": "Force users to specify required passwords",
+ "default": false
+ },
+ "usePasswordFiles": {
+ "type": "boolean",
+ "description": "Mount credentials as files instead of using environment variables",
+ "default": false
+ },
+ "customPasswordFiles": {
+ "type": "object",
+ "description": "Use custom password files when `auth.usePasswordFiles` is set to `true`. Define path for keys `root` and `user`, also define `replicator` if `architecture` is set to `replication`",
+ "default": {}
+ }
+ }
+ },
+ "initdbScripts": {
+ "type": "object",
+ "description": "Dictionary of initdb scripts",
+ "default": {}
+ },
+ "initdbScriptsConfigMap": {
+ "type": "string",
+ "description": "ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`)",
+ "default": ""
+ },
+ "tls": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable TLS in MariaDB",
+ "default": false
+ },
+ "existingSecret": {
+ "type": "string",
+ "description": "Existing secret that contains TLS certificates",
+ "default": ""
+ },
+ "certFilename": {
+ "type": "string",
+ "description": "The secret key from the existingSecret if 'cert' key different from the default (tls.crt)",
+ "default": "tls.crt"
+ },
+ "certKeyFilename": {
+ "type": "string",
+ "description": "The secret key from the existingSecret if 'key' key different from the default (tls.key)",
+ "default": "tls.key"
+ },
+ "certCAFilename": {
+ "type": "string",
+ "description": "The secret key from the existingSecret if 'ca' key different from the default (tls.crt)",
+ "default": ""
+ },
+ "ca": {
+ "type": "string",
+ "description": "CA certificate for TLS. Ignored if `tls.existingSecret` is set",
+ "default": ""
+ },
+ "cert": {
+ "type": "string",
+ "description": "TLS certificate. Ignored if `tls.master.existingSecret` is set",
+ "default": ""
+ },
+ "key": {
+ "type": "string",
+ "description": "TLS key. Ignored if `tls.master.existingSecret` is set",
+ "default": ""
+ },
+ "autoGenerated": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable automatic generation of certificates for TLS",
+ "default": true
+ },
+ "engine": {
+ "type": "string",
+ "description": "Mechanism to generate the certificates (allowed values: helm, cert-manager)",
+ "default": "helm"
+ },
+ "certManager": {
+ "type": "object",
+ "properties": {
+ "existingIssuer": {
+ "type": "string",
+ "description": "The name of an existing Issuer to use for generating the certificates (only for `cert-manager` engine)",
+ "default": ""
+ },
+ "existingIssuerKind": {
+ "type": "string",
+ "description": "Existing Issuer kind, defaults to Issuer (only for `cert-manager` engine)",
+ "default": ""
+ },
+ "keyAlgorithm": {
+ "type": "string",
+ "description": "Key algorithm for the certificates (only for `cert-manager` engine)",
+ "default": "RSA"
+ },
+ "keySize": {
+ "type": "number",
+ "description": "Key size for the certificates (only for `cert-manager` engine)",
+ "default": 2048
+ },
+ "duration": {
+ "type": "string",
+ "description": "Duration for the certificates (only for `cert-manager` engine)",
+ "default": "2160h"
+ },
+ "renewBefore": {
+ "type": "string",
+ "description": "Renewal period for the certificates (only for `cert-manager` engine)",
+ "default": "360h"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "tde": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable Transparent Data Encryption using the File Key Management Encryption Plugin for MariaDB",
+ "default": false
+ },
+ "existingSecret": {
+ "type": "string",
+ "description": "Existing secret that contains Transparent Data Encryption key files used when secretsStoreProvider is not enabled",
+ "default": ""
+ },
+ "randomKeyFilename": {
+ "type": "string",
+ "description": "File name of the 'random keyfile' when it is different from the default (keyfile.key), is also used for key name in the existingSecret",
+ "default": "keyfile.key"
+ },
+ "encryptedKeyFilename": {
+ "type": "string",
+ "description": "File name of the 'encrypted keyfile' when it is different from the default (keyfile.enc), is also used for key name in the existingSecret",
+ "default": "keyfile.enc"
+ },
+ "fileKeyManagementEncryptionAlgorithm": {
+ "type": "string",
+ "description": "Encryption algorithm used for encrypting data (allowed values: AES_CTR, AES_CBC | default: AES_CTR)",
+ "default": "AES_CTR"
+ },
+ "innodbEncryptTables": {
+ "type": "string",
+ "description": "Enables automatic encryption of all InnoDB tablespaces (allowed values: FORCE, ON, OFF | default: FORCE)",
+ "default": "FORCE"
+ },
+ "innodbEncryptLog": {
+ "type": "string",
+ "description": "Enables encryption of the InnoDB redo log (allowed values: ON, OFF | default: ON)",
+ "default": "ON"
+ },
+ "innodbEncryptTemporaryTables": {
+ "type": "string",
+ "description": "Enables automatic encryption of the InnoDB temporary tablespace (allowed values: ON, OFF | default: ON)",
+ "default": "ON"
+ },
+ "innodbEncryptionThreads": {
+ "type": "number",
+ "description": "Number of threads to use for encryption (default: 4)",
+ "default": 4
+ },
+ "encryptTmpDiskTables": {
+ "type": "string",
+ "description": "Enables automatic encryption of all internal on-disk temporary tables that are created during query execution (allowed values: ON, OFF | default: ON)",
+ "default": "ON"
+ },
+ "encryptTmpTiles": {
+ "type": "string",
+ "description": "Enables automatic encryption of temporary files, such as those created for filesort operations, binary log file caches, etc. (allowed values: ON, OFF | default: ON)",
+ "default": "ON"
+ },
+ "encryptBINLOG": {
+ "type": "string",
+ "description": "Enables encrypting binary logs including relay logs (allowed values: ON, OFF | default: ON)",
+ "default": "ON"
+ },
+ "ariaEncryptTables": {
+ "type": "string",
+ "description": "Enables automatic encryption of all Aria tablespaces (allowed values: ON, OFF | default: ON)",
+ "default": "ON"
+ },
+ "secretsStoreProvider": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable use of secrets store provider for Transparent Data Encryption key files",
+ "default": false
+ },
+ "provider": {
+ "type": "string",
+ "description": "Type of provider used in secrets store provider class (allowed values: vault)",
+ "default": "vault"
+ },
+ "vault": {
+ "type": "object",
+ "properties": {
+ "roleName": {
+ "type": "string",
+ "description": "The name of the HashiCorp Vault role used for accessing the key files (only for `vault` provider)",
+ "default": ""
+ },
+ "address": {
+ "type": "string",
+ "description": "The URL of the HashiCorp Vault server (only for `vault` provider)",
+ "default": ""
+ },
+ "authMountPath": {
+ "type": "string",
+ "description": "The HashiCorp Vault auth mount path (only for `vault` provider)",
+ "default": ""
+ },
+ "randomKeySecretPath": {
+ "type": "string",
+ "description": "The HashiCorp Vault secret path for the 'random keyfile' (only for `vault` provider)",
+ "default": ""
+ },
+ "randomKeySecretKey": {
+ "type": "string",
+ "description": "The HashiCorp Vault secret key for the 'random keyfile' (only for `vault` provider)",
+ "default": ""
+ },
+ "encryptedKeySecretPath": {
+ "type": "string",
+ "description": "The HashiCorp Vault secret path for the 'encrypted keyfile' (only for `vault` provider)",
+ "default": ""
+ },
+ "encryptedKeySecretKey": {
+ "type": "string",
+ "description": "The HashiCorp Vault secret key for the 'encrypted keyfile' (only for `vault` provider)",
+ "default": ""
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "primary": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the primary database (eg primary, master, leader, ...)",
+ "default": "primary"
+ },
+ "command": {
+ "type": "array",
+ "description": "Override default container command on MariaDB Primary container(s) (useful when using custom images)",
+ "default": [],
+ "items": {}
+ },
+ "args": {
+ "type": "array",
+ "description": "Override default container args on MariaDB Primary container(s) (useful when using custom images)",
+ "default": [],
+ "items": {}
+ },
+ "lifecycleHooks": {
+ "type": "object",
+ "description": "for the MariaDB Primary container(s) to automate configuration before or after startup",
+ "default": {}
+ },
+ "automountServiceAccountToken": {
+ "type": "boolean",
+ "description": "Mount Service Account token in pod",
+ "default": false
+ },
+ "hostAliases": {
+ "type": "array",
+ "description": "Add deployment host aliases",
+ "default": [],
+ "items": {}
+ },
+ "containerPorts": {
+ "type": "object",
+ "properties": {
+ "mysql": {
+ "type": "number",
+ "description": "Container port for mysql",
+ "default": 3306
+ }
+ }
+ },
+ "configuration": {
+ "type": "string",
+ "description": "MariaDB Primary configuration to be injected as ConfigMap",
+ "default": "\"\""
+ },
+ "existingConfigmap": {
+ "type": "string",
+ "description": "Name of existing ConfigMap with MariaDB Primary configuration.",
+ "default": ""
+ },
+ "updateStrategy": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "MariaDB primary statefulset strategy type",
+ "default": "RollingUpdate"
+ }
+ }
+ },
+ "rollingUpdatePartition": {
+ "type": "string",
+ "description": "Partition update strategy for Mariadb Primary statefulset",
+ "default": ""
+ },
+ "podAnnotations": {
+ "type": "object",
+ "description": "Additional pod annotations for MariaDB primary pods",
+ "default": {}
+ },
+ "podLabels": {
+ "type": "object",
+ "description": "Extra labels for MariaDB primary pods",
+ "default": {}
+ },
+ "podAffinityPreset": {
+ "type": "string",
+ "description": "MariaDB primary pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`",
+ "default": ""
+ },
+ "podAntiAffinityPreset": {
+ "type": "string",
+ "description": "MariaDB primary pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`",
+ "default": "soft"
+ },
+ "nodeAffinityPreset": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "MariaDB primary node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`",
+ "default": ""
+ },
+ "key": {
+ "type": "string",
+ "description": "MariaDB primary node label key to match Ignored if `primary.affinity` is set.",
+ "default": ""
+ },
+ "values": {
+ "type": "array",
+ "description": "MariaDB primary node label values to match. Ignored if `primary.affinity` is set.",
+ "default": [],
+ "items": {}
+ }
+ }
+ },
+ "affinity": {
+ "type": "object",
+ "description": "Affinity for MariaDB primary pods assignment",
+ "default": {}
+ },
+ "nodeSelector": {
+ "type": "object",
+ "description": "Node labels for MariaDB primary pods assignment",
+ "default": {}
+ },
+ "tolerations": {
+ "type": "array",
+ "description": "Tolerations for MariaDB primary pods assignment",
+ "default": [],
+ "items": {}
+ },
+ "schedulerName": {
+ "type": "string",
+ "description": "Name of the k8s scheduler (other than default)",
+ "default": ""
+ },
+ "podManagementPolicy": {
+ "type": "string",
+ "description": "podManagementPolicy to manage scaling operation of MariaDB primary pods",
+ "default": ""
+ },
+ "topologySpreadConstraints": {
+ "type": "array",
+ "description": "Topology Spread Constraints for MariaDB primary pods assignment",
+ "default": [],
+ "items": {}
+ },
+ "priorityClassName": {
+ "type": "string",
+ "description": "Priority class for MariaDB primary pods assignment",
+ "default": ""
+ },
+ "runtimeClassName": {
+ "type": "string",
+ "description": "Runtime Class for MariaDB primary pods",
+ "default": ""
+ },
+ "podSecurityContext": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable security context for MariaDB primary pods",
+ "default": true
+ },
+ "fsGroupChangePolicy": {
+ "type": "string",
+ "description": "Set filesystem group change policy",
+ "default": "Always"
+ },
+ "sysctls": {
+ "type": "array",
+ "description": "Set kernel settings using the sysctl interface",
+ "default": [],
+ "items": {}
+ },
+ "supplementalGroups": {
+ "type": "array",
+ "description": "Set filesystem extra groups",
+ "default": [],
+ "items": {}
+ },
+ "fsGroup": {
+ "type": "number",
+ "description": "Group ID for the mounted volumes' filesystem",
+ "default": 1001
+ }
+ }
+ },
+ "containerSecurityContext": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "MariaDB primary container securityContext",
+ "default": true
+ },
+ "runAsUser": {
+ "type": "number",
+ "description": "User ID for the MariaDB primary container",
+ "default": 1001
+ },
+ "runAsGroup": {
+ "type": "number",
+ "description": "Group ID for the MariaDB primary container",
+ "default": 1001
+ },
+ "runAsNonRoot": {
+ "type": "boolean",
+ "description": "Set primary container's Security Context runAsNonRoot",
+ "default": true
+ },
+ "privileged": {
+ "type": "boolean",
+ "description": "Set primary container's Security Context privileged",
+ "default": false
+ },
+ "allowPrivilegeEscalation": {
+ "type": "boolean",
+ "description": "Set primary container's Security Context allowPrivilegeEscalation",
+ "default": false
+ },
+ "readOnlyRootFilesystem": {
+ "type": "boolean",
+ "description": "Set container's Security Context readOnlyRootFilesystem",
+ "default": true
+ },
+ "capabilities": {
+ "type": "object",
+ "properties": {
+ "drop": {
+ "type": "array",
+ "description": "List of capabilities to be dropped",
+ "default": [
+ "ALL"
+ ],
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "seccompProfile": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Set container's Security Context seccomp profile",
+ "default": "RuntimeDefault"
+ }
+ }
+ }
+ }
+ },
+ "resourcesPreset": {
+ "type": "string",
+ "description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if primary.resources is set (primary.resources is recommended for production).",
+ "default": "micro"
+ },
+ "resources": {
+ "type": "object",
+ "description": "Set container requests and limits for different resources like CPU or memory (essential for production workloads)",
+ "default": {}
+ },
+ "startupProbe": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable startupProbe",
+ "default": false
+ },
+ "initialDelaySeconds": {
+ "type": "number",
+ "description": "Initial delay seconds for startupProbe",
+ "default": 120
+ },
+ "periodSeconds": {
+ "type": "number",
+ "description": "Period seconds for startupProbe",
+ "default": 15
+ },
+ "timeoutSeconds": {
+ "type": "number",
+ "description": "Timeout seconds for startupProbe",
+ "default": 5
+ },
+ "failureThreshold": {
+ "type": "number",
+ "description": "Failure threshold for startupProbe",
+ "default": 10
+ },
+ "successThreshold": {
+ "type": "number",
+ "description": "Success threshold for startupProbe",
+ "default": 1
+ }
+ }
+ },
+ "livenessProbe": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable livenessProbe",
+ "default": true
+ },
+ "initialDelaySeconds": {
+ "type": "number",
+ "description": "Initial delay seconds for livenessProbe",
+ "default": 120
+ },
+ "periodSeconds": {
+ "type": "number",
+ "description": "Period seconds for livenessProbe",
+ "default": 10
+ },
+ "timeoutSeconds": {
+ "type": "number",
+ "description": "Timeout seconds for livenessProbe",
+ "default": 1
+ },
+ "failureThreshold": {
+ "type": "number",
+ "description": "Failure threshold for livenessProbe",
+ "default": 3
+ },
+ "successThreshold": {
+ "type": "number",
+ "description": "Success threshold for livenessProbe",
+ "default": 1
+ }
+ }
+ },
+ "readinessProbe": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable readinessProbe",
+ "default": true
+ },
+ "initialDelaySeconds": {
+ "type": "number",
+ "description": "Initial delay seconds for readinessProbe",
+ "default": 30
+ },
+ "periodSeconds": {
+ "type": "number",
+ "description": "Period seconds for readinessProbe",
+ "default": 10
+ },
+ "timeoutSeconds": {
+ "type": "number",
+ "description": "Timeout seconds for readinessProbe",
+ "default": 1
+ },
+ "failureThreshold": {
+ "type": "number",
+ "description": "Failure threshold for readinessProbe",
+ "default": 3
+ },
+ "successThreshold": {
+ "type": "number",
+ "description": "Success threshold for readinessProbe",
+ "default": 1
+ }
+ }
+ },
+ "customStartupProbe": {
+ "type": "object",
+ "description": "Override default startup probe for MariaDB primary containers",
+ "default": {}
+ },
+ "customLivenessProbe": {
+ "type": "object",
+ "description": "Override default liveness probe for MariaDB primary containers",
+ "default": {}
+ },
+ "customReadinessProbe": {
+ "type": "object",
+ "description": "Override default readiness probe for MariaDB primary containers",
+ "default": {}
+ },
+ "startupWaitOptions": {
+ "type": "object",
+ "description": "Override default builtin startup wait check options for MariaDB primary containers",
+ "default": {}
+ },
+ "extraFlags": {
+ "type": "string",
+ "description": "MariaDB primary additional command line flags",
+ "default": ""
+ },
+ "extraEnvVars": {
+ "type": "array",
+ "description": "Extra environment variables to be set on MariaDB primary containers",
+ "default": [],
+ "items": {}
+ },
+ "extraEnvVarsCM": {
+ "type": "string",
+ "description": "Name of existing ConfigMap containing extra env vars for MariaDB primary containers",
+ "default": ""
+ },
+ "extraEnvVarsSecret": {
+ "type": "string",
+ "description": "Name of existing Secret containing extra env vars for MariaDB primary containers",
+ "default": ""
+ },
+ "persistence": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable persistence on MariaDB primary replicas using a `PersistentVolumeClaim`. If false, use emptyDir",
+ "default": true
+ },
+ "existingClaim": {
+ "type": "string",
+ "description": "Name of an existing `PersistentVolumeClaim` for MariaDB primary replicas",
+ "default": ""
+ },
+ "subPath": {
+ "type": "string",
+ "description": "Subdirectory of the volume to mount at",
+ "default": ""
+ },
+ "storageClass": {
+ "type": "string",
+ "description": "MariaDB primary persistent volume storage Class",
+ "default": ""
+ },
+ "labels": {
+ "type": "object",
+ "description": "Labels for the PVC",
+ "default": {}
+ },
+ "annotations": {
+ "type": "object",
+ "description": "MariaDB primary persistent volume claim annotations",
+ "default": {}
+ },
+ "accessModes": {
+ "type": "array",
+ "description": "MariaDB primary persistent volume access Modes",
+ "default": [
+ "ReadWriteOnce"
+ ],
+ "items": {
+ "type": "string"
+ }
+ },
+ "size": {
+ "type": "string",
+ "description": "MariaDB primary persistent volume size",
+ "default": "8Gi"
+ },
+ "selector": {
+ "type": "object",
+ "description": "Selector to match an existing Persistent Volume",
+ "default": {}
+ }
+ }
+ },
+ "extraVolumes": {
+ "type": "array",
+ "description": "Optionally specify extra list of additional volumes to the MariaDB Primary pod(s)",
+ "default": [],
+ "items": {}
+ },
+ "extraVolumeMounts": {
+ "type": "array",
+ "description": "Optionally specify extra list of additional volumeMounts for the MariaDB Primary container(s)",
+ "default": [],
+ "items": {}
+ },
+ "initContainers": {
+ "type": "array",
+ "description": "Add additional init containers for the MariaDB Primary pod(s)",
+ "default": [],
+ "items": {}
+ },
+ "sidecars": {
+ "type": "array",
+ "description": "Add additional sidecar containers for the MariaDB Primary pod(s)",
+ "default": [],
+ "items": {}
+ },
+ "service": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "MariaDB Primary Kubernetes service type",
+ "default": "ClusterIP"
+ },
+ "ports": {
+ "type": "object",
+ "properties": {
+ "mysql": {
+ "type": "number",
+ "description": "MariaDB Primary Kubernetes service port for MariaDB",
+ "default": 3306
+ },
+ "metrics": {
+ "type": "number",
+ "description": "MariaDB Primary Kubernetes service port for metrics",
+ "default": 9104
+ }
+ }
+ },
+ "nodePorts": {
+ "type": "object",
+ "properties": {
+ "mysql": {
+ "type": "string",
+ "description": "MariaDB Primary Kubernetes service node port",
+ "default": ""
+ }
+ }
+ },
+ "clusterIP": {
+ "type": "string",
+ "description": "MariaDB Primary Kubernetes service clusterIP IP",
+ "default": ""
+ },
+ "loadBalancerIP": {
+ "type": "string",
+ "description": "MariaDB Primary loadBalancerIP if service type is `LoadBalancer`",
+ "default": ""
+ },
+ "externalTrafficPolicy": {
+ "type": "string",
+ "description": "Enable client source IP preservation",
+ "default": "Cluster"
+ },
+ "loadBalancerSourceRanges": {
+ "type": "array",
+ "description": "Address that are allowed when MariaDB Primary service is LoadBalancer",
+ "default": [],
+ "items": {}
+ },
+ "extraPorts": {
+ "type": "array",
+ "description": "Extra ports to expose (normally used with the `sidecar` value)",
+ "default": [],
+ "items": {}
+ },
+ "annotations": {
+ "type": "object",
+ "description": "Provide any additional annotations which may be required",
+ "default": {}
+ },
+ "sessionAffinity": {
+ "type": "string",
+ "description": "Session Affinity for Kubernetes service, can be \"None\" or \"ClientIP\"",
+ "default": "None"
+ },
+ "sessionAffinityConfig": {
+ "type": "object",
+ "description": "Additional settings for the sessionAffinity",
+ "default": {}
+ },
+ "headless": {
+ "type": "object",
+ "properties": {
+ "annotations": {
+ "type": "object",
+ "description": "Annotations of the headless service",
+ "default": {}
+ }
+ }
+ }
+ }
+ },
+ "pdb": {
+ "type": "object",
+ "properties": {
+ "create": {
+ "type": "boolean",
+ "description": "Enable/disable a Pod Disruption Budget creation for MariaDB primary pods",
+ "default": true
+ },
+ "minAvailable": {
+ "type": "string",
+ "description": "Minimum number/percentage of MariaDB primary pods that must still be available after the eviction",
+ "default": ""
+ },
+ "maxUnavailable": {
+ "type": "string",
+ "description": "Maximum number/percentage of MariaDB primary pods that can be unavailable after the eviction. Defaults to `1` if both `primary.pdb.minAvailable` and `primary.pdb.maxUnavailable` are empty.",
+ "default": ""
+ }
+ }
+ },
+ "revisionHistoryLimit": {
+ "type": "number",
+ "description": "Maximum number of revisions that will be maintained in the StatefulSet",
+ "default": 10
+ }
+ }
+ },
+ "secondary": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the secondary database (eg secondary, slave, ...)",
+ "default": "secondary"
+ },
+ "replicaCount": {
+ "type": "number",
+ "description": "Number of MariaDB secondary replicas",
+ "default": 1
+ },
+ "command": {
+ "type": "array",
+ "description": "Override default container command on MariaDB Secondary container(s) (useful when using custom images)",
+ "default": [],
+ "items": {}
+ },
+ "args": {
+ "type": "array",
+ "description": "Override default container args on MariaDB Secondary container(s) (useful when using custom images)",
+ "default": [],
+ "items": {}
+ },
+ "lifecycleHooks": {
+ "type": "object",
+ "description": "for the MariaDB Secondary container(s) to automate configuration before or after startup",
+ "default": {}
+ },
+ "automountServiceAccountToken": {
+ "type": "boolean",
+ "description": "Mount Service Account token in pod",
+ "default": false
+ },
+ "hostAliases": {
+ "type": "array",
+ "description": "Add deployment host aliases",
+ "default": [],
+ "items": {}
+ },
+ "containerPorts": {
+ "type": "object",
+ "properties": {
+ "mysql": {
+ "type": "number",
+ "description": "Container port for mysql",
+ "default": 3306
+ }
+ }
+ },
+ "configuration": {
+ "type": "string",
+ "description": "MariaDB Secondary configuration to be injected as ConfigMap",
+ "default": "\"\""
+ },
+ "existingConfigmap": {
+ "type": "string",
+ "description": "Name of existing ConfigMap with MariaDB Secondary configuration.",
+ "default": ""
+ },
+ "updateStrategy": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "MariaDB secondary statefulset strategy type",
+ "default": "RollingUpdate"
+ }
+ }
+ },
+ "rollingUpdatePartition": {
+ "type": "string",
+ "description": "Partition update strategy for Mariadb Secondary statefulset",
+ "default": ""
+ },
+ "podAnnotations": {
+ "type": "object",
+ "description": "Additional pod annotations for MariaDB secondary pods",
+ "default": {}
+ },
+ "podLabels": {
+ "type": "object",
+ "description": "Extra labels for MariaDB secondary pods",
+ "default": {}
+ },
+ "podAffinityPreset": {
+ "type": "string",
+ "description": "MariaDB secondary pod affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`",
+ "default": ""
+ },
+ "podAntiAffinityPreset": {
+ "type": "string",
+ "description": "MariaDB secondary pod anti-affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`",
+ "default": "soft"
+ },
+ "nodeAffinityPreset": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "MariaDB secondary node affinity preset type. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`",
+ "default": ""
+ },
+ "key": {
+ "type": "string",
+ "description": "MariaDB secondary node label key to match Ignored if `secondary.affinity` is set.",
+ "default": ""
+ },
+ "values": {
+ "type": "array",
+ "description": "MariaDB secondary node label values to match. Ignored if `secondary.affinity` is set.",
+ "default": [],
+ "items": {}
+ }
+ }
+ },
+ "affinity": {
+ "type": "object",
+ "description": "Affinity for MariaDB secondary pods assignment",
+ "default": {}
+ },
+ "nodeSelector": {
+ "type": "object",
+ "description": "Node labels for MariaDB secondary pods assignment",
+ "default": {}
+ },
+ "tolerations": {
+ "type": "array",
+ "description": "Tolerations for MariaDB secondary pods assignment",
+ "default": [],
+ "items": {}
+ },
+ "topologySpreadConstraints": {
+ "type": "array",
+ "description": "Topology Spread Constraints for MariaDB secondary pods assignment",
+ "default": [],
+ "items": {}
+ },
+ "priorityClassName": {
+ "type": "string",
+ "description": "Priority class for MariaDB secondary pods assignment",
+ "default": ""
+ },
+ "runtimeClassName": {
+ "type": "string",
+ "description": "Runtime Class for MariaDB secondary pods",
+ "default": ""
+ },
+ "schedulerName": {
+ "type": "string",
+ "description": "Name of the k8s scheduler (other than default)",
+ "default": ""
+ },
+ "podManagementPolicy": {
+ "type": "string",
+ "description": "podManagementPolicy to manage scaling operation of MariaDB secondary pods",
+ "default": ""
+ },
+ "podSecurityContext": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable security context for MariaDB secondary pods",
+ "default": true
+ },
+ "fsGroupChangePolicy": {
+ "type": "string",
+ "description": "Set filesystem group change policy",
+ "default": "Always"
+ },
+ "sysctls": {
+ "type": "array",
+ "description": "Set kernel settings using the sysctl interface",
+ "default": [],
+ "items": {}
+ },
+ "supplementalGroups": {
+ "type": "array",
+ "description": "Set filesystem extra groups",
+ "default": [],
+ "items": {}
+ },
+ "fsGroup": {
+ "type": "number",
+ "description": "Group ID for the mounted volumes' filesystem",
+ "default": 1001
+ }
+ }
+ },
+ "containerSecurityContext": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "MariaDB secondary container securityContext",
+ "default": true
+ },
+ "runAsUser": {
+ "type": "number",
+ "description": "User ID for the MariaDB secondary container",
+ "default": 1001
+ },
+ "runAsGroup": {
+ "type": "number",
+ "description": "Group ID for the MariaDB secondary container",
+ "default": 1001
+ },
+ "runAsNonRoot": {
+ "type": "boolean",
+ "description": "Set secondary container's Security Context runAsNonRoot",
+ "default": true
+ },
+ "privileged": {
+ "type": "boolean",
+ "description": "Set secondary container's Security Context privileged",
+ "default": false
+ },
+ "allowPrivilegeEscalation": {
+ "type": "boolean",
+ "description": "Set secondary container's Security Context allowPrivilegeEscalation",
+ "default": false
+ },
+ "readOnlyRootFilesystem": {
+ "type": "boolean",
+ "description": "Set container's Security Context readOnlyRootFilesystem",
+ "default": true
+ },
+ "capabilities": {
+ "type": "object",
+ "properties": {
+ "drop": {
+ "type": "array",
+ "description": "List of capabilities to be dropped",
+ "default": [
+ "ALL"
+ ],
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "seccompProfile": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Set container's Security Context seccomp profile",
+ "default": "RuntimeDefault"
+ }
+ }
+ }
+ }
+ },
+ "resourcesPreset": {
+ "type": "string",
+ "description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if secondary.resources is set (secondary.resources is recommended for production).",
+ "default": "micro"
+ },
+ "resources": {
+ "type": "object",
+ "description": "Set container requests and limits for different resources like CPU or memory (essential for production workloads)",
+ "default": {}
+ },
+ "startupProbe": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable startupProbe",
+ "default": false
+ },
+ "initialDelaySeconds": {
+ "type": "number",
+ "description": "Initial delay seconds for startupProbe",
+ "default": 120
+ },
+ "periodSeconds": {
+ "type": "number",
+ "description": "Period seconds for startupProbe",
+ "default": 15
+ },
+ "timeoutSeconds": {
+ "type": "number",
+ "description": "Timeout seconds for startupProbe",
+ "default": 5
+ },
+ "failureThreshold": {
+ "type": "number",
+ "description": "Failure threshold for startupProbe",
+ "default": 10
+ },
+ "successThreshold": {
+ "type": "number",
+ "description": "Success threshold for startupProbe",
+ "default": 1
+ }
+ }
+ },
+ "livenessProbe": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable livenessProbe",
+ "default": true
+ },
+ "initialDelaySeconds": {
+ "type": "number",
+ "description": "Initial delay seconds for livenessProbe",
+ "default": 120
+ },
+ "periodSeconds": {
+ "type": "number",
+ "description": "Period seconds for livenessProbe",
+ "default": 10
+ },
+ "timeoutSeconds": {
+ "type": "number",
+ "description": "Timeout seconds for livenessProbe",
+ "default": 1
+ },
+ "failureThreshold": {
+ "type": "number",
+ "description": "Failure threshold for livenessProbe",
+ "default": 3
+ },
+ "successThreshold": {
+ "type": "number",
+ "description": "Success threshold for livenessProbe",
+ "default": 1
+ }
+ }
+ },
+ "readinessProbe": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable readinessProbe",
+ "default": true
+ },
+ "initialDelaySeconds": {
+ "type": "number",
+ "description": "Initial delay seconds for readinessProbe",
+ "default": 30
+ },
+ "periodSeconds": {
+ "type": "number",
+ "description": "Period seconds for readinessProbe",
+ "default": 10
+ },
+ "timeoutSeconds": {
+ "type": "number",
+ "description": "Timeout seconds for readinessProbe",
+ "default": 1
+ },
+ "failureThreshold": {
+ "type": "number",
+ "description": "Failure threshold for readinessProbe",
+ "default": 3
+ },
+ "successThreshold": {
+ "type": "number",
+ "description": "Success threshold for readinessProbe",
+ "default": 1
+ }
+ }
+ },
+ "customStartupProbe": {
+ "type": "object",
+ "description": "Override default startup probe for MariaDB secondary containers",
+ "default": {}
+ },
+ "customLivenessProbe": {
+ "type": "object",
+ "description": "Override default liveness probe for MariaDB secondary containers",
+ "default": {}
+ },
+ "customReadinessProbe": {
+ "type": "object",
+ "description": "Override default readiness probe for MariaDB secondary containers",
+ "default": {}
+ },
+ "startupWaitOptions": {
+ "type": "object",
+ "description": "Override default builtin startup wait check options for MariaDB secondary containers",
+ "default": {}
+ },
+ "extraFlags": {
+ "type": "string",
+ "description": "MariaDB secondary additional command line flags",
+ "default": ""
+ },
+ "extraEnvVars": {
+ "type": "array",
+ "description": "Extra environment variables to be set on MariaDB secondary containers",
+ "default": [],
+ "items": {}
+ },
+ "extraEnvVarsCM": {
+ "type": "string",
+ "description": "Name of existing ConfigMap containing extra env vars for MariaDB secondary containers",
+ "default": ""
+ },
+ "extraEnvVarsSecret": {
+ "type": "string",
+ "description": "Name of existing Secret containing extra env vars for MariaDB secondary containers",
+ "default": ""
+ },
+ "persistence": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable persistence on MariaDB secondary replicas using a `PersistentVolumeClaim`",
+ "default": true
+ },
+ "subPath": {
+ "type": "string",
+ "description": "Subdirectory of the volume to mount at",
+ "default": ""
+ },
+ "storageClass": {
+ "type": "string",
+ "description": "MariaDB secondary persistent volume storage Class",
+ "default": ""
+ },
+ "labels": {
+ "type": "object",
+ "description": "Labels for the PVC",
+ "default": {}
+ },
+ "annotations": {
+ "type": "object",
+ "description": "MariaDB secondary persistent volume claim annotations",
+ "default": {}
+ },
+ "accessModes": {
+ "type": "array",
+ "description": "MariaDB secondary persistent volume access Modes",
+ "default": [
+ "ReadWriteOnce"
+ ],
+ "items": {
+ "type": "string"
+ }
+ },
+ "size": {
+ "type": "string",
+ "description": "MariaDB secondary persistent volume size",
+ "default": "8Gi"
+ },
+ "selector": {
+ "type": "object",
+ "description": "Selector to match an existing Persistent Volume",
+ "default": {}
+ }
+ }
+ },
+ "extraVolumes": {
+ "type": "array",
+ "description": "Optionally specify extra list of additional volumes to the MariaDB secondary pod(s)",
+ "default": [],
+ "items": {}
+ },
+ "extraVolumeMounts": {
+ "type": "array",
+ "description": "Optionally specify extra list of additional volumeMounts for the MariaDB secondary container(s)",
+ "default": [],
+ "items": {}
+ },
+ "initContainers": {
+ "type": "array",
+ "description": "Add additional init containers for the MariaDB secondary pod(s)",
+ "default": [],
+ "items": {}
+ },
+ "sidecars": {
+ "type": "array",
+ "description": "Add additional sidecar containers for the MariaDB secondary pod(s)",
+ "default": [],
+ "items": {}
+ },
+ "service": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "MariaDB secondary Kubernetes service type",
+ "default": "ClusterIP"
+ },
+ "ports": {
+ "type": "object",
+ "properties": {
+ "mysql": {
+ "type": "number",
+ "description": "MariaDB secondary Kubernetes service port for MariaDB",
+ "default": 3306
+ },
+ "metrics": {
+ "type": "number",
+ "description": "MariaDB secondary Kubernetes service port for metrics",
+ "default": 9104
+ }
+ }
+ },
+ "nodePorts": {
+ "type": "object",
+ "properties": {
+ "mysql": {
+ "type": "string",
+ "description": "MariaDB secondary Kubernetes service node port",
+ "default": ""
+ }
+ }
+ },
+ "clusterIP": {
+ "type": "string",
+ "description": "MariaDB secondary Kubernetes service clusterIP IP",
+ "default": ""
+ },
+ "loadBalancerIP": {
+ "type": "string",
+ "description": "MariaDB secondary loadBalancerIP if service type is `LoadBalancer`",
+ "default": ""
+ },
+ "externalTrafficPolicy": {
+ "type": "string",
+ "description": "Enable client source IP preservation",
+ "default": "Cluster"
+ },
+ "loadBalancerSourceRanges": {
+ "type": "array",
+ "description": "Address that are allowed when MariaDB secondary service is LoadBalancer",
+ "default": [],
+ "items": {}
+ },
+ "extraPorts": {
+ "type": "array",
+ "description": "Extra ports to expose (normally used with the `sidecar` value)",
+ "default": [],
+ "items": {}
+ },
+ "annotations": {
+ "type": "object",
+ "description": "Provide any additional annotations which may be required",
+ "default": {}
+ },
+ "sessionAffinity": {
+ "type": "string",
+ "description": "Session Affinity for Kubernetes service, can be \"None\" or \"ClientIP\"",
+ "default": "None"
+ },
+ "sessionAffinityConfig": {
+ "type": "object",
+ "description": "Additional settings for the sessionAffinity",
+ "default": {}
+ }
+ }
+ },
+ "pdb": {
+ "type": "object",
+ "properties": {
+ "create": {
+ "type": "boolean",
+ "description": "Enable/disable a Pod Disruption Budget creation for MariaDB secondary pods",
+ "default": true
+ },
+ "minAvailable": {
+ "type": "string",
+ "description": "Minimum number/percentage of MariaDB secondary pods that should remain scheduled",
+ "default": ""
+ },
+ "maxUnavailable": {
+ "type": "string",
+ "description": "Maximum number/percentage of MariaDB secondary pods that may be made unavailable. Defaults to `1` if both `secondary.pdb.minAvailable` and `secondary.pdb.maxUnavailable` are empty.",
+ "default": ""
+ }
+ }
+ },
+ "revisionHistoryLimit": {
+ "type": "number",
+ "description": "Maximum number of revisions that will be maintained in the StatefulSet",
+ "default": 10
+ }
+ }
+ },
+ "serviceAccount": {
+ "type": "object",
+ "properties": {
+ "create": {
+ "type": "boolean",
+ "description": "Enable the creation of a ServiceAccount for MariaDB pods",
+ "default": true
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the created ServiceAccount",
+ "default": ""
+ },
+ "annotations": {
+ "type": "object",
+ "description": "Annotations for MariaDB Service Account",
+ "default": {}
+ },
+ "automountServiceAccountToken": {
+ "type": "boolean",
+ "description": "Automount service account token for the server service account",
+ "default": false
+ }
+ }
+ },
+ "rbac": {
+ "type": "object",
+ "properties": {
+ "create": {
+ "type": "boolean",
+ "description": "Whether to create and use RBAC resources or not",
+ "default": false
+ }
+ }
+ },
+ "passwordUpdateJob": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable password update job",
+ "default": false
+ },
+ "backoffLimit": {
+ "type": "number",
+ "description": "set backoff limit of the job",
+ "default": 10
+ },
+ "command": {
+ "type": "array",
+ "description": "Override default container command on MariaDB Primary container(s) (useful when using custom images)",
+ "default": [],
+ "items": {}
+ },
+ "args": {
+ "type": "array",
+ "description": "Override default container args on MariaDB Primary container(s) (useful when using custom images)",
+ "default": [],
+ "items": {}
+ },
+ "extraCommands": {
+ "type": "string",
+ "description": "Extra commands to pass to the generation job",
+ "default": ""
+ },
+ "previousPasswords": {
+ "type": "object",
+ "properties": {
+ "rootPassword": {
+ "type": "string",
+ "description": "Previous root password (set if the password secret was already changed)",
+ "default": ""
+ },
+ "password": {
+ "type": "string",
+ "description": "Previous password (set if the password secret was already changed)",
+ "default": ""
+ },
+ "replicationPassword": {
+ "type": "string",
+ "description": "Previous replication password (set if the password secret was already changed)",
+ "default": ""
+ },
+ "existingSecret": {
+ "type": "string",
+ "description": "Name of a secret containing the previous passwords (set if the password secret was already changed)",
+ "default": ""
+ }
+ }
+ },
+ "containerSecurityContext": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enabled containers' Security Context",
+ "default": true
+ },
+ "runAsUser": {
+ "type": "number",
+ "description": "Set containers' Security Context runAsUser",
+ "default": 1001
+ },
+ "runAsGroup": {
+ "type": "number",
+ "description": "Set containers' Security Context runAsGroup",
+ "default": 1001
+ },
+ "runAsNonRoot": {
+ "type": "boolean",
+ "description": "Set container's Security Context runAsNonRoot",
+ "default": true
+ },
+ "privileged": {
+ "type": "boolean",
+ "description": "Set container's Security Context privileged",
+ "default": false
+ },
+ "readOnlyRootFilesystem": {
+ "type": "boolean",
+ "description": "Set container's Security Context readOnlyRootFilesystem",
+ "default": true
+ },
+ "allowPrivilegeEscalation": {
+ "type": "boolean",
+ "description": "Set container's Security Context allowPrivilegeEscalation",
+ "default": false
+ },
+ "capabilities": {
+ "type": "object",
+ "properties": {
+ "drop": {
+ "type": "array",
+ "description": "List of capabilities to be dropped",
+ "default": [
+ "ALL"
+ ],
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "seccompProfile": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Set container's Security Context seccomp profile",
+ "default": "RuntimeDefault"
+ }
+ }
+ }
+ }
+ },
+ "podSecurityContext": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enabled credential init job pods' Security Context",
+ "default": true
+ },
+ "fsGroupChangePolicy": {
+ "type": "string",
+ "description": "Set filesystem group change policy",
+ "default": "Always"
+ },
+ "sysctls": {
+ "type": "array",
+ "description": "Set kernel settings using the sysctl interface",
+ "default": [],
+ "items": {}
+ },
+ "supplementalGroups": {
+ "type": "array",
+ "description": "Set filesystem extra groups",
+ "default": [],
+ "items": {}
+ },
+ "fsGroup": {
+ "type": "number",
+ "description": "Set credential init job pod's Security Context fsGroup",
+ "default": 1001
+ }
+ }
+ },
+ "extraEnvVars": {
+ "type": "array",
+ "description": "Array containing extra env vars to configure the credential init job",
+ "default": [],
+ "items": {}
+ },
+ "extraEnvVarsCM": {
+ "type": "string",
+ "description": "ConfigMap containing extra env vars to configure the credential init job",
+ "default": ""
+ },
+ "extraEnvVarsSecret": {
+ "type": "string",
+ "description": "Secret containing extra env vars to configure the credential init job (in case of sensitive data)",
+ "default": ""
+ },
+ "extraVolumes": {
+ "type": "array",
+ "description": "Optionally specify extra list of additional volumes for the credential init job",
+ "default": [],
+ "items": {}
+ },
+ "extraVolumeMounts": {
+ "type": "array",
+ "description": "Array of extra volume mounts to be added to the jwt Container (evaluated as template). Normally used with `extraVolumes`.",
+ "default": [],
+ "items": {}
+ },
+ "initContainers": {
+ "type": "array",
+ "description": "Add additional init containers for the MariaDB Primary pod(s)",
+ "default": [],
+ "items": {}
+ },
+ "resourcesPreset": {
+ "type": "string",
+ "description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if passwordUpdateJob.resources is set (passwordUpdateJob.resources is recommended for production).",
+ "default": "micro"
+ },
+ "resources": {
+ "type": "object",
+ "description": "Set container requests and limits for different resources like CPU or memory (essential for production workloads)",
+ "default": {}
+ },
+ "customLivenessProbe": {
+ "type": "object",
+ "description": "Custom livenessProbe that overrides the default one",
+ "default": {}
+ },
+ "customReadinessProbe": {
+ "type": "object",
+ "description": "Custom readinessProbe that overrides the default one",
+ "default": {}
+ },
+ "customStartupProbe": {
+ "type": "object",
+ "description": "Custom startupProbe that overrides the default one",
+ "default": {}
+ },
+ "automountServiceAccountToken": {
+ "type": "boolean",
+ "description": "Mount Service Account token in pod",
+ "default": false
+ },
+ "hostAliases": {
+ "type": "array",
+ "description": "Add deployment host aliases",
+ "default": [],
+ "items": {}
+ },
+ "podLabels": {
+ "type": "object",
+ "description": "Additional pod labels",
+ "default": {}
+ },
+ "podAnnotations": {
+ "type": "object",
+ "description": "Additional pod annotations",
+ "default": {}
+ }
+ }
+ },
+ "volumePermissions": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable init container that changes the owner and group of the persistent volume(s) mountpoint to `runAsUser:fsGroup`",
+ "default": false
+ },
+ "image": {
+ "type": "object",
+ "properties": {
+ "registry": {
+ "type": "string",
+ "description": "Init container volume-permissions image registry",
+ "default": "REGISTRY_NAME"
+ },
+ "repository": {
+ "type": "string",
+ "description": "Init container volume-permissions image repository",
+ "default": "REPOSITORY_NAME/os-shell"
+ },
+ "digest": {
+ "type": "string",
+ "description": "Init container volume-permissions image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag",
+ "default": ""
+ },
+ "pullPolicy": {
+ "type": "string",
+ "description": "Init container volume-permissions image pull policy",
+ "default": "IfNotPresent"
+ },
+ "pullSecrets": {
+ "type": "array",
+ "description": "Specify docker-registry secret names as an array",
+ "default": [],
+ "items": {}
+ }
+ }
+ },
+ "resourcesPreset": {
+ "type": "string",
+ "description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if volumePermissions.resources is set (volumePermissions.resources is recommended for production).",
+ "default": "nano"
+ },
+ "resources": {
+ "type": "object",
+ "description": "Set container requests and limits for different resources like CPU or memory (essential for production workloads)",
+ "default": {}
+ }
+ }
+ },
+ "metrics": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Start a side-car prometheus exporter",
+ "default": false
+ },
+ "image": {
+ "type": "object",
+ "properties": {
+ "registry": {
+ "type": "string",
+ "description": "Exporter image registry",
+ "default": "REGISTRY_NAME"
+ },
+ "repository": {
+ "type": "string",
+ "description": "Exporter image repository",
+ "default": "REPOSITORY_NAME/mysqld-exporter"
+ },
+ "digest": {
+ "type": "string",
+ "description": "Exporter image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag",
+ "default": ""
+ },
+ "pullPolicy": {
+ "type": "string",
+ "description": "Exporter image pull policy",
+ "default": "IfNotPresent"
+ },
+ "pullSecrets": {
+ "type": "array",
+ "description": "Specify docker-registry secret names as an array",
+ "default": [],
+ "items": {}
+ }
+ }
+ },
+ "containerPorts": {
+ "type": "object",
+ "properties": {
+ "http": {
+ "type": "number",
+ "description": "Container port for http",
+ "default": 9104
+ }
+ }
+ },
+ "containerSecurityContext": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable security context for MariaDB metrics container",
+ "default": false
+ },
+ "runAsUser": {
+ "type": "number",
+ "description": "User ID for the MariaDB metrics container",
+ "default": 1001
+ },
+ "runAsGroup": {
+ "type": "number",
+ "description": "Group ID for the MariaDB metrics container",
+ "default": 1001
+ },
+ "runAsNonRoot": {
+ "type": "boolean",
+ "description": "Set metrics container's Security Context runAsNonRoot",
+ "default": true
+ },
+ "privileged": {
+ "type": "boolean",
+ "description": "Set metrics container's Security Context privileged",
+ "default": false
+ },
+ "allowPrivilegeEscalation": {
+ "type": "boolean",
+ "description": "Set metrics container's Security Context allowPrivilegeEscalation",
+ "default": false
+ },
+ "readOnlyRootFilesystem": {
+ "type": "boolean",
+ "description": "Set container's Security Context readOnlyRootFilesystem",
+ "default": true
+ },
+ "capabilities": {
+ "type": "object",
+ "properties": {
+ "drop": {
+ "type": "array",
+ "description": "List of capabilities to be dropped",
+ "default": [
+ "ALL"
+ ],
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "seccompProfile": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Set container's Security Context seccomp profile",
+ "default": "RuntimeDefault"
+ }
+ }
+ }
+ }
+ },
+ "resourcesPreset": {
+ "type": "string",
+ "description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if metrics.resources is set (metrics.resources is recommended for production).",
+ "default": "nano"
+ },
+ "resources": {
+ "type": "object",
+ "description": "Set container requests and limits for different resources like CPU or memory (essential for production workloads)",
+ "default": {}
+ },
+ "livenessProbe": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable livenessProbe",
+ "default": true
+ },
+ "initialDelaySeconds": {
+ "type": "number",
+ "description": "Initial delay seconds for livenessProbe",
+ "default": 120
+ },
+ "periodSeconds": {
+ "type": "number",
+ "description": "Period seconds for livenessProbe",
+ "default": 10
+ },
+ "timeoutSeconds": {
+ "type": "number",
+ "description": "Timeout seconds for livenessProbe",
+ "default": 1
+ },
+ "failureThreshold": {
+ "type": "number",
+ "description": "Failure threshold for livenessProbe",
+ "default": 3
+ },
+ "successThreshold": {
+ "type": "number",
+ "description": "Success threshold for livenessProbe",
+ "default": 1
+ }
+ }
+ },
+ "readinessProbe": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable readinessProbe",
+ "default": true
+ },
+ "initialDelaySeconds": {
+ "type": "number",
+ "description": "Initial delay seconds for readinessProbe",
+ "default": 30
+ },
+ "periodSeconds": {
+ "type": "number",
+ "description": "Period seconds for readinessProbe",
+ "default": 10
+ },
+ "timeoutSeconds": {
+ "type": "number",
+ "description": "Timeout seconds for readinessProbe",
+ "default": 1
+ },
+ "failureThreshold": {
+ "type": "number",
+ "description": "Failure threshold for readinessProbe",
+ "default": 3
+ },
+ "successThreshold": {
+ "type": "number",
+ "description": "Success threshold for readinessProbe",
+ "default": 1
+ }
+ }
+ },
+ "serviceMonitor": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Create ServiceMonitor Resource for scraping metrics using PrometheusOperator",
+ "default": false
+ },
+ "namespace": {
+ "type": "string",
+ "description": "Namespace which Prometheus is running in",
+ "default": ""
+ },
+ "jobLabel": {
+ "type": "string",
+ "description": "The name of the label on the target service to use as the job name in prometheus.",
+ "default": ""
+ },
+ "interval": {
+ "type": "string",
+ "description": "Interval at which metrics should be scraped",
+ "default": "30s"
+ },
+ "scrapeTimeout": {
+ "type": "string",
+ "description": "Specify the timeout after which the scrape is ended",
+ "default": ""
+ },
+ "relabelings": {
+ "type": "array",
+ "description": "RelabelConfigs to apply to samples before scraping",
+ "default": [],
+ "items": {}
+ },
+ "metricRelabelings": {
+ "type": "array",
+ "description": "MetricRelabelConfigs to apply to samples before ingestion",
+ "default": [],
+ "items": {}
+ },
+ "honorLabels": {
+ "type": "boolean",
+ "description": "honorLabels chooses the metric's labels on collisions with target labels",
+ "default": false
+ },
+ "selector": {
+ "type": "object",
+ "description": "ServiceMonitor selector labels",
+ "default": {}
+ },
+ "labels": {
+ "type": "object",
+ "description": "Extra labels for the ServiceMonitor",
+ "default": {}
+ }
+ }
+ },
+ "prometheusRule": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "if `true`, creates a Prometheus Operator PrometheusRule (also requires `metrics.enabled` to be `true` and `metrics.prometheusRule.rules`)",
+ "default": false
+ },
+ "namespace": {
+ "type": "string",
+ "description": "Namespace for the PrometheusRule Resource (defaults to the Release Namespace)",
+ "default": ""
+ },
+ "additionalLabels": {
+ "type": "object",
+ "description": "Additional labels that can be used so PrometheusRule will be discovered by Prometheus",
+ "default": {}
+ },
+ "rules": {
+ "type": "array",
+ "description": "Prometheus Rule definitions",
+ "default": [],
+ "items": {}
+ }
+ }
+ }
+ }
+ },
+ "networkPolicy": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable creation of NetworkPolicy resources",
+ "default": true
+ },
+ "allowExternal": {
+ "type": "boolean",
+ "description": "The Policy model to apply",
+ "default": true
+ },
+ "allowExternalEgress": {
+ "type": "boolean",
+ "description": "Allow the pod to access any range of port and all destinations.",
+ "default": true
+ },
+ "extraIngress": {
+ "type": "array",
+ "description": "Add extra ingress rules to the NetworkPolicy",
+ "default": "[]",
+ "items": {
+ "type": "string"
+ }
+ },
+ "extraEgress": {
+ "type": "array",
+ "description": "Add extra ingress rules to the NetworkPolicy",
+ "default": "[]",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/charts/semaphore/charts/mariadb/values.yaml b/charts/semaphore/charts/mariadb/values.yaml
new file mode 100644
index 0000000..3269b29
--- /dev/null
+++ b/charts/semaphore/charts/mariadb/values.yaml
@@ -0,0 +1,1673 @@
+# Copyright Broadcom, Inc. All Rights Reserved.
+# SPDX-License-Identifier: APACHE-2.0
+
+## @section Global parameters
+## Global Docker image parameters
+## Please, note that this will override the image parameters, including dependencies, configured to use the global value
+## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass
+##
+
+## @param global.imageRegistry Global Docker Image registry
+## @param global.imagePullSecrets Global Docker registry secret names as an array
+## @param global.defaultStorageClass Global default StorageClass for Persistent Volume(s)
+## @param global.defaultFips Default value for the FIPS configuration (allowed values: '', restricted, relaxed, off). Can be overriden by the 'fips' object
+##
+global:
+ imageRegistry: ""
+ ## E.g.
+ ## imagePullSecrets:
+ ## - myRegistryKeySecretName
+ ##
+ imagePullSecrets: []
+ defaultStorageClass: ""
+ ## Security parameters
+ ##
+ security:
+ ## @param global.security.allowInsecureImages Allows skipping image verification
+ allowInsecureImages: false
+ ## Compatibility adaptations for Kubernetes platforms
+ ##
+ compatibility:
+ ## Compatibility adaptations for Openshift
+ ##
+ openshift:
+ ## @param global.compatibility.openshift.adaptSecurityContext Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation)
+ ##
+ adaptSecurityContext: auto
+ ## Configure FIPS mode: '', 'restricted', 'relaxed', 'off'
+ ##
+ defaultFips: restricted
+## @section Common parameters
+##
+
+## @param kubeVersion Force target Kubernetes version (using Helm capabilities if not set)
+##
+kubeVersion: ""
+## @param nameOverride String to partially override mariadb.fullname
+##
+nameOverride: ""
+## @param fullnameOverride String to fully override mariadb.fullname
+##
+fullnameOverride: ""
+## @param clusterDomain Default Kubernetes cluster domain
+##
+clusterDomain: cluster.local
+## @param commonAnnotations Common annotations to add to all MariaDB resources (sub-charts are not considered)
+##
+commonAnnotations: {}
+## @param commonLabels Common labels to add to all MariaDB resources (sub-charts are not considered)
+##
+commonLabels: {}
+## @param schedulerName Name of the scheduler (other than default) to dispatch pods
+## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
+##
+schedulerName: ""
+## @param runtimeClassName Name of the Runtime Class for all MariaDB pods
+## ref: https://kubernetes.io/docs/concepts/containers/runtime-class/
+##
+runtimeClassName: ""
+## @param extraDeploy Array of extra objects to deploy with the release (evaluated as a template)
+##
+extraDeploy: []
+## Enable diagnostic mode in the deployment
+##
+diagnosticMode:
+ ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
+ ##
+ enabled: false
+ ## @param diagnosticMode.command Command to override all containers in the deployment
+ ##
+ command:
+ - sleep
+ ## @param diagnosticMode.args Args to override all containers in the deployment
+ ##
+ args:
+ - infinity
+## @param serviceBindings.enabled Create secret for service binding (Experimental)
+## Ref: https://servicebinding.io/service-provider/
+##
+serviceBindings:
+ enabled: false
+## @section MariaDB common parameters
+##
+
+## Bitnami MariaDB image
+## ref: https://hub.docker.com/r/bitnami/mariadb/tags/
+## @param image.registry [default: REGISTRY_NAME] MariaDB image registry
+## @param image.repository [default: REPOSITORY_NAME/mariadb] MariaDB image repository
+## @skip image.tag MariaDB image tag (immutable tags are recommended)
+## @param image.digest MariaDB image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
+## @param image.pullPolicy MariaDB image pull policy
+## @param image.pullSecrets Specify docker-registry secret names as an array
+## @param image.debug Specify if debug logs should be enabled
+##
+image:
+ registry: registry-1.docker.io
+ repository: bitnami/mariadb
+ tag: latest
+ digest: ""
+ ## Specify a imagePullPolicy
+ ## ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images
+ ##
+ pullPolicy: IfNotPresent
+ ## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
+ ## Example:
+ ## pullSecrets:
+ ## - myRegistryKeySecretName
+ ##
+ pullSecrets: []
+ ## Set to true if you would like to see extra information on logs
+ ## It turns BASH and/or NAMI debugging in the image
+ ##
+ debug: false
+## @param architecture MariaDB architecture (`standalone` or `replication`)
+##
+architecture: standalone
+## MariaDB Authentication parameters
+##
+auth:
+ ## @param auth.rootPassword Password for the `root` user. Ignored if existing secret is provided.
+ ## ref: https://github.com/bitnami/containers/tree/main/bitnami/mariadb#setting-the-root-password-on-first-run
+ ##
+ rootPassword: ""
+ ## @param auth.database Name for a custom database to create
+ ## ref: https://github.com/bitnami/containers/blob/main/bitnami/mariadb/README.md#creating-a-database-on-first-run
+ ##
+ database: my_database
+ ## @param auth.username Name for a custom user to create
+ ## ref: https://github.com/bitnami/containers/blob/main/bitnami/mariadb/README.md#creating-a-database-user-on-first-run
+ ##
+ username: ""
+ ## @param auth.password Password for the new user. Ignored if existing secret is provided
+ ##
+ password: ""
+ ## @param auth.replicationUser MariaDB replication user
+ ## ref: https://github.com/bitnami/containers/tree/main/bitnami/mariadb#setting-up-a-replication-cluster
+ ##
+ replicationUser: replicator
+ ## @param auth.replicationPassword MariaDB replication user password. Ignored if existing secret is provided
+ ## ref: https://github.com/bitnami/containers/tree/main/bitnami/mariadb#setting-up-a-replication-cluster
+ ##
+ replicationPassword: ""
+ ## @param auth.existingSecret Use existing secret for password details (`auth.rootPassword`, `auth.password`, `auth.replicationPassword` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`
+ ##
+ existingSecret: ""
+ ## @param auth.forcePassword Force users to specify required passwords
+ ##
+ forcePassword: false
+ ## @param auth.usePasswordFiles Mount credentials as files instead of using environment variables
+ ##
+ usePasswordFiles: true
+ ## @param auth.customPasswordFiles Use custom password files when `auth.usePasswordFiles` is set to `true`. Define path for keys `root` and `user`, also define `replicator` if `architecture` is set to `replication`
+ ## Example:
+ ## customPasswordFiles:
+ ## root: /vault/secrets/mariadb-root
+ ## user: /vault/secrets/mariadb-user
+ ## replicator: /vault/secrets/mariadb-replicator
+ ##
+ customPasswordFiles: {}
+## @param initdbScripts Dictionary of initdb scripts
+## Specify dictionary of scripts to be run at first boot
+## Example:
+## initdbScripts:
+## my_init_script.sh: |
+## #!/bin/bash
+## echo "Do something."
+##
+initdbScripts: {}
+## @param initdbScriptsConfigMap ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`)
+##
+initdbScriptsConfigMap: ""
+
+## @section TLS/SSL parameters
+##
+## @param tls.enabled Enable TLS in MariaDB
+## @param tls.existingSecret Existing secret that contains TLS certificates
+## @param tls.certFilename The secret key from the existingSecret if 'cert' key different from the default (tls.crt)
+## @param tls.certKeyFilename The secret key from the existingSecret if 'key' key different from the default (tls.key)
+## @param tls.certCAFilename The secret key from the existingSecret if 'ca' key different from the default (tls.crt)
+## @param tls.ca CA certificate for TLS. Ignored if `tls.existingSecret` is set
+## @param tls.cert TLS certificate for MariaDB. Ignored if `tls.existingSecret` is set
+## @param tls.key TLS key for MariaDB. Ignored if `tls.existingSecret` is set
+## @param tls.autoGenerated.enabled Enable automatic generation of TLS certificates
+## @param tls.autoGenerated.engine Mechanism to generate the certificates (allowed values: helm, cert-manager)
+## @param tls.autoGenerated.extraSANs Extra Subject Alternative Names (SANs) for generated certificates
+## @param tls.autoGenerated.loopback Add loopback SANs (localhost and 127.0.0.1) to generated certificates
+## @param tls.autoGenerated.certManager.existingIssuer The name of an existing Issuer to use for generating the certificates (only for `cert-manager` engine)
+## @param tls.autoGenerated.certManager.existingIssuerKind Existing Issuer kind, defaults to Issuer (only for `cert-manager` engine)
+## @param tls.autoGenerated.certManager.keyAlgorithm Key algorithm for the certificates (only for `cert-manager` engine)
+## @param tls.autoGenerated.certManager.keySize Key size for the certificates (only for `cert-manager` engine)
+## @param tls.autoGenerated.certManager.duration Duration for the certificates (only for `cert-manager` engine)
+## @param tls.autoGenerated.certManager.renewBefore Renewal period for the certificates (only for `cert-manager` engine)
+##
+tls:
+ enabled: false
+ existingSecret: ""
+ certFilename: tls.crt
+ certKeyFilename: tls.key
+ certCAFilename: ""
+ ca: ""
+ cert: ""
+ key: ""
+ autoGenerated:
+ enabled: true
+ engine: helm
+ extraSANs: []
+ loopback: false
+ certManager:
+ existingIssuer: ""
+ existingIssuerKind: ""
+ keySize: 2048
+ keyAlgorithm: RSA
+ duration: 2160h
+ renewBefore: 360h
+
+## @section Transparent Data Encryption parameters
+## ref: https://mariadb.com/kb/en/file-key-management-encryption-plugin/
+##
+## @param tde.enabled Enable Transparent Data Encryption using the File Key Management Encryption Plugin for MariaDB
+## @param tde.existingSecret Existing secret that contains Transparent Data Encryption key files used when secretsStoreProvider is not enabled
+## @param tde.randomKeyFilename File name of the 'random keyfile' when it is different from the default (keyfile.key), is also used for key name in the existingSecret
+## @param tde.encryptedKeyFilename File name of the 'encrypted keyfile' when it is different from the default (keyfile.enc), is also used for key name in the existingSecret
+## @param tde.fileKeyManagementEncryptionAlgorithm Encryption algorithm used for encrypting data (allowed values: AES_CTR, AES_CBC | default: AES_CTR)
+## @param tde.innodbEncryptTables Enables automatic encryption of all InnoDB tablespaces (allowed values: FORCE, ON, OFF | default: FORCE)
+## @param tde.innodbEncryptLog Enables encryption of the InnoDB redo log (allowed values: ON, OFF | default: ON)
+## @param tde.innodbEncryptTemporaryTables Enables automatic encryption of the InnoDB temporary tablespace (allowed values: ON, OFF | default: ON)
+## @param tde.innodbEncryptionThreads Number of threads to use for encryption (default: 4)
+## @param tde.encryptTmpDiskTables Enables automatic encryption of all internal on-disk temporary tables that are created during query execution (allowed values: ON, OFF | default: ON)
+## @param tde.encryptTmpTiles Enables automatic encryption of temporary files, such as those created for filesort operations, binary log file caches, etc. (allowed values: ON, OFF | default: ON)
+## @param tde.encryptBINLOG Enables encrypting binary logs including relay logs (allowed values: ON, OFF | default: ON)
+## @param tde.ariaEncryptTables Enables automatic encryption of all Aria tablespaces (allowed values: ON, OFF | default: ON)
+##
+tde:
+ enabled: false
+ existingSecret: ""
+ randomKeyFilename: keyfile.key
+ encryptedKeyFilename: keyfile.enc
+ fileKeyManagementEncryptionAlgorithm: AES_CTR
+ innodbEncryptTables: FORCE
+ innodbEncryptLog: "ON"
+ innodbEncryptTemporaryTables: "ON"
+ encryptTmpDiskTables: "ON"
+ encryptTmpTiles: "ON"
+ encryptBINLOG: "ON"
+ ariaEncryptTables: "ON"
+ innodbEncryptionThreads: 4
+ ## @param tde.secretsStoreProvider.enabled Enable use of secrets store provider for Transparent Data Encryption key files
+ ## @param tde.secretsStoreProvider.provider Type of provider used in secrets store provider class (allowed values: vault)
+ secretsStoreProvider:
+ enabled: false
+ provider: vault
+ ## @param tde.secretsStoreProvider.vault.roleName The name of the HashiCorp Vault role used for accessing the key files (only for `vault` provider)
+ ## @param tde.secretsStoreProvider.vault.address The URL of the HashiCorp Vault server (only for `vault` provider)
+ ## @param tde.secretsStoreProvider.vault.authMountPath The HashiCorp Vault auth mount path (only for `vault` provider)
+ ## @param tde.secretsStoreProvider.vault.randomKeySecretPath The HashiCorp Vault secret path for the 'random keyfile' (only for `vault` provider)
+ ## @param tde.secretsStoreProvider.vault.randomKeySecretKey The HashiCorp Vault secret key for the 'random keyfile' (only for `vault` provider)
+ ## @param tde.secretsStoreProvider.vault.encryptedKeySecretPath The HashiCorp Vault secret path for the 'encrypted keyfile' (only for `vault` provider)
+ ## @param tde.secretsStoreProvider.vault.encryptedKeySecretKey The HashiCorp Vault secret key for the 'encrypted keyfile' (only for `vault` provider)
+ vault:
+ roleName: ""
+ address: ""
+ authMountPath: ""
+ randomKeySecretPath: ""
+ randomKeySecretKey: ""
+ encryptedKeySecretPath: ""
+ encryptedKeySecretKey: ""
+
+## @section MariaDB Primary parameters
+##
+
+## Mariadb Primary parameters
+##
+primary:
+ ## @param primary.name Name of the primary database (eg primary, master, leader, ...)
+ ##
+ name: primary
+ ## @param primary.command Override default container command on MariaDB Primary container(s) (useful when using custom images)
+ ##
+ command: []
+ ## @param primary.args Override default container args on MariaDB Primary container(s) (useful when using custom images)
+ ##
+ args: []
+ ## @param primary.lifecycleHooks for the MariaDB Primary container(s) to automate configuration before or after startup
+ ##
+ lifecycleHooks: {}
+ ## @param primary.automountServiceAccountToken Mount Service Account token in pod
+ ##
+ automountServiceAccountToken: false
+ ## @param primary.hostAliases Add deployment host aliases
+ ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
+ ##
+ hostAliases: []
+ ## @param primary.containerPorts.mysql Container port for mysql
+ ##
+ containerPorts:
+ mysql: 3306
+ ## @param primary.configuration [string] MariaDB Primary configuration to be injected as ConfigMap
+ ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file
+ ##
+ configuration: |-
+ [mysqld]
+ skip-name-resolve
+ explicit_defaults_for_timestamp
+ basedir=/opt/bitnami/mariadb
+ datadir=/bitnami/mariadb/data
+ plugin_dir=/opt/bitnami/mariadb/plugin
+ port={{ .Values.primary.containerPorts.mysql }}
+ socket=/opt/bitnami/mariadb/tmp/mysql.sock
+ tmpdir=/opt/bitnami/mariadb/tmp
+ max_allowed_packet=16M
+ bind-address=*
+ pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
+ log-error=/opt/bitnami/mariadb/logs/mysqld.log
+ character-set-server=UTF8
+ collation-server=utf8_general_ci
+ slow_query_log=0
+ long_query_time=10.0
+ binlog_expire_logs_seconds=2592000
+ {{- if .Values.tls.enabled }}
+ ssl_cert=/opt/bitnami/mariadb/certs/tls.crt
+ ssl_key=/opt/bitnami/mariadb/certs/tls.key
+ {{- if or .Values.tls.autoGenerated.enabled .Values.tls.ca .Values.tls.existingSecret }}
+ ssl_ca=/opt/bitnami/mariadb/certs/ca.crt
+ {{- end }}
+ {{- end }}
+ {{- if .Values.tde.enabled }}
+ plugin_load_add=file_key_management
+ file_key_management_filename=/opt/bitnami/mariadb/tde/{{ .Values.tde.encryptedKeyFilename }}
+ file_key_management_filekey=FILE:/opt/bitnami/mariadb/tde/{{ .Values.tde.randomKeyFilename }}
+ file_key_management_encryption_algorithm={{ .Values.tde.fileKeyManagementEncryptionAlgorithm }}
+ innodb_encrypt_tables={{ .Values.tde.innodbEncryptTables }}
+ innodb_encrypt_log={{ .Values.tde.innodbEncryptLog }}
+ innodb_encrypt_temporary_tables={{ .Values.tde.innodbEncryptTemporaryTables }}
+ innodb_encryption_threads={{ .Values.tde.innodbEncryptionThreads }}
+ encrypt_tmp_disk_tables={{ .Values.tde.encryptTmpDiskTables }}
+ encrypt_tmp_files={{ .Values.tde.encryptTmpTiles }}
+ encrypt_binlog={{ .Values.tde.encryptBINLOG }}
+ aria_encrypt_tables={{ .Values.tde.ariaEncryptTables }}
+ {{- end }}
+
+ [client]
+ port=3306
+ socket=/opt/bitnami/mariadb/tmp/mysql.sock
+ default-character-set=UTF8
+ plugin_dir=/opt/bitnami/mariadb/plugin
+
+ [manager]
+ port=3306
+ socket=/opt/bitnami/mariadb/tmp/mysql.sock
+ pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
+ ## @param primary.existingConfigmap Name of existing ConfigMap with MariaDB Primary configuration.
+ ## NOTE: When it's set the 'configuration' parameter is ignored
+ ##
+ existingConfigmap: ""
+ ## @param primary.updateStrategy.type MariaDB primary statefulset strategy type
+ ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
+ ##
+ updateStrategy:
+ ## StrategyType
+ ## Can be set to RollingUpdate or OnDelete
+ ##
+ type: RollingUpdate
+ ## @param primary.rollingUpdatePartition Partition update strategy for Mariadb Primary statefulset
+ ## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions
+ ##
+ rollingUpdatePartition: ""
+ ## @param primary.podAnnotations Additional pod annotations for MariaDB primary pods
+ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ ##
+ podAnnotations: {}
+ ## @param primary.podLabels Extra labels for MariaDB primary pods
+ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
+ ##
+ podLabels: {}
+ ## @param primary.podAffinityPreset MariaDB primary pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
+ ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
+ ##
+ podAffinityPreset: ""
+ ## @param primary.podAntiAffinityPreset MariaDB primary pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
+ ## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
+ ##
+ podAntiAffinityPreset: soft
+ ## Mariadb Primary node affinity preset
+ ## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
+ ##
+ nodeAffinityPreset:
+ ## @param primary.nodeAffinityPreset.type MariaDB primary node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
+ ##
+ type: ""
+ ## @param primary.nodeAffinityPreset.key MariaDB primary node label key to match Ignored if `primary.affinity` is set.
+ ## E.g.
+ ## key: "kubernetes.io/e2e-az-name"
+ ##
+ key: ""
+ ## @param primary.nodeAffinityPreset.values MariaDB primary node label values to match. Ignored if `primary.affinity` is set.
+ ## E.g.
+ ## values:
+ ## - e2e-az1
+ ## - e2e-az2
+ ##
+ values: []
+ ## @param primary.affinity Affinity for MariaDB primary pods assignment
+ ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
+ ## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set
+ ##
+ affinity: {}
+ ## @param primary.nodeSelector Node labels for MariaDB primary pods assignment
+ ## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
+ ##
+ nodeSelector: {}
+ ## @param primary.tolerations Tolerations for MariaDB primary pods assignment
+ ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+ ##
+ tolerations: []
+ ## @param primary.schedulerName Name of the k8s scheduler (other than default)
+ ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
+ ##
+ schedulerName: ""
+ ## @param primary.terminationGracePeriodSeconds In seconds, time the given to the MySQL primary pod needs to terminate gracefully
+ ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
+ ##
+ terminationGracePeriodSeconds: ""
+ ## @param primary.podManagementPolicy podManagementPolicy to manage scaling operation of MariaDB primary pods
+ ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
+ ##
+ podManagementPolicy: ""
+ ## @param primary.topologySpreadConstraints Topology Spread Constraints for MariaDB primary pods assignment
+ ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
+ ## E.g.
+ ## topologySpreadConstraints:
+ ## - maxSkew: 1
+ ## topologyKey: topology.kubernetes.io/zone
+ ## whenUnsatisfiable: DoNotSchedule
+ ##
+ topologySpreadConstraints: []
+ ## @param primary.priorityClassName Priority class for MariaDB primary pods assignment
+ ## Ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
+ ##
+ priorityClassName: ""
+ ## @param primary.runtimeClassName Runtime Class for MariaDB primary pods
+ ## Ref: https://kubernetes.io/docs/concepts/containers/runtime-class/
+ ##
+ runtimeClassName: ""
+ ## MariaDB primary Pod security context
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
+ ## @param primary.podSecurityContext.enabled Enable security context for MariaDB primary pods
+ ## @param primary.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
+ ## @param primary.podSecurityContext.sysctls Set kernel settings using the sysctl interface
+ ## @param primary.podSecurityContext.supplementalGroups Set filesystem extra groups
+ ## @param primary.podSecurityContext.fsGroup Group ID for the mounted volumes' filesystem
+ ##
+ podSecurityContext:
+ enabled: true
+ fsGroupChangePolicy: Always
+ sysctls: []
+ supplementalGroups: []
+ fsGroup: 1001
+ ## MariaDB primary container security context
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
+ ## @param primary.containerSecurityContext.enabled MariaDB primary container securityContext
+ ## @param primary.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
+ ## @param primary.containerSecurityContext.runAsUser User ID for the MariaDB primary container
+ ## @param primary.containerSecurityContext.runAsGroup Group ID for the MariaDB primary container
+ ## @param primary.containerSecurityContext.runAsNonRoot Set primary container's Security Context runAsNonRoot
+ ## @param primary.containerSecurityContext.privileged Set primary container's Security Context privileged
+ ## @param primary.containerSecurityContext.allowPrivilegeEscalation Set primary container's Security Context allowPrivilegeEscalation
+ ## @param primary.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
+ ## @param primary.containerSecurityContext.capabilities.drop List of capabilities to be dropped
+ ## @param primary.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
+ ##
+ containerSecurityContext:
+ enabled: true
+ seLinuxOptions: {}
+ runAsUser: 1001
+ runAsGroup: 1001
+ runAsNonRoot: true
+ privileged: false
+ allowPrivilegeEscalation: false
+ readOnlyRootFilesystem: true
+ capabilities:
+ drop: ["ALL"]
+ seccompProfile:
+ type: "RuntimeDefault"
+ ## MariaDB primary container's resource requests and limits
+ ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ ## We usually recommend not to specify default resources and to leave this as a conscious
+ ## choice for the user. This also increases chances charts run on environments with little
+ ## resources, such as Minikube. If you do want to specify resources, uncomment the following
+ ## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+ ## @param primary.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if primary.resources is set (primary.resources is recommended for production).
+ ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
+ ##
+ resourcesPreset: "small"
+ ## @param primary.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
+ ## Example:
+ ## resources:
+ ## requests:
+ ## cpu: 2
+ ## memory: 512Mi
+ ## limits:
+ ## cpu: 3
+ ## memory: 1024Mi
+ ##
+ resources: {}
+ ## @param primary.fips.openssl Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used
+ ##
+ fips:
+ openssl: ""
+ ## Configure extra options for MariaDB primary containers' liveness, readiness and startup probes
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
+ ## @param primary.startupProbe.enabled Enable startupProbe
+ ## @param primary.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
+ ## @param primary.startupProbe.periodSeconds Period seconds for startupProbe
+ ## @param primary.startupProbe.timeoutSeconds Timeout seconds for startupProbe
+ ## @param primary.startupProbe.failureThreshold Failure threshold for startupProbe
+ ## @param primary.startupProbe.successThreshold Success threshold for startupProbe
+ ##
+ startupProbe:
+ enabled: false
+ initialDelaySeconds: 120
+ periodSeconds: 15
+ timeoutSeconds: 5
+ failureThreshold: 10
+ successThreshold: 1
+ ## Configure extra options for liveness probe
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
+ ## @param primary.livenessProbe.enabled Enable livenessProbe
+ ## @param primary.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
+ ## @param primary.livenessProbe.periodSeconds Period seconds for livenessProbe
+ ## @param primary.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
+ ## @param primary.livenessProbe.failureThreshold Failure threshold for livenessProbe
+ ## @param primary.livenessProbe.successThreshold Success threshold for livenessProbe
+ ##
+ livenessProbe:
+ enabled: true
+ initialDelaySeconds: 120
+ periodSeconds: 10
+ timeoutSeconds: 1
+ failureThreshold: 3
+ successThreshold: 1
+ ## @param primary.readinessProbe.enabled Enable readinessProbe
+ ## @param primary.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
+ ## @param primary.readinessProbe.periodSeconds Period seconds for readinessProbe
+ ## @param primary.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
+ ## @param primary.readinessProbe.failureThreshold Failure threshold for readinessProbe
+ ## @param primary.readinessProbe.successThreshold Success threshold for readinessProbe
+ ##
+ readinessProbe:
+ enabled: true
+ initialDelaySeconds: 30
+ periodSeconds: 10
+ timeoutSeconds: 1
+ failureThreshold: 3
+ successThreshold: 1
+ ## @param primary.customStartupProbe Override default startup probe for MariaDB primary containers
+ ##
+ customStartupProbe: {}
+ ## @param primary.customLivenessProbe Override default liveness probe for MariaDB primary containers
+ ##
+ customLivenessProbe: {}
+ ## @param primary.customReadinessProbe Override default readiness probe for MariaDB primary containers
+ ##
+ customReadinessProbe: {}
+ ## @param primary.startupWaitOptions Override default builtin startup wait check options for MariaDB primary containers
+ ## `bitnami/mariadb` Docker image has built-in startup check mechanism,
+ ## which periodically checks if MariaDB service has started up and stops it
+ ## if all checks have failed after X tries. Use these to control these checks.
+ ## ref: https://github.com/bitnami/containers/tree/main/bitnami/mariadb/pull/240
+ ## Example (with default options):
+ ## startupWaitOptions:
+ ## retries: 300
+ ## waitTime: 2
+ ##
+ startupWaitOptions: {}
+ ## @param primary.extraFlags MariaDB primary additional command line flags
+ ## Can be used to specify command line flags, for example:
+ ## E.g.
+ ## extraFlags: "--max-connect-errors=1000 --max_connections=155"
+ ##
+ extraFlags: ""
+ ## @param primary.extraEnvVars Extra environment variables to be set on MariaDB primary containers
+ ## E.g.
+ ## extraEnvVars:
+ ## - name: TZ
+ ## value: "Europe/Paris"
+ ##
+ extraEnvVars: []
+ ## @param primary.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for MariaDB primary containers
+ ##
+ extraEnvVarsCM: ""
+ ## @param primary.extraEnvVarsSecret Name of existing Secret containing extra env vars for MariaDB primary containers
+ ##
+ extraEnvVarsSecret: ""
+ ## Enable persistence using Persistent Volume Claims
+ ## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
+ ##
+ persistence:
+ ## @param primary.persistence.enabled Enable persistence on MariaDB primary replicas using a `PersistentVolumeClaim`. If false, use emptyDir
+ ##
+ enabled: true
+ ## @param primary.persistence.existingClaim Name of an existing `PersistentVolumeClaim` for MariaDB primary replicas
+ ## NOTE: When it's set the rest of persistence parameters are ignored
+ ##
+ existingClaim: ""
+ ## @param primary.persistence.subPath Subdirectory of the volume to mount at
+ ##
+ subPath: ""
+ ## @param primary.persistence.storageClass MariaDB primary persistent volume storage Class
+ ## If defined, storageClassName:
+ ## If set to "-", storageClassName: "", which disables dynamic provisioning
+ ## If undefined (the default) or set to null, no storageClassName spec is
+ ## set, choosing the default provisioner. (gp2 on AWS, standard on
+ ## GKE, AWS & OpenStack)
+ ##
+ storageClass: ""
+ ## @param primary.persistence.labels Labels for the PVC
+ ##
+ labels: {}
+ ## @param primary.persistence.annotations MariaDB primary persistent volume claim annotations
+ ##
+ annotations: {}
+ ## @param primary.persistence.accessModes MariaDB primary persistent volume access Modes
+ ##
+ accessModes:
+ - ReadWriteOnce
+ ## @param primary.persistence.size MariaDB primary persistent volume size
+ ##
+ size: 8Gi
+ ## @param primary.persistence.selector Selector to match an existing Persistent Volume
+ ## selector:
+ ## matchLabels:
+ ## app: my-app
+ ##
+ selector: {}
+ ## @param primary.extraVolumes Optionally specify extra list of additional volumes to the MariaDB Primary pod(s)
+ ##
+ extraVolumes: []
+ ## @param primary.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the MariaDB Primary container(s)
+ ##
+ extraVolumeMounts: []
+ ## @param primary.initContainers Add additional init containers for the MariaDB Primary pod(s)
+ ##
+ initContainers: []
+ ## @param primary.sidecars Add additional sidecar containers for the MariaDB Primary pod(s)
+ ##
+ sidecars: []
+ ## MariaDB Primary Service parameters
+ ##
+ service:
+ ## @param primary.service.type MariaDB Primary Kubernetes service type
+ ##
+ type: ClusterIP
+ ports:
+ ## @param primary.service.ports.mysql MariaDB Primary Kubernetes service port for MariaDB
+ ##
+ mysql: 3306
+ ## @param primary.service.ports.metrics MariaDB Primary Kubernetes service port for metrics
+ ##
+ metrics: 9104
+ ## @param primary.service.nodePorts.mysql MariaDB Primary Kubernetes service node port
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
+ ##
+ nodePorts:
+ mysql: ""
+ ## @param primary.service.clusterIP MariaDB Primary Kubernetes service clusterIP IP
+ ##
+ clusterIP: ""
+ ## @param primary.service.loadBalancerIP MariaDB Primary loadBalancerIP if service type is `LoadBalancer`
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
+ ##
+ loadBalancerIP: ""
+ ## @param primary.service.externalTrafficPolicy Enable client source IP preservation
+ ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
+ ##
+ externalTrafficPolicy: Cluster
+ ## @param primary.service.loadBalancerSourceRanges Address that are allowed when MariaDB Primary service is LoadBalancer
+ ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
+ ## E.g.
+ ## loadBalancerSourceRanges:
+ ## - 10.10.10.0/24
+ ##
+ loadBalancerSourceRanges: []
+ ## @param primary.service.extraPorts Extra ports to expose (normally used with the `sidecar` value)
+ ##
+ extraPorts: []
+ ## @param primary.service.annotations Provide any additional annotations which may be required
+ ##
+ annotations: {}
+ ## @param primary.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"
+ ## If "ClientIP", consecutive client requests will be directed to the same Pod
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ ##
+ sessionAffinity: None
+ ## @param primary.service.sessionAffinityConfig Additional settings for the sessionAffinity. Ignored if `primary.service.sessionAffinity` is `None`
+ ## sessionAffinityConfig:
+ ## clientIP:
+ ## timeoutSeconds: 300
+ ##
+ sessionAffinityConfig: {}
+ ## @param primary.service.headless.annotations Annotations of the headless service
+ ##
+ headless:
+ annotations: {}
+ ## MariaDB primary Pod Disruption Budget configuration
+ ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
+ ##
+ pdb:
+ ## @param primary.pdb.create Enable/disable a Pod Disruption Budget creation for MariaDB primary pods
+ ##
+ create: true
+ ## @param primary.pdb.minAvailable Minimum number/percentage of MariaDB primary pods that must still be available after the eviction
+ ##
+ minAvailable: ""
+ ## @param primary.pdb.maxUnavailable Maximum number/percentage of MariaDB primary pods that can be unavailable after the eviction. Defaults to `1` if both `primary.pdb.minAvailable` and `primary.pdb.maxUnavailable` are empty.
+ ##
+ maxUnavailable: ""
+ ## @param primary.revisionHistoryLimit Maximum number of revisions that will be maintained in the StatefulSet
+ ##
+ revisionHistoryLimit: 10
+## @section MariaDB Secondary parameters
+##
+
+## Mariadb Secondary parameters
+##
+secondary:
+ ## @param secondary.name Name of the secondary database (eg secondary, slave, ...)
+ ##
+ name: secondary
+ ## @param secondary.replicaCount Number of MariaDB secondary replicas
+ ##
+ replicaCount: 1
+ ## @param secondary.command Override default container command on MariaDB Secondary container(s) (useful when using custom images)
+ ##
+ command: []
+ ## @param secondary.args Override default container args on MariaDB Secondary container(s) (useful when using custom images)
+ ##
+ args: []
+ ## @param secondary.lifecycleHooks for the MariaDB Secondary container(s) to automate configuration before or after startup
+ ##
+ lifecycleHooks: {}
+ ## @param secondary.automountServiceAccountToken Mount Service Account token in pod
+ ##
+ automountServiceAccountToken: false
+ ## @param secondary.hostAliases Add deployment host aliases
+ ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
+ ##
+ hostAliases: []
+ ## @param secondary.containerPorts.mysql Container port for mysql
+ ##
+ containerPorts:
+ mysql: 3306
+ ## @param secondary.configuration [string] MariaDB Secondary configuration to be injected as ConfigMap
+ ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file
+ ##
+ configuration: |-
+ [mysqld]
+ skip-name-resolve
+ explicit_defaults_for_timestamp
+ basedir=/opt/bitnami/mariadb
+ datadir=/bitnami/mariadb/data
+ port={{ .Values.secondary.containerPorts.mysql }}
+ socket=/opt/bitnami/mariadb/tmp/mysql.sock
+ tmpdir=/opt/bitnami/mariadb/tmp
+ max_allowed_packet=16M
+ bind-address=0.0.0.0
+ pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
+ log-error=/opt/bitnami/mariadb/logs/mysqld.log
+ character-set-server=UTF8
+ collation-server=utf8_general_ci
+ slow_query_log=0
+ long_query_time=10.0
+ binlog_expire_logs_seconds=2592000
+ {{- if .Values.tls.enabled }}
+ ssl_cert=/opt/bitnami/mariadb/certs/tls.crt
+ ssl_key=/opt/bitnami/mariadb/certs/tls.key
+ {{- if or .Values.tls.autoGenerated.enabled .Values.tls.ca .Values.tls.existingSecret }}
+ ssl_ca=/opt/bitnami/mariadb/certs/ca.crt
+ {{- end }}
+ {{- end }}
+
+ [client]
+ port=3306
+ socket=/opt/bitnami/mariadb/tmp/mysql.sock
+ default-character-set=UTF8
+
+ [manager]
+ port=3306
+ socket=/opt/bitnami/mariadb/tmp/mysql.sock
+ pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
+ ## @param secondary.existingConfigmap Name of existing ConfigMap with MariaDB Secondary configuration.
+ ## NOTE: When it's set the 'configuration' parameter is ignored
+ ##
+ existingConfigmap: ""
+ ## @param secondary.updateStrategy.type MariaDB secondary statefulset strategy type
+ ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
+ ##
+ updateStrategy:
+ ## StrategyType
+ ## Can be set to RollingUpdate or OnDelete
+ ##
+ type: RollingUpdate
+ ## @param secondary.rollingUpdatePartition Partition update strategy for Mariadb Secondary statefulset
+ ## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions
+ ##
+ rollingUpdatePartition: ""
+ ## @param secondary.podAnnotations Additional pod annotations for MariaDB secondary pods
+ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ ##
+ podAnnotations: {}
+ ## @param secondary.podLabels Extra labels for MariaDB secondary pods
+ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
+ ##
+ podLabels: {}
+ ## @param secondary.podAffinityPreset MariaDB secondary pod affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`
+ ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
+ ##
+ podAffinityPreset: ""
+ ## @param secondary.podAntiAffinityPreset MariaDB secondary pod anti-affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`
+ ## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
+ ##
+ podAntiAffinityPreset: soft
+ ## Mariadb Secondary node affinity preset
+ ## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
+ ##
+ nodeAffinityPreset:
+ ## @param secondary.nodeAffinityPreset.type MariaDB secondary node affinity preset type. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`
+ ##
+ type: ""
+ ## @param secondary.nodeAffinityPreset.key MariaDB secondary node label key to match Ignored if `secondary.affinity` is set.
+ ## E.g.
+ ## key: "kubernetes.io/e2e-az-name"
+ ##
+ key: ""
+ ## @param secondary.nodeAffinityPreset.values MariaDB secondary node label values to match. Ignored if `secondary.affinity` is set.
+ ## E.g.
+ ## values:
+ ## - e2e-az1
+ ## - e2e-az2
+ ##
+ values: []
+ ## @param secondary.affinity Affinity for MariaDB secondary pods assignment
+ ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
+ ## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set
+ ##
+ affinity: {}
+ ## @param secondary.nodeSelector Node labels for MariaDB secondary pods assignment
+ ## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
+ ##
+ nodeSelector: {}
+ ## @param secondary.tolerations Tolerations for MariaDB secondary pods assignment
+ ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+ ##
+ tolerations: []
+ ## @param secondary.topologySpreadConstraints Topology Spread Constraints for MariaDB secondary pods assignment
+ ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
+ ## E.g.
+ ## topologySpreadConstraints:
+ ## - maxSkew: 1
+ ## topologyKey: topology.kubernetes.io/zone
+ ## whenUnsatisfiable: DoNotSchedule
+ ##
+ topologySpreadConstraints: []
+ ## @param secondary.priorityClassName Priority class for MariaDB secondary pods assignment
+ ## Ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
+ ##
+ priorityClassName: ""
+ ## @param secondary.runtimeClassName Runtime Class for MariaDB secondary pods
+ ## Ref: https://kubernetes.io/docs/concepts/containers/runtime-class/
+ ##
+ runtimeClassName: ""
+ ## @param secondary.schedulerName Name of the k8s scheduler (other than default)
+ ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
+ ##
+ schedulerName: ""
+ ## @param secondary.terminationGracePeriodSeconds In seconds, time the given to the MySQL secondary pod needs to terminate gracefully
+ ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
+ ##
+ terminationGracePeriodSeconds: ""
+ ## @param secondary.podManagementPolicy podManagementPolicy to manage scaling operation of MariaDB secondary pods
+ ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
+ ##
+ podManagementPolicy: ""
+ ## MariaDB secondary Pod security context
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
+ ## @param secondary.podSecurityContext.enabled Enable security context for MariaDB secondary pods
+ ## @param secondary.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
+ ## @param secondary.podSecurityContext.sysctls Set kernel settings using the sysctl interface
+ ## @param secondary.podSecurityContext.supplementalGroups Set filesystem extra groups
+ ## @param secondary.podSecurityContext.fsGroup Group ID for the mounted volumes' filesystem
+ ##
+ podSecurityContext:
+ enabled: true
+ fsGroupChangePolicy: Always
+ sysctls: []
+ supplementalGroups: []
+ fsGroup: 1001
+ ## MariaDB secondary container security context
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
+ ## @param secondary.containerSecurityContext.enabled MariaDB secondary container securityContext
+ ## @param secondary.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
+ ## @param secondary.containerSecurityContext.runAsUser User ID for the MariaDB secondary container
+ ## @param secondary.containerSecurityContext.runAsGroup Group ID for the MariaDB secondary container
+ ## @param secondary.containerSecurityContext.runAsNonRoot Set secondary container's Security Context runAsNonRoot
+ ## @param secondary.containerSecurityContext.privileged Set secondary container's Security Context privileged
+ ## @param secondary.containerSecurityContext.allowPrivilegeEscalation Set secondary container's Security Context allowPrivilegeEscalation
+ ## @param secondary.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
+ ## @param secondary.containerSecurityContext.capabilities.drop List of capabilities to be dropped
+ ## @param secondary.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
+ ##
+ containerSecurityContext:
+ enabled: true
+ seLinuxOptions: {}
+ runAsUser: 1001
+ runAsGroup: 1001
+ runAsNonRoot: true
+ privileged: false
+ allowPrivilegeEscalation: false
+ readOnlyRootFilesystem: true
+ capabilities:
+ drop: ["ALL"]
+ seccompProfile:
+ type: "RuntimeDefault"
+ ## MariaDB secondary container's resource requests and limits
+ ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ ## We usually recommend not to specify default resources and to leave this as a conscious
+ ## choice for the user. This also increases chances charts run on environments with little
+ ## resources, such as Minikube. If you do want to specify resources, uncomment the following
+ ## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+ ## @param secondary.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if secondary.resources is set (secondary.resources is recommended for production).
+ ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
+ ##
+ resourcesPreset: "small"
+ ## @param secondary.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
+ ## Example:
+ ## resources:
+ ## requests:
+ ## cpu: 2
+ ## memory: 512Mi
+ ## limits:
+ ## cpu: 3
+ ## memory: 1024Mi
+ ##
+ resources: {}
+ ## Configure extra options for MariaDB Secondary containers' liveness, readiness and startup probes
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
+ ## @param secondary.startupProbe.enabled Enable startupProbe
+ ## @param secondary.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
+ ## @param secondary.startupProbe.periodSeconds Period seconds for startupProbe
+ ## @param secondary.startupProbe.timeoutSeconds Timeout seconds for startupProbe
+ ## @param secondary.startupProbe.failureThreshold Failure threshold for startupProbe
+ ## @param secondary.startupProbe.successThreshold Success threshold for startupProbe
+ ##
+ startupProbe:
+ enabled: false
+ initialDelaySeconds: 120
+ periodSeconds: 15
+ timeoutSeconds: 5
+ failureThreshold: 10
+ successThreshold: 1
+ ## Configure extra options for liveness probe
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
+ ## @param secondary.livenessProbe.enabled Enable livenessProbe
+ ## @param secondary.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
+ ## @param secondary.livenessProbe.periodSeconds Period seconds for livenessProbe
+ ## @param secondary.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
+ ## @param secondary.livenessProbe.failureThreshold Failure threshold for livenessProbe
+ ## @param secondary.livenessProbe.successThreshold Success threshold for livenessProbe
+ ##
+ livenessProbe:
+ enabled: true
+ initialDelaySeconds: 120
+ periodSeconds: 10
+ timeoutSeconds: 1
+ failureThreshold: 3
+ successThreshold: 1
+ ## @param secondary.readinessProbe.enabled Enable readinessProbe
+ ## @param secondary.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
+ ## @param secondary.readinessProbe.periodSeconds Period seconds for readinessProbe
+ ## @param secondary.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
+ ## @param secondary.readinessProbe.failureThreshold Failure threshold for readinessProbe
+ ## @param secondary.readinessProbe.successThreshold Success threshold for readinessProbe
+ ##
+ readinessProbe:
+ enabled: true
+ initialDelaySeconds: 30
+ periodSeconds: 10
+ timeoutSeconds: 1
+ failureThreshold: 3
+ successThreshold: 1
+ ## @param secondary.customStartupProbe Override default startup probe for MariaDB secondary containers
+ ##
+ customStartupProbe: {}
+ ## @param secondary.customLivenessProbe Override default liveness probe for MariaDB secondary containers
+ ##
+ customLivenessProbe: {}
+ ## @param secondary.customReadinessProbe Override default readiness probe for MariaDB secondary containers
+ ##
+ customReadinessProbe: {}
+ ## @param secondary.startupWaitOptions Override default builtin startup wait check options for MariaDB secondary containers
+ ## `bitnami/mariadb` Docker image has built-in startup check mechanism,
+ ## which periodically checks if MariaDB service has started up and stops it
+ ## if all checks have failed after X tries. Use these to control these checks.
+ ## ref: https://github.com/bitnami/containers/tree/main/bitnami/mariadb/pull/240
+ ## Example (with default options):
+ ## startupWaitOptions:
+ ## retries: 300
+ ## waitTime: 2
+ ##
+ startupWaitOptions: {}
+ ## @param secondary.extraFlags MariaDB secondary additional command line flags
+ ## Can be used to specify command line flags, for example:
+ ## E.g.
+ ## extraFlags: "--max-connect-errors=1000 --max_connections=155"
+ ##
+ extraFlags: ""
+ ## @param secondary.extraEnvVars Extra environment variables to be set on MariaDB secondary containers
+ ## E.g.
+ ## extraEnvVars:
+ ## - name: TZ
+ ## value: "Europe/Paris"
+ ##
+ extraEnvVars: []
+ ## @param secondary.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for MariaDB secondary containers
+ ##
+ extraEnvVarsCM: ""
+ ## @param secondary.extraEnvVarsSecret Name of existing Secret containing extra env vars for MariaDB secondary containers
+ ##
+ extraEnvVarsSecret: ""
+ ## Enable persistence using Persistent Volume Claims
+ ## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
+ ##
+ persistence:
+ ## @param secondary.persistence.enabled Enable persistence on MariaDB secondary replicas using a `PersistentVolumeClaim`
+ ##
+ enabled: true
+ ## @param secondary.persistence.subPath Subdirectory of the volume to mount at
+ ##
+ subPath: ""
+ ## @param secondary.persistence.storageClass MariaDB secondary persistent volume storage Class
+ ## If defined, storageClassName:
+ ## If set to "-", storageClassName: "", which disables dynamic provisioning
+ ## If undefined (the default) or set to null, no storageClassName spec is
+ ## set, choosing the default provisioner. (gp2 on AWS, standard on
+ ## GKE, AWS & OpenStack)
+ ##
+ storageClass: ""
+ ## @param secondary.persistence.labels Labels for the PVC
+ ##
+ labels: {}
+ ## @param secondary.persistence.annotations MariaDB secondary persistent volume claim annotations
+ ##
+ annotations: {}
+ ## @param secondary.persistence.accessModes MariaDB secondary persistent volume access Modes
+ ##
+ accessModes:
+ - ReadWriteOnce
+ ## @param secondary.persistence.size MariaDB secondary persistent volume size
+ ##
+ size: 8Gi
+ ## @param secondary.persistence.selector Selector to match an existing Persistent Volume
+ ## selector:
+ ## matchLabels:
+ ## app: my-app
+ ##
+ selector: {}
+ ## @param secondary.extraVolumes Optionally specify extra list of additional volumes to the MariaDB secondary pod(s)
+ ##
+ extraVolumes: []
+ ## @param secondary.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the MariaDB secondary container(s)
+ ##
+ extraVolumeMounts: []
+ ## @param secondary.initContainers Add additional init containers for the MariaDB secondary pod(s)
+ ##
+ initContainers: []
+ ## @param secondary.sidecars Add additional sidecar containers for the MariaDB secondary pod(s)
+ ##
+ sidecars: []
+ ## MariaDB Secondary Service parameters
+ ##
+ service:
+ ## @param secondary.service.type MariaDB secondary Kubernetes service type
+ ##
+ type: ClusterIP
+ ports:
+ ## @param secondary.service.ports.mysql MariaDB secondary Kubernetes service port for MariaDB
+ ##
+ mysql: 3306
+ ## @param secondary.service.ports.metrics MariaDB secondary Kubernetes service port for metrics
+ ##
+ metrics: 9104
+ ## @param secondary.service.nodePorts.mysql MariaDB secondary Kubernetes service node port
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
+ ##
+ nodePorts:
+ mysql: ""
+ ## @param secondary.service.clusterIP MariaDB secondary Kubernetes service clusterIP IP
+ ## e.g:
+ ## clusterIP: None
+ ##
+ clusterIP: ""
+ ## @param secondary.service.loadBalancerIP MariaDB secondary loadBalancerIP if service type is `LoadBalancer`
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
+ ##
+ loadBalancerIP: ""
+ ## @param secondary.service.externalTrafficPolicy Enable client source IP preservation
+ ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
+ ##
+ externalTrafficPolicy: Cluster
+ ## @param secondary.service.loadBalancerSourceRanges Address that are allowed when MariaDB secondary service is LoadBalancer
+ ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
+ ## E.g.
+ ## loadBalancerSourceRanges:
+ ## - 10.10.10.0/24
+ ##
+ loadBalancerSourceRanges: []
+ ## @param secondary.service.extraPorts Extra ports to expose (normally used with the `sidecar` value)
+ ##
+ extraPorts: []
+ ## @param secondary.service.annotations Provide any additional annotations which may be required
+ ##
+ annotations: {}
+ ## @param secondary.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"
+ ## If "ClientIP", consecutive client requests will be directed to the same Pod
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ ##
+ sessionAffinity: None
+ ## @param secondary.service.sessionAffinityConfig Additional settings for the sessionAffinity. Ignored if `secondary.service.sessionAffinity` is `None`
+ ## sessionAffinityConfig:
+ ## clientIP:
+ ## timeoutSeconds: 300
+ ##
+ sessionAffinityConfig: {}
+ ## MariaDB secondary Pod Disruption Budget configuration
+ ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
+ ##
+ pdb:
+ ## @param secondary.pdb.create Enable/disable a Pod Disruption Budget creation for MariaDB secondary pods
+ ##
+ create: true
+ ## @param secondary.pdb.minAvailable Minimum number/percentage of MariaDB secondary pods that should remain scheduled
+ ##
+ minAvailable: ""
+ ## @param secondary.pdb.maxUnavailable Maximum number/percentage of MariaDB secondary pods that may be made unavailable. Defaults to `1` if both `secondary.pdb.minAvailable` and `secondary.pdb.maxUnavailable` are empty.
+ ##
+ maxUnavailable: ""
+ ## @param secondary.revisionHistoryLimit Maximum number of revisions that will be maintained in the StatefulSet
+ ##
+ revisionHistoryLimit: 10
+ ## @param secondary.fips.openssl Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used
+ ##
+ fips:
+ openssl: ""
+
+## @section RBAC parameters
+##
+
+## MariaDB pods ServiceAccount
+## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
+##
+serviceAccount:
+ ## @param serviceAccount.create Enable the creation of a ServiceAccount for MariaDB pods
+ ##
+ create: true
+ ## @param serviceAccount.name Name of the created ServiceAccount
+ ## If not set and create is true, a name is generated using the mariadb.fullname template
+ ##
+ name: ""
+ ## @param serviceAccount.annotations Annotations for MariaDB Service Account
+ ##
+ annotations: {}
+ ## @param serviceAccount.automountServiceAccountToken Automount service account token for the server service account
+ ##
+ automountServiceAccountToken: false
+## Role Based Access
+## ref: https://kubernetes.io/docs/admin/authorization/rbac/
+##
+rbac:
+ ## @param rbac.create Whether to create and use RBAC resources or not
+ ##
+ create: false
+
+## @section Password update job
+##
+passwordUpdateJob:
+ ## @param passwordUpdateJob.enabled Enable password update job
+ ##
+ enabled: false
+ ## @param passwordUpdateJob.backoffLimit set backoff limit of the job
+ ##
+ backoffLimit: 10
+ ## @param passwordUpdateJob.command Override default container command on MariaDB Primary container(s) (useful when using custom images)
+ ##
+ command: []
+ ## @param passwordUpdateJob.args Override default container args on MariaDB Primary container(s) (useful when using custom images)
+ ##
+ args: []
+ ## @param passwordUpdateJob.extraCommands Extra commands to pass to the generation job
+ ##
+ extraCommands: ""
+ ## @param passwordUpdateJob.previousPasswords.rootPassword Previous root password (set if the password secret was already changed)
+ ## @param passwordUpdateJob.previousPasswords.password Previous password (set if the password secret was already changed)
+ ## @param passwordUpdateJob.previousPasswords.replicationPassword Previous replication password (set if the password secret was already changed)
+ ## @param passwordUpdateJob.previousPasswords.existingSecret Name of a secret containing the previous passwords (set if the password secret was already changed)
+ previousPasswords:
+ rootPassword: ""
+ password: ""
+ replicationPassword: ""
+ existingSecret: ""
+ ## Configure Container Security Context
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
+ ## @param passwordUpdateJob.containerSecurityContext.enabled Enabled containers' Security Context
+ ## @param passwordUpdateJob.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
+ ## @param passwordUpdateJob.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
+ ## @param passwordUpdateJob.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
+ ## @param passwordUpdateJob.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
+ ## @param passwordUpdateJob.containerSecurityContext.privileged Set container's Security Context privileged
+ ## @param passwordUpdateJob.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
+ ## @param passwordUpdateJob.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
+ ## @param passwordUpdateJob.containerSecurityContext.capabilities.drop List of capabilities to be dropped
+ ## @param passwordUpdateJob.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
+ ##
+ containerSecurityContext:
+ enabled: true
+ seLinuxOptions: {}
+ runAsUser: 1001
+ runAsGroup: 1001
+ runAsNonRoot: true
+ privileged: false
+ readOnlyRootFilesystem: true
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop: ["ALL"]
+ seccompProfile:
+ type: "RuntimeDefault"
+ ## Configure Pods Security Context
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
+ ## @param passwordUpdateJob.podSecurityContext.enabled Enabled credential init job pods' Security Context
+ ## @param passwordUpdateJob.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
+ ## @param passwordUpdateJob.podSecurityContext.sysctls Set kernel settings using the sysctl interface
+ ## @param passwordUpdateJob.podSecurityContext.supplementalGroups Set filesystem extra groups
+ ## @param passwordUpdateJob.podSecurityContext.fsGroup Set credential init job pod's Security Context fsGroup
+ ##
+ podSecurityContext:
+ enabled: true
+ fsGroupChangePolicy: Always
+ sysctls: []
+ supplementalGroups: []
+ fsGroup: 1001
+ ## @param passwordUpdateJob.extraEnvVars Array containing extra env vars to configure the credential init job
+ ## For example:
+ ## extraEnvVars:
+ ## - name: GF_DEFAULT_INSTANCE_NAME
+ ## value: my-instance
+ ##
+ extraEnvVars: []
+ ## @param passwordUpdateJob.extraEnvVarsCM ConfigMap containing extra env vars to configure the credential init job
+ ##
+ extraEnvVarsCM: ""
+ ## @param passwordUpdateJob.extraEnvVarsSecret Secret containing extra env vars to configure the credential init job (in case of sensitive data)
+ ##
+ extraEnvVarsSecret: ""
+ ## @param passwordUpdateJob.extraVolumes Optionally specify extra list of additional volumes for the credential init job
+ ##
+ extraVolumes: []
+ ## @param passwordUpdateJob.extraVolumeMounts Array of extra volume mounts to be added to the jwt Container (evaluated as template). Normally used with `extraVolumes`.
+ ##
+ extraVolumeMounts: []
+ ## @param passwordUpdateJob.initContainers Add additional init containers for the MariaDB Primary pod(s)
+ ##
+ initContainers: []
+ ## Container resource requests and limits
+ ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ ## @param passwordUpdateJob.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if passwordUpdateJob.resources is set (passwordUpdateJob.resources is recommended for production).
+ ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
+ ##
+ resourcesPreset: "micro"
+ ## @param passwordUpdateJob.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
+ ## Example:
+ ## resources:
+ ## requests:
+ ## cpu: 2
+ ## memory: 512Mi
+ ## limits:
+ ## cpu: 3
+ ## memory: 1024Mi
+ ##
+ resources: {}
+ ## @param passwordUpdateJob.customLivenessProbe Custom livenessProbe that overrides the default one
+ ##
+ customLivenessProbe: {}
+ ## @param passwordUpdateJob.customReadinessProbe Custom readinessProbe that overrides the default one
+ ##
+ customReadinessProbe: {}
+ ## @param passwordUpdateJob.customStartupProbe Custom startupProbe that overrides the default one
+ ##
+ customStartupProbe: {}
+ ## @param passwordUpdateJob.automountServiceAccountToken Mount Service Account token in pod
+ ##
+ automountServiceAccountToken: false
+ ## @param passwordUpdateJob.hostAliases Add deployment host aliases
+ ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
+ ##
+ hostAliases: []
+ ## @param passwordUpdateJob.annotations [object] Add annotations to the job
+ ##
+ annotations: {}
+ ## @param passwordUpdateJob.podLabels Additional pod labels
+ ## Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
+ ##
+ podLabels: {}
+ ## @param passwordUpdateJob.podAnnotations Additional pod annotations
+ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ ##
+ podAnnotations: {}
+ ## @param passwordUpdateJob.fips.openssl Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used
+ ##
+ fips:
+ openssl: ""
+
+## @section Volume Permissions parameters
+##
+
+## Init containers parameters:
+## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section.
+##
+volumePermissions:
+ ## @param volumePermissions.enabled Enable init container that changes the owner and group of the persistent volume(s) mountpoint to `runAsUser:fsGroup`
+ ##
+ enabled: false
+ ## @param volumePermissions.image.registry [default: REGISTRY_NAME] Init container volume-permissions image registry
+ ## @param volumePermissions.image.repository [default: REPOSITORY_NAME/os-shell] Init container volume-permissions image repository
+ ## @skip volumePermissions.image.tag Init container volume-permissions image tag (immutable tags are recommended)
+ ## @param volumePermissions.image.digest Init container volume-permissions image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
+ ## @param volumePermissions.image.pullPolicy Init container volume-permissions image pull policy
+ ## @param volumePermissions.image.pullSecrets Specify docker-registry secret names as an array
+ ##
+ image:
+ registry: registry-1.docker.io
+ repository: bitnami/os-shell
+ tag: latest
+ digest: ""
+ pullPolicy: IfNotPresent
+ ## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
+ ## Example:
+ ## pullSecrets:
+ ## - myRegistryKeySecretName
+ ##
+ pullSecrets: []
+ ## @param volumePermissions.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if volumePermissions.resources is set (volumePermissions.resources is recommended for production).
+ ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
+ ##
+ resourcesPreset: "nano"
+ ## @param volumePermissions.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
+ ## Example:
+ ## resources:
+ ## requests:
+ ## cpu: 2
+ ## memory: 512Mi
+ ## limits:
+ ## cpu: 3
+ ## memory: 1024Mi
+ ##
+ resources: {}
+ ## @param volumePermissions.fips.openssl Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used
+ ##
+ fips:
+ openssl: ""
+## @section Metrics parameters
+##
+
+## Mysqld Prometheus exporter parameters
+##
+metrics:
+ ## @param metrics.enabled Start a side-car prometheus exporter
+ ##
+ enabled: false
+ ## @param metrics.image.registry [default: REGISTRY_NAME] Exporter image registry
+ ## @param metrics.image.repository [default: REPOSITORY_NAME/mysqld-exporter] Exporter image repository
+ ## @skip metrics.image.tag Exporter image tag (immutable tags are recommended)
+ ## @param metrics.image.digest Exporter image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
+ ## @param metrics.image.pullPolicy Exporter image pull policy
+ ## @param metrics.image.pullSecrets Specify docker-registry secret names as an array
+ ##
+ image:
+ registry: registry-1.docker.io
+ repository: bitnami/mysqld-exporter
+ tag: latest
+ digest: ""
+ pullPolicy: IfNotPresent
+ ## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
+ ## Example:
+ ## pullSecrets:
+ ## - myRegistryKeySecretName
+ ##
+ pullSecrets: []
+ ## @param metrics.annotations [object] Annotations for the Exporter pod
+ ##
+ annotations:
+ prometheus.io/scrape: "true"
+ prometheus.io/port: "9104"
+ ## @param metrics.extraArgs [object] Extra args to be passed to mysqld_exporter
+ ## ref: https://github.com/prometheus/mysqld_exporter/
+ ## E.g.
+ ## - --collect.auto_increment.columns
+ ## - --collect.binlog_size
+ ## - --collect.engine_innodb_status
+ ## - --collect.engine_tokudb_status
+ ## - --collect.global_status
+ ## - --collect.global_variables
+ ## - --collect.info_schema.clientstats
+ ## - --collect.info_schema.innodb_metrics
+ ## - --collect.info_schema.innodb_tablespaces
+ ## - --collect.info_schema.innodb_cmp
+ ## - --collect.info_schema.innodb_cmpmem
+ ## - --collect.info_schema.processlist
+ ## - --collect.info_schema.processlist.min_time
+ ## - --collect.info_schema.query_response_time
+ ## - --collect.info_schema.tables
+ ## - --collect.info_schema.tables.databases
+ ## - --collect.info_schema.tablestats
+ ## - --collect.info_schema.userstats
+ ## - --collect.perf_schema.eventsstatements
+ ## - --collect.perf_schema.eventsstatements.digest_text_limit
+ ## - --collect.perf_schema.eventsstatements.limit
+ ## - --collect.perf_schema.eventsstatements.timelimit
+ ## - --collect.perf_schema.eventswaits
+ ## - --collect.perf_schema.file_events
+ ## - --collect.perf_schema.file_instances
+ ## - --collect.perf_schema.indexiowaits
+ ## - --collect.perf_schema.tableiowaits
+ ## - --collect.perf_schema.tablelocks
+ ## - --collect.perf_schema.replication_group_member_stats
+ ## - --collect.slave_status
+ ## - --collect.slave_hosts
+ ## - --collect.heartbeat
+ ## - --collect.heartbeat.database
+ ## - --collect.heartbeat.table
+ ##
+ extraArgs:
+ primary: []
+ secondary: []
+ ## @param metrics.extraVolumeMounts [object] Optionally specify extra list of additional volumeMounts for the MariaDB metrics container(s)
+ ##
+ extraVolumeMounts:
+ primary: []
+ secondary: []
+ ## @param metrics.containerPorts.http Container port for http
+ ##
+ containerPorts:
+ http: 9104
+ ## MariaDB metrics container Security Context
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
+ ## @param metrics.containerSecurityContext.enabled Enable security context for MariaDB metrics container
+ ## @param metrics.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
+ ## @param metrics.containerSecurityContext.runAsUser User ID for the MariaDB metrics container
+ ## @param metrics.containerSecurityContext.runAsGroup Group ID for the MariaDB metrics container
+ ## @param metrics.containerSecurityContext.runAsNonRoot Set metrics container's Security Context runAsNonRoot
+ ## @param metrics.containerSecurityContext.privileged Set metrics container's Security Context privileged
+ ## @param metrics.containerSecurityContext.allowPrivilegeEscalation Set metrics container's Security Context allowPrivilegeEscalation
+ ## @param metrics.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
+ ## @param metrics.containerSecurityContext.capabilities.drop List of capabilities to be dropped
+ ## @param metrics.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
+ ## Example:
+ ## containerSecurityContext:
+ ## enabled: true
+ ## capabilities:
+ ## drop: ["NET_RAW"]
+ ## readOnlyRootFilesystem: true
+ ##
+ containerSecurityContext:
+ enabled: false
+ privileged: false
+ runAsNonRoot: true
+ seLinuxOptions: {}
+ runAsUser: 1001
+ runAsGroup: 1001
+ readOnlyRootFilesystem: true
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop: ["ALL"]
+ seccompProfile:
+ type: "RuntimeDefault"
+ ## Mysqld Prometheus exporter resource requests and limits
+ ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ ## We usually recommend not to specify default resources and to leave this as a conscious
+ ## choice for the user. This also increases chances charts run on environments with little
+ ## resources, such as Minikube. If you do want to specify resources, uncomment the following
+ ## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+ ## @param metrics.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if metrics.resources is set (metrics.resources is recommended for production).
+ ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
+ ##
+ resourcesPreset: "nano"
+ ## @param metrics.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
+ ## Example:
+ ## resources:
+ ## requests:
+ ## cpu: 2
+ ## memory: 512Mi
+ ## limits:
+ ## cpu: 3
+ ## memory: 1024Mi
+ ##
+ resources: {}
+ ## @param metrics.fips.openssl Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used
+ ## @param metrics.fips.golang Configure Golang FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used
+ ##
+ fips:
+ openssl: ""
+ golang: relaxed
+ ## Configure extra options for liveness probe
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
+ ## @param metrics.livenessProbe.enabled Enable livenessProbe
+ ## @param metrics.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
+ ## @param metrics.livenessProbe.periodSeconds Period seconds for livenessProbe
+ ## @param metrics.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
+ ## @param metrics.livenessProbe.failureThreshold Failure threshold for livenessProbe
+ ## @param metrics.livenessProbe.successThreshold Success threshold for livenessProbe
+ ##
+ livenessProbe:
+ enabled: true
+ initialDelaySeconds: 120
+ periodSeconds: 10
+ timeoutSeconds: 1
+ successThreshold: 1
+ failureThreshold: 3
+ ## Configure extra options for readiness probe
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
+ ## @param metrics.readinessProbe.enabled Enable readinessProbe
+ ## @param metrics.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
+ ## @param metrics.readinessProbe.periodSeconds Period seconds for readinessProbe
+ ## @param metrics.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
+ ## @param metrics.readinessProbe.failureThreshold Failure threshold for readinessProbe
+ ## @param metrics.readinessProbe.successThreshold Success threshold for readinessProbe
+ ##
+ readinessProbe:
+ enabled: true
+ initialDelaySeconds: 30
+ periodSeconds: 10
+ timeoutSeconds: 1
+ successThreshold: 1
+ failureThreshold: 3
+ ## Prometheus Service Monitor
+ ## ref: https://github.com/coreos/prometheus-operator
+ ##
+ serviceMonitor:
+ ## @param metrics.serviceMonitor.enabled Create ServiceMonitor Resource for scraping metrics using PrometheusOperator
+ ##
+ enabled: false
+ ## @param metrics.serviceMonitor.namespace Namespace which Prometheus is running in
+ ##
+ namespace: ""
+ ## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus.
+ ##
+ jobLabel: ""
+ ## @param metrics.serviceMonitor.interval Interval at which metrics should be scraped
+ ##
+ interval: 30s
+ ## @param metrics.serviceMonitor.scrapeTimeout Specify the timeout after which the scrape is ended
+ ## e.g:
+ ## scrapeTimeout: 30s
+ ##
+ scrapeTimeout: ""
+ ## @param metrics.serviceMonitor.relabelings RelabelConfigs to apply to samples before scraping
+ ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
+ ##
+ relabelings: []
+ ## @param metrics.serviceMonitor.metricRelabelings MetricRelabelConfigs to apply to samples before ingestion
+ ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
+ ##
+ metricRelabelings: []
+ ## @param metrics.serviceMonitor.honorLabels honorLabels chooses the metric's labels on collisions with target labels
+ ##
+ honorLabels: false
+ ## @param metrics.serviceMonitor.selector ServiceMonitor selector labels
+ ## ref: https://github.com/bitnami/charts/tree/main/bitnami/prometheus-operator#prometheus-configuration
+ ##
+ ## selector:
+ ## prometheus: my-prometheus
+ ##
+ selector: {}
+ ## @param metrics.serviceMonitor.labels Extra labels for the ServiceMonitor
+ ##
+ labels: {}
+ ## Prometheus Operator PrometheusRule configuration
+ ##
+ prometheusRule:
+ ## @param metrics.prometheusRule.enabled if `true`, creates a Prometheus Operator PrometheusRule (also requires `metrics.enabled` to be `true` and `metrics.prometheusRule.rules`)
+ ##
+ enabled: false
+ ## @param metrics.prometheusRule.namespace Namespace for the PrometheusRule Resource (defaults to the Release Namespace)
+ ##
+ namespace: ""
+ ## @param metrics.prometheusRule.additionalLabels Additional labels that can be used so PrometheusRule will be discovered by Prometheus
+ ##
+ additionalLabels: {}
+ ## @param metrics.prometheusRule.rules Prometheus Rule definitions
+ ## - alert: MariaDB-Down
+ ## expr: absent(up{job="mariadb"} == 1)
+ ## for: 5m
+ ## labels:
+ ## severity: warning
+ ## service: mariadb
+ ## annotations:
+ ## message: 'MariaDB instance {{ `{{` }} $labels.instance {{ `}}` }} is down'
+ ## summary: MariaDB instance is down
+ ##
+ rules: []
+## @section NetworkPolicy parameters
+## ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
+##
+networkPolicy:
+ ## @param networkPolicy.enabled Enable creation of NetworkPolicy resources
+ ##
+ enabled: true
+ ## @param networkPolicy.allowExternal The Policy model to apply
+ ## When set to false, only pods with the correct client label will have network access to the ports MariaDB is
+ ## listening on. When true, MariaDB will accept connections from any source (with the correct destination port).
+ ##
+ allowExternal: true
+ ## @param networkPolicy.allowExternalEgress Allow the pod to access any range of port and all destinations.
+ ##
+ allowExternalEgress: true
+ ## @param networkPolicy.extraIngress [array] Add extra ingress rules to the NetworkPolicy
+ ## e.g:
+ ## extraIngress:
+ ## - ports:
+ ## - port: 1234
+ ## from:
+ ## - podSelector:
+ ## - matchLabels:
+ ## - role: frontend
+ ## - podSelector:
+ ## - matchExpressions:
+ ## - key: role
+ ## operator: In
+ ## values:
+ ## - frontend
+ ##
+ extraIngress: []
+ ## @param networkPolicy.extraEgress [array] Add extra ingress rules to the NetworkPolicy
+ ## e.g:
+ ## extraEgress:
+ ## - ports:
+ ## - port: 1234
+ ## to:
+ ## - podSelector:
+ ## - matchLabels:
+ ## - role: frontend
+ ## - podSelector:
+ ## - matchExpressions:
+ ## - key: role
+ ## operator: In
+ ## values:
+ ## - frontend
+ ##
+ extraEgress: []
+ ## @param networkPolicy.ingressNSMatchLabels [object] Labels to match to allow traffic from other namespaces
+ ## @param networkPolicy.ingressNSPodMatchLabels [object] Pod labels to match to allow traffic from other namespaces
+ ##
+ ingressNSMatchLabels: {}
+ ingressNSPodMatchLabels: {}
diff --git a/charts/semaphore/charts/postgresql/.helmignore b/charts/semaphore/charts/postgresql/.helmignore
new file mode 100644
index 0000000..207983f
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/.helmignore
@@ -0,0 +1,25 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+# img folder
+img/
+# Changelog
+CHANGELOG.md
diff --git a/charts/semaphore/charts/postgresql/.relok8s-images.yaml b/charts/semaphore/charts/postgresql/.relok8s-images.yaml
new file mode 100644
index 0000000..1f45efd
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/.relok8s-images.yaml
@@ -0,0 +1,13 @@
+# relok8s image hints file
+# This file makes this Helm Chart relocatable by relok8s
+# More info here https://github.com/vmware-tanzu/asset-relocation-tool-for-kubernetes
+#
+# postgresql chart
+
+# postgresql image
+- "{{.image.registry}}/{{.image.repository}}:{{.image.tag}}"
+# os-shell image
+- "{{.volumePermissions.image.registry}}/{{.volumePermissions.image.repository}}:{{.volumePermissions.image.tag}}"
+# postgres-exporter image
+- "{{.metrics.image.registry}}/{{.metrics.image.repository}}:{{.metrics.image.tag}}"
+
diff --git a/charts/semaphore/charts/postgresql/Chart.yaml b/charts/semaphore/charts/postgresql/Chart.yaml
new file mode 100644
index 0000000..54f7262
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/Chart.yaml
@@ -0,0 +1,41 @@
+annotations:
+ fips: "true"
+ images: |
+ - name: os-shell
+ version: "5"
+ image: registry-1.docker.io/bitnami/os-shell:latest
+ - name: postgres-exporter
+ version: 0.18.1
+ image: registry-1.docker.io/bitnami/postgres-exporter:latest
+ - name: postgresql
+ version: 18.0.0
+ image: registry-1.docker.io/bitnami/postgresql:latest
+ licenses: Apache-2.0
+ tanzuCategory: service
+apiVersion: v2
+appVersion: 18.0.0
+dependencies:
+- name: common
+ repository: oci://registry-1.docker.io/bitnamicharts
+ tags:
+ - bitnami-common
+ version: 2.33.1
+description: PostgreSQL (Postgres) is an open source object-relational database known
+ for reliability and data integrity. ACID-compliant, it supports foreign keys, joins,
+ views, triggers and stored procedures.
+home: https://bitnami.com
+icon: https://dyltqmyl993wv.cloudfront.net/assets/stacks/postgresql/img/postgresql-stack-220x234.png
+keywords:
+- postgresql
+- postgres
+- database
+- sql
+- replication
+- cluster
+maintainers:
+- name: Broadcom, Inc. All Rights Reserved.
+ url: https://github.com/bitnami/charts
+name: postgresql
+sources:
+- https://github.com/bitnami/charts/tree/main/bitnami/postgresql
+version: 18.1.4
diff --git a/charts/semaphore/charts/postgresql/README.md b/charts/semaphore/charts/postgresql/README.md
new file mode 100644
index 0000000..d6f2156
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/README.md
@@ -0,0 +1,1174 @@
+
+
+# Bitnami Secure Images Helm chart for PostgreSQL
+
+PostgreSQL (Postgres) is an open source object-relational database known for reliability and data integrity. ACID-compliant, it supports foreign keys, joins, views, triggers and stored procedures.
+
+[Overview of PostgreSQL](http://www.postgresql.org)
+
+Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
+
+## TL;DR
+
+```console
+helm install my-release oci://MY-OCI-REGISTRY/postgresql
+```
+
+> Tip: Did you know that this app is also available as a Kubernetes App on the Azure Marketplace? Kubernetes Apps are the easiest way to deploy Bitnami on AKS. Click [here](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/bitnami.postgresql-cnab) to see the listing on Azure Marketplace.
+
+Looking to use PostgreSQL in production? Try [VMware Tanzu Application Catalog](https://bitnami.com/enterprise), the commercial edition of the Bitnami catalog.
+
+## Why use Bitnami Secure Images?
+
+Those are hardened, minimal CVE images built and maintained by Bitnami. Bitnami Secure Images are based on the cloud-optimized, security-hardened enterprise [OS Photon Linux](https://vmware.github.io/photon/). Why choose BSI images?
+
+- Hardened secure images of popular open source software with Near-Zero Vulnerabilities
+- Vulnerability Triage & Prioritization with VEX Statements, KEV and EPSS Scores
+- Compliance focus with FIPS, STIG, and air-gap options, including secure bill of materials (SBOM)
+- Software supply chain provenance attestation through in-toto
+- First class support for the internet’s favorite Helm charts
+
+Each image comes with valuable security metadata. You can view the metadata in [our public catalog here](https://app-catalog.vmware.com/bitnami/apps). Note: Some data is only available with [commercial subscriptions to BSI](https://bitnami.com/).
+
+
+
+
+If you are looking for our previous generation of images based on Debian Linux, please see the [Bitnami Legacy registry](https://hub.docker.com/u/bitnamilegacy).
+
+## Introduction
+
+This chart bootstraps a [PostgreSQL](https://github.com/bitnami/containers/tree/main/bitnami/postgresql) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
+
+For HA, please see [this repo](https://github.com/bitnami/charts/tree/main/bitnami/postgresql-ha)
+
+## Prerequisites
+
+- Kubernetes 1.23+
+- Helm 3.8.0+
+- PV provisioner support in the underlying infrastructure
+
+## Installing the Chart
+
+To install the chart with the release name `my-release`:
+
+```console
+helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/postgresql
+```
+
+> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
+
+The command deploys PostgreSQL on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
+
+> **Tip**: List all releases using `helm list`
+
+## Configuration and installation details
+
+### Resource requests and limits
+
+Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the `resources` value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.
+
+To make this process easier, the chart contains the `resourcesPreset` values, which automatically sets the `resources` section according to different presets. Check these presets in [the bitnami/common chart](https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15). However, in production workloads using `resourcesPreset` is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the [official Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/).
+
+### Prometheus metrics
+
+This chart can be integrated with Prometheus by setting `metrics.enabled` to `true`. This will deploy a sidecar container with [postgres_exporter](https://github.com/prometheus-community/postgres_exporter) in all pods. It will also create `metrics` services that can be configured under the `metrics.service` section. These services will be have the necessary annotations to be automatically scraped by Prometheus.
+
+#### Prometheus requirements
+
+It is necessary to have a working installation of Prometheus or Prometheus Operator for the integration to work. Install the [Bitnami Prometheus helm chart](https://github.com/bitnami/charts/tree/main/bitnami/prometheus) or the [Bitnami Kube Prometheus helm chart](https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus) to easily have a working Prometheus in your cluster.
+
+#### Integration with Prometheus Operator
+
+The chart can deploy `ServiceMonitor` objects for integration with Prometheus Operator installations. To do so, set the value `metrics.serviceMonitor.enabled=true`. Ensure that the Prometheus Operator `CustomResourceDefinitions` are installed in the cluster or it will fail with the following error:
+
+```text
+no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
+```
+
+Install the [Bitnami Kube Prometheus helm chart](https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus) for having the necessary CRDs and the Prometheus Operator.
+
+### [Rolling VS Immutable tags](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-understand-rolling-tags-containers-index.html)
+
+It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
+
+Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
+
+### Customizing primary and read replica services in a replicated configuration
+
+At the top level, there is a service object which defines the services for both primary and readReplicas. For deeper customization, there are service objects for both the primary and read types individually. This allows you to override the values in the top level service object so that the primary and read can be of different service types and with different clusterIPs / nodePorts. Also in the case you want the primary and read to be of type nodePort, you will need to set the nodePorts to different values to prevent a collision. The values that are deeper in the primary.service or readReplicas.service objects will take precedence over the top level service object.
+
+### Use a different PostgreSQL version
+
+To modify the application version used in this chart, specify a different version of the image using the `image.tag` parameter and/or a different repository using the `image.repository` parameter.
+
+### LDAP
+
+LDAP support can be enabled in the chart by specifying the `ldap.` parameters while creating a release. The following parameters should be configured to properly enable the LDAP support in the chart.
+
+- **ldap.enabled**: Enable LDAP support. Defaults to `false`.
+- **ldap.uri**: LDAP URL beginning in the form `ldap[s]://:`. No defaults.
+- **ldap.base**: LDAP base DN. No defaults.
+- **ldap.binddn**: LDAP bind DN. No defaults.
+- **ldap.bindpw**: LDAP bind password. No defaults.
+- **ldap.bslookup**: LDAP base lookup. No defaults.
+- **ldap.nss_initgroups_ignoreusers**: LDAP ignored users. `root,nslcd`.
+- **ldap.scope**: LDAP search scope. No defaults.
+- **ldap.tls_reqcert**: LDAP TLS check on server certificates. No defaults.
+
+For example:
+
+```text
+ldap.enabled="true"
+ldap.uri="ldap://my_ldap_server"
+ldap.base="dc=example\,dc=org"
+ldap.binddn="cn=admin\,dc=example\,dc=org"
+ldap.bindpw="admin"
+ldap.bslookup="ou=group-ok\,dc=example\,dc=org"
+ldap.nss_initgroups_ignoreusers="root\,nslcd"
+ldap.scope="sub"
+ldap.tls_reqcert="demand"
+```
+
+Next, login to the PostgreSQL server using the `psql` client and add the PAM authenticated LDAP users.
+
+> Note: Parameters including commas must be escaped as shown in the above example.
+
+### Update credentials
+
+Bitnami charts, with its default settings, configure credentials at first boot. Any further change in the secrets or credentials can be done using one of the following methods:
+
+### Manual update of the passwords and secrets
+
+- Update the user password following [the upstream documentation](https://www.postgresql.org/docs/current/sql-alteruser.html)
+- Update the password secret with the new values (replace the SECRET_NAME, PASSWORD and POSTGRES_PASSWORD placeholders)
+
+```shell
+kubectl create secret generic SECRET_NAME --from-literal=password=PASSWORD --from-literal=postgres-password=POSTGRES_PASSWORD --dry-run -o yaml | kubectl apply -f -
+```
+
+### Automated update using a password update job
+
+The Bitnami PostgreSQL provides a password update job that will automatically change the PostgreSQL passwords when running helm upgrade. To enable the job set `passwordUpdateJob.enabled=true`. This job requires:
+
+- The new passwords: this is configured using either `auth.postgresPassword`, `auth.password` and `auth.replicationPassword` (if applicable) or setting `auth.existingSecret`.
+- The previous passwords: This value is taken automatically from already deployed secret object. If you are using `auth.existingSecret` or `helm template` instead of `helm upgrade`, then set either `passwordUpdateJob.previousPasswords.postgresPassword`, `passwordUpdateJob.previousPasswords.password`, `passwordUpdateJob.previousPasswords.replicationPassword` (when applicable), or setting `passwordUpdateJob.previousPasswords.existingSecret`.
+
+In the following example we update the password via values.yaml in a PostgreSQL installation with replication
+
+```yaml
+architecture: "replication"
+
+auth:
+ user: "user"
+ postgresPassword: "newPostgresPassword123"
+ password: "newUserPassword123"
+ replicationPassword: "newReplicationPassword123"
+
+passwordUpdateJob:
+ enabled: true
+```
+
+In this example we use two existing secrets (`new-password-secret` and `previous-password-secret`) to update the passwords:
+
+```yaml
+auth:
+ existingSecret: new-password-secret
+
+passwordUpdateJob:
+ enabled: true
+ previousPasswords:
+ existingSecret: previous-password-secret
+```
+
+You can add extra update commands using the `passwordUpdateJob.extraCommands` value.
+
+### postgresql.conf / pg_hba.conf files as configMap
+
+This helm chart also supports to customize the PostgreSQL configuration file. You can add additional PostgreSQL configuration parameters using the `primary.extendedConfiguration`/`readReplicas.extendedConfiguration` parameters as a string. Alternatively, to replace the entire default configuration use `primary.configuration`.
+
+You can also add a custom pg_hba.conf using the `primary.pgHbaConfiguration` parameter.
+
+In addition to these options, you can also set an external ConfigMap with all the configuration files. This is done by setting the `primary.existingConfigmap` parameter. Note that this will override the two previous options.
+
+### Initialize a fresh instance
+
+The [Bitnami PostgreSQL](https://github.com/bitnami/containers/tree/main/bitnami/postgresql) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, you can specify custom scripts using the `primary.initdb.scripts` parameter as a string.
+
+In addition, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `primary.initdb.scriptsConfigMap` parameter. Note that this will override the two previous options. If your initialization scripts contain sensitive information such as credentials or passwords, you can use the `primary.initdb.scriptsSecret` parameter.
+
+The allowed extensions are `.sh`, `.sql` and `.sql.gz`.
+
+### Securing traffic using TLS
+
+TLS support can be enabled in the chart by specifying the `tls.` parameters while creating a release. The following parameters should be configured to properly enable the TLS support in the chart:
+
+- `tls.enabled`: Enable TLS support. Defaults to `false`
+- `tls.certificatesSecret`: Name of an existing secret that contains the certificates. No defaults.
+- `tls.certFilename`: Certificate filename. No defaults.
+- `tls.certKeyFilename`: Certificate key filename. No defaults.
+
+For example:
+
+- First, create the secret with the cetificates files:
+
+ ```console
+ kubectl create secret generic certificates-tls-secret --from-file=./cert.crt --from-file=./cert.key --from-file=./ca.crt
+ ```
+
+- Then, use the following parameters:
+
+ ```console
+ volumePermissions.enabled=true
+ tls.enabled=true
+ tls.certificatesSecret="certificates-tls-secret"
+ tls.certFilename="cert.crt"
+ tls.certKeyFilename="cert.key"
+ ```
+
+ > Note TLS and VolumePermissions: PostgreSQL requires certain permissions on sensitive files (such as certificate keys) to start up. Due to an on-going [issue](https://github.com/kubernetes/kubernetes/issues/57923) regarding kubernetes permissions and the use of `containerSecurityContext.runAsUser`, you must enable `volumePermissions` to ensure everything works as expected.
+
+### Sidecars
+
+If you need additional containers to run within the same pod as PostgreSQL (e.g. an additional metrics or logging exporter), you can do so via the `sidecars` config parameter. Simply define your container according to the Kubernetes container spec.
+
+```yaml
+# For the PostgreSQL primary
+primary:
+ sidecars:
+ - name: your-image-name
+ image: your-image
+ imagePullPolicy: Always
+ ports:
+ - name: portname
+ containerPort: 1234
+# For the PostgreSQL replicas
+readReplicas:
+ sidecars:
+ - name: your-image-name
+ image: your-image
+ imagePullPolicy: Always
+ ports:
+ - name: portname
+ containerPort: 1234
+```
+
+### Metrics
+
+The chart optionally can start a metrics exporter for [prometheus](https://prometheus.io). The metrics endpoint (port 9187) is not exposed and it is expected that the metrics are collected from inside the k8s cluster using something similar as the described in the [example Prometheus scrape configuration](https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml).
+
+The exporter allows to create custom metrics from additional SQL queries. See the Chart's `values.yaml` for an example and consult the [exporters documentation](https://github.com/wrouesnel/postgres_exporter#adding-new-metrics-via-a-config-file) for more details.
+
+### Use of global variables
+
+In more complex scenarios, we may have the following tree of dependencies
+
+```text
+ +--------------+
+ | |
+ +------------+ Chart 1 +-----------+
+ | | | |
+ | --------+------+ |
+ | | |
+ | | |
+ | | |
+ | | |
+ v v v
++-------+------+ +--------+------+ +--------+------+
+| | | | | |
+| PostgreSQL | | Sub-chart 1 | | Sub-chart 2 |
+| | | | | |
++--------------+ +---------------+ +---------------+
+```
+
+The three charts below depend on the parent chart Chart 1. However, subcharts 1 and 2 may need to connect to PostgreSQL as well. In order to do so, subcharts 1 and 2 need to know the PostgreSQL credentials, so one option for deploying could be deploy Chart 1 with the following parameters:
+
+```text
+postgresql.auth.username=testuser
+subchart1.postgresql.auth.username=testuser
+subchart2.postgresql.auth.username=testuser
+postgresql.auth.password=testpass
+subchart1.postgresql.auth.password=testpass
+subchart2.postgresql.auth.password=testpass
+postgresql.auth.database=testdb
+subchart1.postgresql.auth.database=testdb
+subchart2.postgresql.auth.database=testdb
+```
+
+If the number of dependent sub-charts increases, installing the chart with parameters can become increasingly difficult. An alternative would be to set the credentials using global variables as follows:
+
+```text
+global.postgresql.auth.username=testuser
+global.postgresql.auth.password=testpass
+global.postgresql.auth.database=testdb
+```
+
+This way, the credentials will be available in all of the subcharts.
+
+### FIPS parameters
+
+The FIPS parameters only have effect if you are using images from the [Bitnami Secure Images catalog](https://www.arrow.com/globalecs/uk/products/bitnami-secure-images/).
+
+For more information on this new support, please refer to the [FIPS Compliance section](https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-doc/security-frameworks-FIPS-compliance.html).
+
+### Backup and restore
+
+To back up and restore Bitnami PostgreSQL Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using [Velero](https://velero.io/), a Kubernetes backup/restore tool.
+
+These are the steps you will usually follow to back up and restore your PostgreSQL cluster data:
+
+- Install Velero on the source and destination clusters.
+- Use Velero to back up the PersistentVolumes (PVs) used by the deployment on the source cluster.
+- Use Velero to restore the backed-up PVs on the destination cluster.
+- Create a new deployment on the destination cluster with the same chart, deployment name, credentials and other parameters as the original. This new deployment will use the restored PVs and hence the original data.
+
+Refer to our detailed [tutorial on backing up and restoring PostgreSQL deployments on Kubernetes](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-migrate-data-tac-velero-index.html) for more information.
+
+### NetworkPolicy
+
+To enable network policy for PostgreSQL, install [a networking plugin that implements the Kubernetes NetworkPolicy spec](https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy#before-you-begin), and set `networkPolicy.enabled` to `true`.
+
+For Kubernetes v1.5 & v1.6, you must also turn on NetworkPolicy by setting the DefaultDeny namespace annotation. Note: this will enforce policy for _all_ pods in the namespace:
+
+```console
+kubectl annotate namespace default "net.beta.kubernetes.io/network-policy={\"ingress\":{\"isolation\":\"DefaultDeny\"}}"
+```
+
+With NetworkPolicy enabled, traffic will be limited to just port 5432.
+
+For more precise policy, set `networkPolicy.allowExternal=false`. This will only allow pods with the generated client label to connect to PostgreSQL.
+This label will be displayed in the output of a successful install.
+
+### Differences between Bitnami PostgreSQL image and [Docker Official](https://hub.docker.com/_/postgres) image
+
+- The Docker Official PostgreSQL image does not support replication. If you pass any replication environment variable, this would be ignored. The only environment variables supported by the Docker Official image are POSTGRES_USER, POSTGRES_DB, POSTGRES_PASSWORD, POSTGRES_INITDB_ARGS, POSTGRES_INITDB_WALDIR and PGDATA. All the remaining environment variables are specific to the Bitnami PostgreSQL image.
+- The Bitnami PostgreSQL image is non-root by default. This requires that you run the pod with `securityContext` and updates the permissions of the volume with an `initContainer`. A key benefit of this configuration is that the pod follows security best practices and is prepared to run on Kubernetes distributions with hard security constraints like OpenShift.
+- For OpenShift up to 4.10, let set the volume permissions, security context, runAsUser and fsGroup automatically by OpenShift and disable the predefined settings of the helm chart: primary.securityContext.enabled=false,primary.containerSecurityContext.enabled=false,volumePermissions.enabled=false,shmVolume.enabled=false
+- For OpenShift 4.11 and higher, let set OpenShift the runAsUser and fsGroup automatically. Configure the pod and container security context to restrictive defaults and disable the volume permissions setup: primary.
+ podSecurityContext.fsGroup=null,primary.podSecurityContext.seccompProfile.type=RuntimeDefault,primary.containerSecurityContext.runAsUser=null,primary.containerSecurityContext.allowPrivilegeEscalation=false,primary.containerSecurityContext.runAsNonRoot=true,primary.containerSecurityContext.seccompProfile.type=RuntimeDefault,primary.containerSecurityContext.capabilities.drop=['ALL'],volumePermissions.enabled=false,shmVolume.enabled=false
+
+### Setting Pod's affinity
+
+This chart allows you to set your custom affinity using the `XXX.affinity` parameter(s). Find more information about Pod's affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
+
+As an alternative, you can use of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/main/bitnami/common#affinities) chart. To do so, set the `XXX.podAffinityPreset`, `XXX.podAntiAffinityPreset`, or `XXX.nodeAffinityPreset` parameters.
+
+## Persistence
+
+The [Bitnami PostgreSQL](https://github.com/bitnami/containers/tree/main/bitnami/postgresql) image stores the PostgreSQL data and configurations at the `/bitnami/postgresql` path of the container.
+
+Persistent Volume Claims are used to keep the data across deployments. This is known to work in GCE, AWS, and minikube.
+See the [Parameters](#parameters) section to configure the PVC or to disable persistence.
+
+If you already have data in it, you will fail to sync to standby nodes for all commits, details can refer to the [code present in the container repository](https://github.com/bitnami/containers/tree/main/bitnami/postgresql). If you need to use those data, please covert them to sql and import after `helm install` finished.
+
+## Parameters
+
+### Global parameters
+
+| Name | Description | Value |
+| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
+| `global.imageRegistry` | Global Docker image registry | `""` |
+| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
+| `global.defaultStorageClass` | Global default StorageClass for Persistent Volume(s) | `""` |
+| `global.storageClass` | DEPRECATED: use global.defaultStorageClass instead | `""` |
+| `global.security.allowInsecureImages` | Allows skipping image verification | `false` |
+| `global.postgresql.fullnameOverride` | Full chart name (overrides `fullnameOverride`) | `""` |
+| `global.postgresql.auth.postgresPassword` | Password for the "postgres" admin user (overrides `auth.postgresPassword`) | `""` |
+| `global.postgresql.auth.username` | Name for a custom user to create (overrides `auth.username`) | `""` |
+| `global.postgresql.auth.password` | Password for the custom user to create (overrides `auth.password`) | `""` |
+| `global.postgresql.auth.database` | Name for a custom database to create (overrides `auth.database`) | `""` |
+| `global.postgresql.auth.existingSecret` | Name of existing secret to use for PostgreSQL credentials (overrides `auth.existingSecret`). | `""` |
+| `global.postgresql.auth.secretKeys.adminPasswordKey` | Name of key in existing secret to use for PostgreSQL credentials (overrides `auth.secretKeys.adminPasswordKey`). Only used when `global.postgresql.auth.existingSecret` is set. | `""` |
+| `global.postgresql.auth.secretKeys.userPasswordKey` | Name of key in existing secret to use for PostgreSQL credentials (overrides `auth.secretKeys.userPasswordKey`). Only used when `global.postgresql.auth.existingSecret` is set. | `""` |
+| `global.postgresql.auth.secretKeys.replicationPasswordKey` | Name of key in existing secret to use for PostgreSQL credentials (overrides `auth.secretKeys.replicationPasswordKey`). Only used when `global.postgresql.auth.existingSecret` is set. | `""` |
+| `global.postgresql.service.ports.postgresql` | PostgreSQL service port (overrides `service.ports.postgresql`) | `""` |
+| `global.compatibility.openshift.adaptSecurityContext` | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | `auto` |
+| `global.defaultFips` | Default value for the FIPS configuration (allowed values: '', restricted, relaxed, off). Can be overriden by the 'fips' object | `restricted` |
+
+### Common parameters
+
+| Name | Description | Value |
+| ------------------------ | -------------------------------------------------------------------------------------------- | --------------- |
+| `kubeVersion` | Override Kubernetes version | `""` |
+| `nameOverride` | String to partially override common.names.fullname template (will maintain the release name) | `""` |
+| `fullnameOverride` | String to fully override common.names.fullname template | `""` |
+| `namespaceOverride` | String to fully override common.names.namespace | `""` |
+| `clusterDomain` | Kubernetes Cluster Domain | `cluster.local` |
+| `extraDeploy` | Array of extra objects to deploy with the release (evaluated as a template) | `[]` |
+| `commonLabels` | Add labels to all the deployed resources | `{}` |
+| `commonAnnotations` | Add annotations to all the deployed resources | `{}` |
+| `secretAnnotations` | Add annotations to the secrets | `{}` |
+| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
+| `diagnosticMode.command` | Command to override all containers in the statefulset | `["sleep"]` |
+| `diagnosticMode.args` | Args to override all containers in the statefulset | `["infinity"]` |
+
+### PostgreSQL common parameters
+
+| Name | Description | Value |
+| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
+| `image.registry` | PostgreSQL image registry | `REGISTRY_NAME` |
+| `image.repository` | PostgreSQL image repository | `REPOSITORY_NAME/postgresql` |
+| `image.digest` | PostgreSQL image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
+| `image.pullPolicy` | PostgreSQL image pull policy | `IfNotPresent` |
+| `image.pullSecrets` | Specify image pull secrets | `[]` |
+| `image.debug` | Specify if debug values should be set | `false` |
+| `auth.enablePostgresUser` | Assign a password to the "postgres" admin user. Otherwise, remote access will be blocked for this user | `true` |
+| `auth.postgresPassword` | Password for the "postgres" admin user. Ignored if `auth.existingSecret` is provided | `""` |
+| `auth.username` | Name for a custom user to create | `""` |
+| `auth.password` | Password for the custom user to create. Ignored if `auth.existingSecret` is provided | `""` |
+| `auth.database` | Name for a custom database to create | `""` |
+| `auth.replicationUsername` | Name of the replication user | `repl_user` |
+| `auth.replicationPassword` | Password for the replication user. Ignored if `auth.existingSecret` is provided | `""` |
+| `auth.existingSecret` | Name of existing secret to use for PostgreSQL credentials. `auth.postgresPassword`, `auth.password`, and `auth.replicationPassword` will be ignored and picked up from this secret. The secret might also contains the key `ldap-password` if LDAP is enabled. `ldap.bind_password` will be ignored and picked from this secret in this case. | `""` |
+| `auth.secretKeys.adminPasswordKey` | Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set. | `postgres-password` |
+| `auth.secretKeys.userPasswordKey` | Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set. | `password` |
+| `auth.secretKeys.replicationPasswordKey` | Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set. | `replication-password` |
+| `auth.usePasswordFiles` | Mount credentials as a files instead of using an environment variable | `true` |
+| `architecture` | PostgreSQL architecture (`standalone` or `replication`) | `standalone` |
+| `replication.synchronousCommit` | Set synchronous commit mode. Allowed values: `on`, `remote_apply`, `remote_write`, `local` and `off` | `off` |
+| `replication.numSynchronousReplicas` | Number of replicas that will have synchronous replication. Note: Cannot be greater than `readReplicas.replicaCount`. | `0` |
+| `replication.applicationName` | Cluster application name. Useful for advanced replication settings | `my_application` |
+| `containerPorts.postgresql` | PostgreSQL container port | `5432` |
+| `audit.logHostname` | Log client hostnames | `false` |
+| `audit.logConnections` | Add client log-in operations to the log file | `false` |
+| `audit.logDisconnections` | Add client log-outs operations to the log file | `false` |
+| `audit.pgAuditLog` | Add operations to log using the pgAudit extension | `""` |
+| `audit.pgAuditLogCatalog` | Log catalog using pgAudit | `off` |
+| `audit.clientMinMessages` | Message log level to share with the user | `error` |
+| `audit.logLinePrefix` | Template for log line prefix (default if not set) | `""` |
+| `audit.logTimezone` | Timezone for the log timestamps | `""` |
+| `ldap.enabled` | Enable LDAP support | `false` |
+| `ldap.server` | IP address or name of the LDAP server. | `""` |
+| `ldap.port` | Port number on the LDAP server to connect to | `""` |
+| `ldap.prefix` | String to prepend to the user name when forming the DN to bind | `""` |
+| `ldap.suffix` | String to append to the user name when forming the DN to bind | `""` |
+| `ldap.basedn` | Root DN to begin the search for the user in | `""` |
+| `ldap.binddn` | DN of user to bind to LDAP | `""` |
+| `ldap.bindpw` | Password for the user to bind to LDAP | `""` |
+| `ldap.searchAttribute` | Attribute to match against the user name in the search | `""` |
+| `ldap.searchFilter` | The search filter to use when doing search+bind authentication | `""` |
+| `ldap.scheme` | Set to `ldaps` to use LDAPS | `""` |
+| `ldap.tls.enabled` | Se to true to enable TLS encryption | `false` |
+| `ldap.uri` | LDAP URL beginning in the form `ldap[s]://host[:port]/basedn`. If provided, all the other LDAP parameters will be ignored. | `""` |
+| `postgresqlDataDir` | PostgreSQL data dir folder | `/bitnami/postgresql/data` |
+| `postgresqlSharedPreloadLibraries` | Shared preload libraries (comma-separated list) | `pgaudit` |
+| `shmVolume.enabled` | Enable emptyDir volume for /dev/shm for PostgreSQL pod(s) | `true` |
+| `shmVolume.sizeLimit` | Set this to enable a size limit on the shm tmpfs | `""` |
+| `tls.enabled` | Enable TLS traffic support | `false` |
+| `tls.autoGenerated` | Generate automatically self-signed TLS certificates | `false` |
+| `tls.preferServerCiphers` | Whether to use the server's TLS cipher preferences rather than the client's | `true` |
+| `tls.certificatesSecret` | Name of an existing secret that contains the certificates | `""` |
+| `tls.certFilename` | Certificate filename | `""` |
+| `tls.certKeyFilename` | Certificate key filename | `""` |
+| `tls.certCAFilename` | CA Certificate filename | `""` |
+| `tls.crlFilename` | File containing a Certificate Revocation List | `""` |
+
+### PostgreSQL Primary parameters
+
+| Name | Description | Value |
+| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
+| `primary.name` | Name of the primary database (eg primary, master, leader, ...) | `primary` |
+| `primary.configuration` | PostgreSQL Primary main configuration to be injected as ConfigMap | `""` |
+| `primary.pgHbaConfiguration` | PostgreSQL Primary client authentication configuration | `""` |
+| `primary.existingConfigmap` | Name of an existing ConfigMap with PostgreSQL Primary configuration | `""` |
+| `primary.extendedConfiguration` | Extended PostgreSQL Primary configuration (appended to main or default configuration) | `""` |
+| `primary.existingExtendedConfigmap` | Name of an existing ConfigMap with PostgreSQL Primary extended configuration | `""` |
+| `primary.initdb.args` | PostgreSQL initdb extra arguments | `""` |
+| `primary.initdb.postgresqlWalDir` | Specify a custom location for the PostgreSQL transaction log | `""` |
+| `primary.initdb.scripts` | Dictionary of initdb scripts | `{}` |
+| `primary.initdb.scriptsConfigMap` | ConfigMap with scripts to be run at first boot | `""` |
+| `primary.initdb.scriptsSecret` | Secret with scripts to be run at first boot (in case it contains sensitive information) | `""` |
+| `primary.initdb.user` | Specify the PostgreSQL username to execute the initdb scripts | `""` |
+| `primary.initdb.password` | Specify the PostgreSQL password to execute the initdb scripts | `""` |
+| `primary.preInitDb.scripts` | Dictionary of pre-init scripts | `{}` |
+| `primary.preInitDb.scriptsConfigMap` | ConfigMap with pre-init scripts to be run | `""` |
+| `primary.preInitDb.scriptsSecret` | Secret with pre-init scripts to be run | `""` |
+| `primary.standby.enabled` | Whether to enable current cluster's primary as standby server of another cluster or not | `false` |
+| `primary.standby.primaryHost` | The Host of replication primary in the other cluster | `""` |
+| `primary.standby.primaryPort` | The Port of replication primary in the other cluster | `""` |
+| `primary.extraEnvVars` | Array with extra environment variables to add to PostgreSQL Primary nodes | `[]` |
+| `primary.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for PostgreSQL Primary nodes | `""` |
+| `primary.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for PostgreSQL Primary nodes | `""` |
+| `primary.command` | Override default container command (useful when using custom images) | `[]` |
+| `primary.args` | Override default container args (useful when using custom images) | `[]` |
+| `primary.livenessProbe.enabled` | Enable livenessProbe on PostgreSQL Primary containers | `true` |
+| `primary.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `30` |
+| `primary.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
+| `primary.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` |
+| `primary.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` |
+| `primary.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
+| `primary.readinessProbe.enabled` | Enable readinessProbe on PostgreSQL Primary containers | `true` |
+| `primary.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` |
+| `primary.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
+| `primary.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `5` |
+| `primary.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` |
+| `primary.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
+| `primary.startupProbe.enabled` | Enable startupProbe on PostgreSQL Primary containers | `false` |
+| `primary.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `30` |
+| `primary.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` |
+| `primary.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` |
+| `primary.startupProbe.failureThreshold` | Failure threshold for startupProbe | `15` |
+| `primary.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
+| `primary.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
+| `primary.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
+| `primary.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
+| `primary.lifecycleHooks` | for the PostgreSQL Primary container to automate configuration before or after startup | `{}` |
+| `primary.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if primary.resources is set (primary.resources is recommended for production). | `nano` |
+| `primary.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
+| `primary.fips.openssl` | Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used | `""` |
+| `primary.podSecurityContext.enabled` | Enable security context | `true` |
+| `primary.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` |
+| `primary.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` |
+| `primary.podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` |
+| `primary.podSecurityContext.fsGroup` | Group ID for the pod | `1001` |
+| `primary.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
+| `primary.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
+| `primary.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
+| `primary.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` |
+| `primary.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
+| `primary.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
+| `primary.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
+| `primary.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
+| `primary.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
+| `primary.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
+| `primary.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
+| `primary.hostAliases` | PostgreSQL primary pods host aliases | `[]` |
+| `primary.hostNetwork` | Specify if host network should be enabled for PostgreSQL pod (postgresql primary) | `false` |
+| `primary.hostIPC` | Specify if host IPC should be enabled for PostgreSQL pod (postgresql primary) | `false` |
+| `primary.labels` | Map of labels to add to the statefulset (postgresql primary) | `{}` |
+| `primary.annotations` | Annotations for PostgreSQL primary pods | `{}` |
+| `primary.podLabels` | Map of labels to add to the pods (postgresql primary) | `{}` |
+| `primary.podAnnotations` | Map of annotations to add to the pods (postgresql primary) | `{}` |
+| `primary.podAffinityPreset` | PostgreSQL primary pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `""` |
+| `primary.podAntiAffinityPreset` | PostgreSQL primary pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
+| `primary.nodeAffinityPreset.type` | PostgreSQL primary node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `""` |
+| `primary.nodeAffinityPreset.key` | PostgreSQL primary node label key to match Ignored if `primary.affinity` is set. | `""` |
+| `primary.nodeAffinityPreset.values` | PostgreSQL primary node label values to match. Ignored if `primary.affinity` is set. | `[]` |
+| `primary.affinity` | Affinity for PostgreSQL primary pods assignment | `{}` |
+| `primary.nodeSelector` | Node labels for PostgreSQL primary pods assignment | `{}` |
+| `primary.tolerations` | Tolerations for PostgreSQL primary pods assignment | `[]` |
+| `primary.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` |
+| `primary.priorityClassName` | Priority Class to use for each pod (postgresql primary) | `""` |
+| `primary.schedulerName` | Use an alternate scheduler, e.g. "stork". | `""` |
+| `primary.terminationGracePeriodSeconds` | Seconds PostgreSQL primary pod needs to terminate gracefully | `""` |
+| `primary.updateStrategy.type` | PostgreSQL Primary statefulset strategy type | `RollingUpdate` |
+| `primary.updateStrategy.rollingUpdate` | PostgreSQL Primary statefulset rolling update configuration parameters | `{}` |
+| `primary.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the PostgreSQL Primary container(s) | `[]` |
+| `primary.extraVolumes` | Optionally specify extra list of additional volumes for the PostgreSQL Primary pod(s) | `[]` |
+| `primary.sidecars` | Add additional sidecar containers to the PostgreSQL Primary pod(s) | `[]` |
+| `primary.initContainers` | Add additional init containers to the PostgreSQL Primary pod(s) | `[]` |
+| `primary.pdb.create` | Enable/disable a Pod Disruption Budget creation | `true` |
+| `primary.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `""` |
+| `primary.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `primary.pdb.minAvailable` and `primary.pdb.maxUnavailable` are empty. | `""` |
+| `primary.extraPodSpec` | Optionally specify extra PodSpec for the PostgreSQL Primary pod(s) | `{}` |
+| `primary.networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `true` |
+| `primary.networkPolicy.allowExternal` | Don't require server label for connections | `true` |
+| `primary.networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` |
+| `primary.networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` |
+| `primary.networkPolicy.extraEgress` | Add extra ingress rules to the NetworkPolicy | `[]` |
+| `primary.networkPolicy.ingressNSMatchLabels` | Labels to match to allow traffic from other namespaces | `{}` |
+| `primary.networkPolicy.ingressNSPodMatchLabels` | Pod labels to match to allow traffic from other namespaces | `{}` |
+| `primary.service.type` | Kubernetes Service type | `ClusterIP` |
+| `primary.service.ports.postgresql` | PostgreSQL service port | `5432` |
+| `primary.service.nodePorts.postgresql` | Node port for PostgreSQL | `""` |
+| `primary.service.clusterIP` | Static clusterIP or None for headless services | `""` |
+| `primary.service.labels` | Map of labels to add to the primary service | `{}` |
+| `primary.service.annotations` | Annotations for PostgreSQL primary service | `{}` |
+| `primary.service.loadBalancerClass` | Load balancer class if service type is `LoadBalancer` | `""` |
+| `primary.service.loadBalancerIP` | Load balancer IP if service type is `LoadBalancer` | `""` |
+| `primary.service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
+| `primary.service.loadBalancerSourceRanges` | Addresses that are allowed when service is LoadBalancer | `[]` |
+| `primary.service.extraPorts` | Extra ports to expose in the PostgreSQL primary service | `[]` |
+| `primary.service.sessionAffinity` | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | `None` |
+| `primary.service.sessionAffinityConfig` | Additional settings for the sessionAffinity. Ignored if `primary.service.sessionAffinity` is `None` | `{}` |
+| `primary.service.headless.annotations` | Additional custom annotations for headless PostgreSQL primary service | `{}` |
+| `primary.persistence.enabled` | Enable PostgreSQL Primary data persistence using PVC | `true` |
+| `primary.persistence.volumeName` | Name to assign the volume | `data` |
+| `primary.persistence.existingClaim` | Name of an existing PVC to use | `""` |
+| `primary.persistence.mountPath` | The path the volume will be mounted at | `/bitnami/postgresql` |
+| `primary.persistence.subPath` | The subdirectory of the volume to mount to | `""` |
+| `primary.persistence.storageClass` | PVC Storage Class for PostgreSQL Primary data volume | `""` |
+| `primary.persistence.accessModes` | PVC Access Mode for PostgreSQL volume | `["ReadWriteOnce"]` |
+| `primary.persistence.size` | PVC Storage Request for PostgreSQL volume | `8Gi` |
+| `primary.persistence.annotations` | Annotations for the PVC | `{}` |
+| `primary.persistence.labels` | Labels for the PVC | `{}` |
+| `primary.persistence.selector` | Selector to match an existing Persistent Volume (this value is evaluated as a template) | `{}` |
+| `primary.persistence.dataSource` | Custom PVC data source | `{}` |
+| `primary.persistentVolumeClaimRetentionPolicy.enabled` | Enable Persistent volume retention policy for Primary Statefulset | `false` |
+| `primary.persistentVolumeClaimRetentionPolicy.whenScaled` | Volume retention behavior when the replica count of the StatefulSet is reduced | `Retain` |
+| `primary.persistentVolumeClaimRetentionPolicy.whenDeleted` | Volume retention behavior that applies when the StatefulSet is deleted | `Retain` |
+
+### PostgreSQL read only replica parameters (only used when `architecture` is set to `replication`)
+
+| Name | Description | Value |
+| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
+| `readReplicas.name` | Name of the read replicas database (eg secondary, slave, ...) | `read` |
+| `readReplicas.replicaCount` | Number of PostgreSQL read only replicas | `1` |
+| `readReplicas.extendedConfiguration` | Extended PostgreSQL read only replicas configuration (appended to main or default configuration) | `""` |
+| `readReplicas.extraEnvVars` | Array with extra environment variables to add to PostgreSQL read only nodes | `[]` |
+| `readReplicas.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for PostgreSQL read only nodes | `""` |
+| `readReplicas.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for PostgreSQL read only nodes | `""` |
+| `readReplicas.command` | Override default container command (useful when using custom images) | `[]` |
+| `readReplicas.args` | Override default container args (useful when using custom images) | `[]` |
+| `readReplicas.livenessProbe.enabled` | Enable livenessProbe on PostgreSQL read only containers | `true` |
+| `readReplicas.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `30` |
+| `readReplicas.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
+| `readReplicas.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` |
+| `readReplicas.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` |
+| `readReplicas.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
+| `readReplicas.readinessProbe.enabled` | Enable readinessProbe on PostgreSQL read only containers | `true` |
+| `readReplicas.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` |
+| `readReplicas.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
+| `readReplicas.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `5` |
+| `readReplicas.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` |
+| `readReplicas.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
+| `readReplicas.startupProbe.enabled` | Enable startupProbe on PostgreSQL read only containers | `false` |
+| `readReplicas.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `30` |
+| `readReplicas.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` |
+| `readReplicas.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` |
+| `readReplicas.startupProbe.failureThreshold` | Failure threshold for startupProbe | `15` |
+| `readReplicas.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
+| `readReplicas.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
+| `readReplicas.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
+| `readReplicas.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
+| `readReplicas.lifecycleHooks` | for the PostgreSQL read only container to automate configuration before or after startup | `{}` |
+| `readReplicas.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if readReplicas.resources is set (readReplicas.resources is recommended for production). | `nano` |
+| `readReplicas.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
+| `readReplicas.fips.openssl` | Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used | `""` |
+| `readReplicas.podSecurityContext.enabled` | Enable security context | `true` |
+| `readReplicas.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` |
+| `readReplicas.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` |
+| `readReplicas.podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` |
+| `readReplicas.podSecurityContext.fsGroup` | Group ID for the pod | `1001` |
+| `readReplicas.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
+| `readReplicas.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
+| `readReplicas.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
+| `readReplicas.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` |
+| `readReplicas.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
+| `readReplicas.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
+| `readReplicas.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
+| `readReplicas.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
+| `readReplicas.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
+| `readReplicas.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
+| `readReplicas.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
+| `readReplicas.hostAliases` | PostgreSQL read only pods host aliases | `[]` |
+| `readReplicas.hostNetwork` | Specify if host network should be enabled for PostgreSQL pod (PostgreSQL read only) | `false` |
+| `readReplicas.hostIPC` | Specify if host IPC should be enabled for PostgreSQL pod (postgresql primary) | `false` |
+| `readReplicas.labels` | Map of labels to add to the statefulset (PostgreSQL read only) | `{}` |
+| `readReplicas.annotations` | Annotations for PostgreSQL read only pods | `{}` |
+| `readReplicas.podLabels` | Map of labels to add to the pods (PostgreSQL read only) | `{}` |
+| `readReplicas.podAnnotations` | Map of annotations to add to the pods (PostgreSQL read only) | `{}` |
+| `readReplicas.podAffinityPreset` | PostgreSQL read only pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `""` |
+| `readReplicas.podAntiAffinityPreset` | PostgreSQL read only pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
+| `readReplicas.nodeAffinityPreset.type` | PostgreSQL read only node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `""` |
+| `readReplicas.nodeAffinityPreset.key` | PostgreSQL read only node label key to match Ignored if `primary.affinity` is set. | `""` |
+| `readReplicas.nodeAffinityPreset.values` | PostgreSQL read only node label values to match. Ignored if `primary.affinity` is set. | `[]` |
+| `readReplicas.affinity` | Affinity for PostgreSQL read only pods assignment | `{}` |
+| `readReplicas.nodeSelector` | Node labels for PostgreSQL read only pods assignment | `{}` |
+| `readReplicas.tolerations` | Tolerations for PostgreSQL read only pods assignment | `[]` |
+| `readReplicas.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` |
+| `readReplicas.priorityClassName` | Priority Class to use for each pod (PostgreSQL read only) | `""` |
+| `readReplicas.schedulerName` | Use an alternate scheduler, e.g. "stork". | `""` |
+| `readReplicas.terminationGracePeriodSeconds` | Seconds PostgreSQL read only pod needs to terminate gracefully | `""` |
+| `readReplicas.updateStrategy.type` | PostgreSQL read only statefulset strategy type | `RollingUpdate` |
+| `readReplicas.updateStrategy.rollingUpdate` | PostgreSQL read only statefulset rolling update configuration parameters | `{}` |
+| `readReplicas.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the PostgreSQL read only container(s) | `[]` |
+| `readReplicas.extraVolumes` | Optionally specify extra list of additional volumes for the PostgreSQL read only pod(s) | `[]` |
+| `readReplicas.sidecars` | Add additional sidecar containers to the PostgreSQL read only pod(s) | `[]` |
+| `readReplicas.initContainers` | Add additional init containers to the PostgreSQL read only pod(s) | `[]` |
+| `readReplicas.pdb.create` | Enable/disable a Pod Disruption Budget creation | `true` |
+| `readReplicas.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `""` |
+| `readReplicas.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `readReplicas.pdb.minAvailable` and `readReplicas.pdb.maxUnavailable` are empty. | `""` |
+| `readReplicas.extraPodSpec` | Optionally specify extra PodSpec for the PostgreSQL read only pod(s) | `{}` |
+| `readReplicas.networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `true` |
+| `readReplicas.networkPolicy.allowExternal` | Don't require server label for connections | `true` |
+| `readReplicas.networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` |
+| `readReplicas.networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` |
+| `readReplicas.networkPolicy.extraEgress` | Add extra ingress rules to the NetworkPolicy | `[]` |
+| `readReplicas.networkPolicy.ingressNSMatchLabels` | Labels to match to allow traffic from other namespaces | `{}` |
+| `readReplicas.networkPolicy.ingressNSPodMatchLabels` | Pod labels to match to allow traffic from other namespaces | `{}` |
+| `readReplicas.service.type` | Kubernetes Service type | `ClusterIP` |
+| `readReplicas.service.ports.postgresql` | PostgreSQL service port | `5432` |
+| `readReplicas.service.nodePorts.postgresql` | Node port for PostgreSQL | `""` |
+| `readReplicas.service.clusterIP` | Static clusterIP or None for headless services | `""` |
+| `readReplicas.service.labels` | Map of labels to add to the read service | `{}` |
+| `readReplicas.service.annotations` | Annotations for PostgreSQL read only service | `{}` |
+| `readReplicas.service.loadBalancerClass` | Load balancer class if service type is `LoadBalancer` | `""` |
+| `readReplicas.service.loadBalancerIP` | Load balancer IP if service type is `LoadBalancer` | `""` |
+| `readReplicas.service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
+| `readReplicas.service.loadBalancerSourceRanges` | Addresses that are allowed when service is LoadBalancer | `[]` |
+| `readReplicas.service.extraPorts` | Extra ports to expose in the PostgreSQL read only service | `[]` |
+| `readReplicas.service.sessionAffinity` | Session Affinity for Kubernetes service, can be "None" or "ClientIP" | `None` |
+| `readReplicas.service.sessionAffinityConfig` | Additional settings for the sessionAffinity. Ignored if `readReplicas.service.sessionAffinity` is `None` | `{}` |
+| `readReplicas.service.headless.annotations` | Additional custom annotations for headless PostgreSQL read only service | `{}` |
+| `readReplicas.persistence.enabled` | Enable PostgreSQL read only data persistence using PVC | `true` |
+| `readReplicas.persistence.existingClaim` | Name of an existing PVC to use | `""` |
+| `readReplicas.persistence.mountPath` | The path the volume will be mounted at | `/bitnami/postgresql` |
+| `readReplicas.persistence.subPath` | The subdirectory of the volume to mount to | `""` |
+| `readReplicas.persistence.storageClass` | PVC Storage Class for PostgreSQL read only data volume | `""` |
+| `readReplicas.persistence.accessModes` | PVC Access Mode for PostgreSQL volume | `["ReadWriteOnce"]` |
+| `readReplicas.persistence.size` | PVC Storage Request for PostgreSQL volume | `8Gi` |
+| `readReplicas.persistence.annotations` | Annotations for the PVC | `{}` |
+| `readReplicas.persistence.labels` | Labels for the PVC | `{}` |
+| `readReplicas.persistence.selector` | Selector to match an existing Persistent Volume (this value is evaluated as a template) | `{}` |
+| `readReplicas.persistence.dataSource` | Custom PVC data source | `{}` |
+| `readReplicas.persistentVolumeClaimRetentionPolicy.enabled` | Enable Persistent volume retention policy for read only Statefulset | `false` |
+| `readReplicas.persistentVolumeClaimRetentionPolicy.whenScaled` | Volume retention behavior when the replica count of the StatefulSet is reduced | `Retain` |
+| `readReplicas.persistentVolumeClaimRetentionPolicy.whenDeleted` | Volume retention behavior that applies when the StatefulSet is deleted | `Retain` |
+
+### Backup parameters
+
+| Name | Description | Value |
+| ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `backup.enabled` | Enable the logical dump of the database "regularly" | `false` |
+| `backup.cronjob.schedule` | Set the cronjob parameter schedule | `@daily` |
+| `backup.cronjob.timeZone` | Set the cronjob parameter timeZone | `""` |
+| `backup.cronjob.concurrencyPolicy` | Set the cronjob parameter concurrencyPolicy | `Allow` |
+| `backup.cronjob.failedJobsHistoryLimit` | Set the cronjob parameter failedJobsHistoryLimit | `1` |
+| `backup.cronjob.successfulJobsHistoryLimit` | Set the cronjob parameter successfulJobsHistoryLimit | `3` |
+| `backup.cronjob.startingDeadlineSeconds` | Set the cronjob parameter startingDeadlineSeconds | `""` |
+| `backup.cronjob.ttlSecondsAfterFinished` | Set the cronjob parameter ttlSecondsAfterFinished | `""` |
+| `backup.cronjob.restartPolicy` | Set the cronjob parameter restartPolicy | `OnFailure` |
+| `backup.cronjob.podSecurityContext.enabled` | Enable PodSecurityContext for CronJob/Backup | `true` |
+| `backup.cronjob.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` |
+| `backup.cronjob.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` |
+| `backup.cronjob.podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` |
+| `backup.cronjob.podSecurityContext.fsGroup` | Group ID for the CronJob | `1001` |
+| `backup.cronjob.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
+| `backup.cronjob.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
+| `backup.cronjob.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
+| `backup.cronjob.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` |
+| `backup.cronjob.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
+| `backup.cronjob.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
+| `backup.cronjob.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
+| `backup.cronjob.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
+| `backup.cronjob.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
+| `backup.cronjob.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
+| `backup.cronjob.command` | Set backup container's command to run | `["/bin/bash","-c","PGPASSWORD=\"${PGPASSWORD:-$(< \"$PGPASSWORD_FILE\")}\" pg_dumpall --clean --if-exists --load-via-partition-root --quote-all-identifiers --no-password --file=\"${PGDUMP_DIR}/pg_dumpall-$(date '+%Y-%m-%d-%H-%M').pgdump\""]` |
+| `backup.cronjob.labels` | Set the cronjob labels | `{}` |
+| `backup.cronjob.annotations` | Set the cronjob annotations | `{}` |
+| `backup.cronjob.nodeSelector` | Node labels for PostgreSQL backup CronJob pod assignment | `{}` |
+| `backup.cronjob.tolerations` | Tolerations for PostgreSQL backup CronJob pods assignment | `[]` |
+| `backup.cronjob.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if backup.cronjob.resources is set (backup.cronjob.resources is recommended for production). | `nano` |
+| `backup.cronjob.resources` | Set container requests and limits for different resources like CPU or memory | `{}` |
+| `backup.cronjob.fips.openssl` | Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used | `""` |
+| `backup.cronjob.networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `true` |
+| `backup.cronjob.storage.enabled` | Enable using a `PersistentVolumeClaim` as backup data volume | `true` |
+| `backup.cronjob.storage.existingClaim` | Provide an existing `PersistentVolumeClaim` (only when `architecture=standalone`) | `""` |
+| `backup.cronjob.storage.resourcePolicy` | Setting it to "keep" to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deleted | `""` |
+| `backup.cronjob.storage.storageClass` | PVC Storage Class for the backup data volume | `""` |
+| `backup.cronjob.storage.accessModes` | PV Access Mode | `["ReadWriteOnce"]` |
+| `backup.cronjob.storage.size` | PVC Storage Request for the backup data volume | `8Gi` |
+| `backup.cronjob.storage.annotations` | PVC annotations | `{}` |
+| `backup.cronjob.storage.mountPath` | Path to mount the volume at | `/backup/pgdump` |
+| `backup.cronjob.storage.subPath` | Subdirectory of the volume to mount at | `""` |
+| `backup.cronjob.storage.volumeClaimTemplates.selector` | A label query over volumes to consider for binding (e.g. when using local volumes) | `{}` |
+| `backup.cronjob.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the backup container | `[]` |
+| `backup.cronjob.extraVolumes` | Optionally specify extra list of additional volumes for the backup container | `[]` |
+
+### Password update job
+
+| Name | Description | Value |
+| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
+| `passwordUpdateJob.enabled` | Enable password update job | `false` |
+| `passwordUpdateJob.backoffLimit` | set backoff limit of the job | `10` |
+| `passwordUpdateJob.command` | Override default container command on mysql Primary container(s) (useful when using custom images) | `[]` |
+| `passwordUpdateJob.args` | Override default container args on mysql Primary container(s) (useful when using custom images) | `[]` |
+| `passwordUpdateJob.extraCommands` | Extra commands to pass to the generation job | `""` |
+| `passwordUpdateJob.previousPasswords.postgresPassword` | Previous postgres password (set if the password secret was already changed) | `""` |
+| `passwordUpdateJob.previousPasswords.password` | Previous password (set if the password secret was already changed) | `""` |
+| `passwordUpdateJob.previousPasswords.replicationPassword` | Previous replication password (set if the password secret was already changed) | `""` |
+| `passwordUpdateJob.previousPasswords.existingSecret` | Name of a secret containing the previous passwords (set if the password secret was already changed) | `""` |
+| `passwordUpdateJob.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
+| `passwordUpdateJob.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
+| `passwordUpdateJob.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
+| `passwordUpdateJob.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` |
+| `passwordUpdateJob.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
+| `passwordUpdateJob.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
+| `passwordUpdateJob.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
+| `passwordUpdateJob.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
+| `passwordUpdateJob.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
+| `passwordUpdateJob.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
+| `passwordUpdateJob.podSecurityContext.enabled` | Enabled credential init job pods' Security Context | `true` |
+| `passwordUpdateJob.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` |
+| `passwordUpdateJob.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` |
+| `passwordUpdateJob.podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` |
+| `passwordUpdateJob.podSecurityContext.fsGroup` | Set credential init job pod's Security Context fsGroup | `1001` |
+| `passwordUpdateJob.extraEnvVars` | Array containing extra env vars to configure the credential init job | `[]` |
+| `passwordUpdateJob.extraEnvVarsCM` | ConfigMap containing extra env vars to configure the credential init job | `""` |
+| `passwordUpdateJob.extraEnvVarsSecret` | Secret containing extra env vars to configure the credential init job (in case of sensitive data) | `""` |
+| `passwordUpdateJob.extraVolumes` | Optionally specify extra list of additional volumes for the credential init job | `[]` |
+| `passwordUpdateJob.extraVolumeMounts` | Array of extra volume mounts to be added to the jwt Container (evaluated as template). Normally used with `extraVolumes`. | `[]` |
+| `passwordUpdateJob.initContainers` | Add additional init containers for the mysql Primary pod(s) | `[]` |
+| `passwordUpdateJob.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if passwordUpdateJob.resources is set (passwordUpdateJob.resources is recommended for production). | `micro` |
+| `passwordUpdateJob.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
+| `passwordUpdateJob.fips.openssl` | Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used | `""` |
+| `passwordUpdateJob.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
+| `passwordUpdateJob.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
+| `passwordUpdateJob.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
+| `passwordUpdateJob.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
+| `passwordUpdateJob.hostAliases` | Add deployment host aliases | `[]` |
+| `passwordUpdateJob.annotations` | Add annotations to the job | `{}` |
+| `passwordUpdateJob.podLabels` | Additional pod labels | `{}` |
+| `passwordUpdateJob.podAnnotations` | Additional pod annotations | `{}` |
+
+### Volume Permissions parameters
+
+| Name | Description | Value |
+| ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
+| `volumePermissions.enabled` | Enable init container that changes the owner and group of the persistent volume | `false` |
+| `volumePermissions.image.registry` | Init container volume-permissions image registry | `REGISTRY_NAME` |
+| `volumePermissions.image.repository` | Init container volume-permissions image repository | `REPOSITORY_NAME/os-shell` |
+| `volumePermissions.image.digest` | Init container volume-permissions image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
+| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `IfNotPresent` |
+| `volumePermissions.image.pullSecrets` | Init container volume-permissions image pull secrets | `[]` |
+| `volumePermissions.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if volumePermissions.resources is set (volumePermissions.resources is recommended for production). | `nano` |
+| `volumePermissions.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
+| `volumePermissions.fips.openssl` | Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used | `""` |
+| `volumePermissions.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
+| `volumePermissions.containerSecurityContext.runAsUser` | User ID for the init container | `0` |
+| `volumePermissions.containerSecurityContext.runAsGroup` | Group ID for the init container | `0` |
+| `volumePermissions.containerSecurityContext.runAsNonRoot` | runAsNonRoot for the init container | `false` |
+| `volumePermissions.containerSecurityContext.seccompProfile.type` | seccompProfile.type for the init container | `RuntimeDefault` |
+
+### Other Parameters
+
+| Name | Description | Value |
+| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
+| `serviceBindings.enabled` | Create secret for service binding (Experimental) | `false` |
+| `serviceAccount.create` | Enable creation of ServiceAccount for PostgreSQL pod | `true` |
+| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
+| `serviceAccount.automountServiceAccountToken` | Allows auto mount of ServiceAccountToken on the serviceAccount created | `false` |
+| `serviceAccount.annotations` | Additional custom annotations for the ServiceAccount | `{}` |
+| `rbac.create` | Create Role and RoleBinding (required for PSP to work) | `false` |
+| `rbac.rules` | Custom RBAC rules to set | `[]` |
+| `psp.create` | Whether to create a PodSecurityPolicy. WARNING: PodSecurityPolicy is deprecated in Kubernetes v1.21 or later, unavailable in v1.25 or later | `false` |
+
+### Metrics Parameters
+
+| Name | Description | Value |
+| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
+| `metrics.enabled` | Start a prometheus exporter | `false` |
+| `metrics.image.registry` | PostgreSQL Prometheus Exporter image registry | `REGISTRY_NAME` |
+| `metrics.image.repository` | PostgreSQL Prometheus Exporter image repository | `REPOSITORY_NAME/postgres-exporter` |
+| `metrics.image.digest` | PostgreSQL image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
+| `metrics.image.pullPolicy` | PostgreSQL Prometheus Exporter image pull policy | `IfNotPresent` |
+| `metrics.image.pullSecrets` | Specify image pull secrets | `[]` |
+| `metrics.collectors` | Control enabled collectors | `{}` |
+| `metrics.customMetrics` | Define additional custom metrics | `{}` |
+| `metrics.extraEnvVars` | Extra environment variables to add to PostgreSQL Prometheus exporter | `[]` |
+| `metrics.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
+| `metrics.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
+| `metrics.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
+| `metrics.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` |
+| `metrics.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
+| `metrics.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
+| `metrics.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
+| `metrics.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
+| `metrics.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
+| `metrics.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
+| `metrics.livenessProbe.enabled` | Enable livenessProbe on PostgreSQL Prometheus exporter containers | `true` |
+| `metrics.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `5` |
+| `metrics.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
+| `metrics.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` |
+| `metrics.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` |
+| `metrics.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
+| `metrics.readinessProbe.enabled` | Enable readinessProbe on PostgreSQL Prometheus exporter containers | `true` |
+| `metrics.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` |
+| `metrics.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
+| `metrics.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `5` |
+| `metrics.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` |
+| `metrics.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
+| `metrics.startupProbe.enabled` | Enable startupProbe on PostgreSQL Prometheus exporter containers | `false` |
+| `metrics.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `10` |
+| `metrics.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` |
+| `metrics.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` |
+| `metrics.startupProbe.failureThreshold` | Failure threshold for startupProbe | `15` |
+| `metrics.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
+| `metrics.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
+| `metrics.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
+| `metrics.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
+| `metrics.containerPorts.metrics` | PostgreSQL Prometheus exporter metrics container port | `9187` |
+| `metrics.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if metrics.resources is set (metrics.resources is recommended for production). | `nano` |
+| `metrics.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
+| `metrics.fips.openssl` | Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used | `""` |
+| `metrics.fips.golang` | Configure Golang FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used | `relaxed` |
+| `metrics.service.ports.metrics` | PostgreSQL Prometheus Exporter service port | `9187` |
+| `metrics.service.clusterIP` | Static clusterIP or None for headless services | `""` |
+| `metrics.service.sessionAffinity` | Control where client requests go, to the same pod or round-robin. Allowed values: `ClientIP` or `None` | `None` |
+| `metrics.service.annotations` | Annotations for Prometheus to auto-discover the metrics endpoint | `{}` |
+| `metrics.serviceMonitor.enabled` | Create ServiceMonitor Resource for scraping metrics using Prometheus Operator | `false` |
+| `metrics.serviceMonitor.namespace` | Namespace for the ServiceMonitor Resource (defaults to the Release Namespace) | `""` |
+| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `""` |
+| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `""` |
+| `metrics.serviceMonitor.labels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}` |
+| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
+| `metrics.serviceMonitor.relabelings` | RelabelConfigs to apply to samples before scraping | `[]` |
+| `metrics.serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion | `[]` |
+| `metrics.serviceMonitor.honorLabels` | Specify honorLabels parameter to add the scrape endpoint | `false` |
+| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in prometheus. | `""` |
+| `metrics.prometheusRule.enabled` | Create a PrometheusRule for Prometheus Operator | `false` |
+| `metrics.prometheusRule.namespace` | Namespace for the PrometheusRule Resource (defaults to the Release Namespace) | `""` |
+| `metrics.prometheusRule.labels` | Additional labels that can be used so PrometheusRule will be discovered by Prometheus | `{}` |
+| `metrics.prometheusRule.rules` | PrometheusRule definitions | `[]` |
+
+Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
+
+```console
+helm install my-release \
+ --set auth.postgresPassword=secretpassword
+ oci://REGISTRY_NAME/REPOSITORY_NAME/postgresql
+```
+
+> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
+
+The above command sets the PostgreSQL `postgres` account password to `secretpassword`.
+
+> NOTE: Once this chart is deployed, it is not possible to change the application's access credentials, such as usernames or passwords, using Helm. To change these application credentials after deployment, delete any persistent volumes (PVs) used by the chart and re-deploy it, or use the application's built-in administrative tools if available.
+> **Warning** Setting a password will be ignored on new installation in case when previous PostgreSQL release was deleted through the helm command. In that case, old PVC will have an old password, and setting it through helm won't take effect. Deleting persistent volumes (PVs) will solve the issue. Refer to [issue 2061](https://github.com/bitnami/charts/issues/2061) for more details
+
+Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
+
+```console
+helm install my-release -f values.yaml oci://REGISTRY_NAME/REPOSITORY_NAME/postgresql
+```
+
+> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
+> **Tip**: You can use the default [values.yaml](https://github.com/bitnami/charts/tree/main/bitnami/postgresql/values.yaml)
+
+## Troubleshooting
+
+Find more information about how to deal with common errors related to Bitnami's Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues).
+
+## Upgrading
+
+### To 16.3.0
+
+This version introduces image verification for security purposes. To disable it, set `global.security.allowInsecureImages` to `true`. More details at [GitHub issue](https://github.com/bitnami/charts/issues/30850).
+
+### To 15.0.0
+
+This major bump changes the following security defaults:
+
+- `runAsGroup` is changed from `0` to `1001`
+- `readOnlyRootFilesystem` is set to `true`
+- `resourcesPreset` is changed from `none` to the minimum size working in our test suites (NOTE: `resourcesPreset` is not meant for production usage, but `resources` adapted to your use case).
+- `global.compatibility.openshift.adaptSecurityContext` is changed from `disabled` to `auto`.
+
+This could potentially break any customization or init scripts used in your deployment. If this is the case, change the default values to the previous ones.
+
+### To 14.0.0
+
+This major version adapts the NetworkPolicy objects to the most recent Bitnami standards. Now there is a separate object for `primary` and for `readReplicas`, being located in their corresponding sections. It is also enabled by default in other to comply with the best security standards.
+
+Check the parameter section for the new value structure.
+
+### To 13.0.0
+
+This major version changes the default PostgreSQL image from 15.x to 16.x. Follow the [official instructions](https://www.postgresql.org/docs/16/upgrading.html) to upgrade to 16.x.
+
+### To 12.0.0
+
+This major version changes the default PostgreSQL image from 14.x to 15.x. Follow the [official instructions](https://www.postgresql.org/docs/15/upgrading.html) to upgrade to 15.x.
+
+### To 11.0.0
+
+In this version the application version was bumped to _14.x_ series. Also, this major release renames several values in this chart and adds missing features, in order to be inline with the rest of assets in the Bitnami charts repository.
+
+- _replication.enabled_ parameter is deprecated in favor of _architecture_ parameter that accepts two values: _standalone_ and _replication_.
+- _replication.singleService_ and _replication.uniqueServices_ parameters are deprecated. When using replication, each statefulset (primary and read-only) has its own headless service & service allowing to connect to read-only replicas through the service (round-robin) or individually.
+- _postgresqlPostgresPassword_, _postgresqlUsername_, _postgresqlPassword_, _postgresqlDatabase_, _replication.user_, _replication.password_, and _existingSecret_ parameters have been regrouped under the _auth_ map. The _auth_ map uses a new perspective to configure authentication, so please read carefully each sub-parameter description.
+- _extraEnv_ has been deprecated in favor of _primary.extraEnvVars_ and _readReplicas.extraEnvVars_.
+- _postgresqlConfiguration_, _pgHbaConfiguration_, _configurationConfigMap_, _postgresqlExtendedConf_, and _extendedConfConfigMap_ have been deprecated in favor of _primary.configuration_, _primary.pgHbaConfiguration_, _primary.existingConfigmap_, _primary.extendedConfiguration_, and _primary.existingExtendedConfigmap_.
+- _postgresqlInitdbArgs_, _postgresqlInitdbWalDir_, _initdbScripts_, _initdbScriptsConfigMap_, _initdbScriptsSecret_, _initdbUser_ and _initdbPassword_ have been regrouped under the _primary.initdb_ map.
+- _postgresqlMaxConnections_, _postgresqlPostgresConnectionLimit_, _postgresqlDbUserConnectionLimit_, _postgresqlTcpKeepalivesInterval_, _postgresqlTcpKeepalivesIdle_, _postgresqlTcpKeepalivesCount_, _postgresqlStatementTimeout_ and _postgresqlPghbaRemoveFilters_ parameters are deprecated. Use _XXX.extraEnvVars_ instead.
+- _primaryAsStandBy_ has been deprecated in favor of _primary.standby_.
+- _securityContext_ and _containerSecurityContext_ have been deprecated in favor of _primary.podSecurityContext_, _primary.containerSecurityContext_, _readReplicas.podSecurityContext_, and _readReplicas.containerSecurityContext_.
+- _livenessProbe_ and _readinessProbe_ maps have been deprecated in favor of _primary.livenessProbe_, _primary.readinessProbe_, _readReplicas.livenessProbe_ and _readReplicas.readinessProbe_ maps.
+- _persistence_ map has been deprecated in favor of _primary.persistence_ and _readReplicas.persistence_ maps.
+- _networkPolicy_ map has been completely refactored.
+- _service_ map has been deprecated in favor of _primary.service_ and _readReplicas.service_ maps.
+- _metrics.service.port_ has been regrouped under the _metrics.service.ports_ map.
+- _serviceAccount.enabled_ and _serviceAccount.autoMount_ have been deprecated in favor of _serviceAccount.create_ and _serviceAccount.automountServiceAccountToken_.
+
+#### How to upgrade to version 11.0.0
+
+To upgrade to _11.0.0_ from _10.x_, it should be done reusing the PVC(s) used to hold the PostgreSQL data on your previous release. To do so, follow the instructions below (the following example assumes that the release name is _postgresql_):
+
+> NOTE: Please, create a backup of your database before running any of these actions.
+
+1. Obtain the credentials and the names of the PVCs used to hold the PostgreSQL data on your current release:
+
+```console
+export POSTGRESQL_PASSWORD=$(kubectl get secret --namespace default postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)
+export POSTGRESQL_PVC=$(kubectl get pvc -l app.kubernetes.io/instance=postgresql,role=primary -o jsonpath="{.items[0].metadata.name}")
+```
+
+1. Delete the PostgreSQL statefulset (notice the option _--cascade=false_) and secret:
+
+```console
+kubectl delete statefulsets.apps postgresql-postgresql --namespace default --cascade=false
+kubectl delete secret postgresql --namespace default
+```
+
+1. Upgrade your release using the same PostgreSQL version:
+
+```console
+CURRENT_VERSION=$(kubectl exec postgresql-postgresql-0 -- bash -c 'echo $BITNAMI_IMAGE_VERSION')
+helm upgrade postgresql bitnami/postgresql \
+ --set auth.postgresPassword=$POSTGRESQL_PASSWORD \
+ --set primary.persistence.existingClaim=$POSTGRESQL_PVC \
+ --set image.tag=$CURRENT_VERSION
+```
+
+1. You will have to delete the existing PostgreSQL pod and the new statefulset is going to create a new one
+
+```console
+kubectl delete pod postgresql-postgresql-0
+```
+
+1. Finally, you should see the lines below in PostgreSQL container logs:
+
+```text
+$ kubectl logs $(kubectl get pods -l app.kubernetes.io/instance=postgresql,app.kubernetes.io/name=postgresql,app.kubernetes.io/component=primary -o jsonpath="{.items[0].metadata.name}")
+...
+postgresql 08:05:12.59 INFO ==> Deploying PostgreSQL with persisted data...
+...
+```
+
+> NOTE: the instructions above reuse the same PostgreSQL version you were using in your chart release. Otherwise, you will find an error such as the one below when upgrading since the new chart major version also bumps the application version. To workaround this issue you need to upgrade database, please refer to the [official PostgreSQL documentation](https://www.postgresql.org/docs/current/upgrading.html) for more information about this.
+
+```console
+$ kubectl logs $(kubectl get pods -l app.kubernetes.io/instance=postgresql,app.kubernetes.io/name=postgresql,app.kubernetes.io/component=primary -o jsonpath="{.items[0].metadata.name}")
+ ...
+postgresql 08:10:14.72 INFO ==> ** Starting PostgreSQL **
+2022-02-01 08:10:14.734 GMT [1] FATAL: database files are incompatible with server
+2022-02-01 08:10:14.734 GMT [1] DETAIL: The data directory was initialized by PostgreSQL version 11, which is not compatible with this version 14.1.
+```
+
+### To 10.0.0
+
+[On November 13, 2020, Helm v2 support was formally finished](https://github.com/helm/charts#status-of-the-project), this major version is the result of the required changes applied to the Helm Chart to be able to incorporate the different features added in Helm v3 and to be consistent with the Helm project itself regarding the Helm v2 EOL.
+
+- Previous versions of this Helm Chart use `apiVersion: v1` (installable by both Helm 2 and 3), this Helm Chart was updated to `apiVersion: v2` (installable by Helm 3 only). [Here](https://helm.sh/docs/topics/charts/#the-apiversion-field) you can find more information about the `apiVersion` field.
+- Move dependency information from the _requirements.yaml_ to the _Chart.yaml_
+- After running _helm dependency update_, a _Chart.lock_ file is generated containing the same structure used in the previous _requirements.lock_
+- The different fields present in the _Chart.yaml_ file has been ordered alphabetically in a homogeneous way for all the Bitnami Helm Chart.
+- The term _master_ has been replaced with _primary_ and _slave_ with _readReplicas_ throughout the chart. Role names have changed from _master_ and _slave_ to _primary_ and _read_.
+
+#### Considerations when upgrading to this version
+
+- If you want to upgrade to this version using Helm v2, this scenario is not supported as this version does not support Helm v2 anymore.
+- If you installed the previous version with Helm v2 and wants to upgrade to this version with Helm v3, please refer to the [official Helm documentation](https://helm.sh/docs/topics/v2_v3_migration/#migration-use-cases) about migrating from Helm v2 to v3.
+
+#### Useful links
+
+- [Bitnami Tutorial](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-resolve-helm2-helm3-post-migration-issues-index.html)
+- [Helm docs](https://helm.sh/docs/topics/v2_v3_migration)
+- [Helm Blog](https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3)
+
+#### How to upgrade to version 10.0.0
+
+To upgrade to _10.0.0_ from _9.x_, it should be done reusing the PVC(s) used to hold the PostgreSQL data on your previous release. To do so, follow the instructions below (the following example assumes that the release name is _postgresql_):
+
+> NOTE: Please, create a backup of your database before running any of those actions.
+
+1. Obtain the credentials and the names of the PVCs used to hold the PostgreSQL data on your current release:
+
+```console
+export POSTGRESQL_PASSWORD=$(kubectl get secret --namespace default postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)
+export POSTGRESQL_PVC=$(kubectl get pvc -l app.kubernetes.io/instance=postgresql,role=primary -o jsonpath="{.items[0].metadata.name}")
+```
+
+1. Delete the PostgreSQL statefulset (notice the option _--cascade=false_):
+
+```console
+kubectl delete statefulsets.apps postgresql-postgresql --namespace default --cascade=false
+```
+
+1. Upgrade your release using the same PostgreSQL version:
+
+```console
+helm upgrade postgresql bitnami/postgresql \
+ --set postgresqlPassword=$POSTGRESQL_PASSWORD \
+ --set persistence.existingClaim=$POSTGRESQL_PVC
+```
+
+1. Delete the existing PostgreSQL pod and the new statefulset will create a new one:
+
+```console
+kubectl delete pod postgresql-postgresql-0
+```
+
+1. Finally, you should see the lines below in PostgreSQL container logs:
+
+```text
+$ kubectl logs $(kubectl get pods -l app.kubernetes.io/instance=postgresql,app.kubernetes.io/name=postgresql,role=primary -o jsonpath="{.items[0].metadata.name}")
+...
+postgresql 08:05:12.59 INFO ==> Deploying PostgreSQL with persisted data...
+...
+```
+
+### To 9.0.0
+
+In this version the chart was adapted to follow the [Helm standard labels](https://helm.sh/docs/chart_best_practices/labels/#standard-labels).
+
+- Some inmutable objects were modified to adopt Helm standard labels introducing backward incompatibilities.
+
+#### How to upgrade to version 9.0.0
+
+To upgrade to _9.0.0_ from _8.x_, it should be done reusing the PVC(s) used to hold the PostgreSQL data on your previous release. To do so, follow the instructions below (the following example assumes that the release name is _postgresql_):
+
+> NOTE: Please, create a backup of your database before running any of those actions.
+
+1. Obtain the credentials and the names of the PVCs used to hold the PostgreSQL data on your current release:
+
+```console
+export POSTGRESQL_PASSWORD=$(kubectl get secret --namespace default postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)
+export POSTGRESQL_PVC=$(kubectl get pvc -l app=postgresql,role=master -o jsonpath="{.items[0].metadata.name}")
+```
+
+1. Delete the PostgreSQL statefulset (notice the option _--cascade=false_):
+
+```console
+kubectl delete statefulsets.apps postgresql-postgresql --namespace default --cascade=false
+```
+
+1. Upgrade your release using the same PostgreSQL version:
+
+```console
+helm upgrade postgresql bitnami/postgresql \
+ --set postgresqlPassword=$POSTGRESQL_PASSWORD \
+ --set persistence.existingClaim=$POSTGRESQL_PVC
+```
+
+1. Delete the existing PostgreSQL pod and the new statefulset will create a new one:
+
+```console
+kubectl delete pod postgresql-postgresql-0
+```
+
+1. Finally, you should see the lines below in PostgreSQL container logs:
+
+```text
+$ kubectl logs $(kubectl get pods -l app.kubernetes.io/instance=postgresql,app.kubernetes.io/name=postgresql,role=master -o jsonpath="{.items[0].metadata.name}")
+...
+postgresql 08:05:12.59 INFO ==> Deploying PostgreSQL with persisted data...
+...
+```
+
+## License
+
+Copyright © 2025 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/charts/semaphore/charts/postgresql/charts/common/.helmignore b/charts/semaphore/charts/postgresql/charts/common/.helmignore
new file mode 100644
index 0000000..d0e1084
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/.helmignore
@@ -0,0 +1,26 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
+# img folder
+img/
+# Changelog
+CHANGELOG.md
diff --git a/charts/semaphore/charts/postgresql/charts/common/Chart.yaml b/charts/semaphore/charts/postgresql/charts/common/Chart.yaml
new file mode 100644
index 0000000..91ccb4b
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/Chart.yaml
@@ -0,0 +1,25 @@
+annotations:
+ fips: "true"
+ images: |
+ []
+ licenses: Apache-2.0
+apiVersion: v2
+appVersion: 2.33.1
+description: A Library Helm Chart for grouping common logic between bitnami charts.
+ This chart is not deployable by itself.
+home: https://bitnami.com
+icon: https://dyltqmyl993wv.cloudfront.net/downloads/logos/bitnami-mark.png
+keywords:
+- common
+- helper
+- template
+- function
+- bitnami
+maintainers:
+- name: Broadcom, Inc. All Rights Reserved.
+ url: https://github.com/bitnami/charts
+name: common
+sources:
+- https://github.com/bitnami/charts/tree/main/bitnami/common
+type: library
+version: 2.33.1
diff --git a/charts/semaphore/charts/postgresql/charts/common/README.md b/charts/semaphore/charts/postgresql/charts/common/README.md
new file mode 100644
index 0000000..76fa2ec
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/README.md
@@ -0,0 +1,395 @@
+
+
+# Common library for Bitnami packages
+
+A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself.
+
+[Overview of Common](https://github.com/bitnami/charts/tree/main/bitnami/common)
+
+Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
+
+## TL;DR
+
+```yaml
+dependencies:
+ - name: common
+ version: 2.x.x
+ repository: oci://MY-OCI-REGISTRY
+```
+
+```console
+helm dependency update
+```
+
+```yaml
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.names.fullname" . }}
+data:
+ myvalue: "Hello World"
+```
+
+Looking to use our applications in production? Try [VMware Tanzu Application Catalog](https://bitnami.com/enterprise), the commercial edition of the Bitnami catalog.
+
+## Introduction
+
+This chart provides a common template helpers which can be used to develop new charts using [Helm](https://helm.sh) package manager.
+
+## Prerequisites
+
+- Kubernetes 1.23+
+- Helm 3.8.0+
+
+## Parameters
+
+The following table lists the helpers available in the library which are scoped in different sections.
+
+### Affinities
+
+| Helper identifier | Description | Expected Input |
+| ------------------------------- | ---------------------------------------------------- | ------------------------------------------------------------ |
+| `common.affinities.nodes.soft` | Return a soft nodeAffinity definition | `dict "key" "FOO" "values" (list "BAR" "BAZ")` |
+| `common.affinities.nodes.hard` | Return a hard nodeAffinity definition | `dict "key" "FOO" "values" (list "BAR" "BAZ")` |
+| `common.affinities.nodes` | Return a nodeAffinity definition | `dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")` |
+| `common.affinities.topologyKey` | Return a topologyKey definition | `dict "topologyKey" "FOO"` |
+| `common.affinities.pods.soft` | Return a soft podAffinity/podAntiAffinity definition | `dict "component" "FOO" "context" $` |
+| `common.affinities.pods.hard` | Return a hard podAffinity/podAntiAffinity definition | `dict "component" "FOO" "context" $` |
+| `common.affinities.pods` | Return a podAffinity/podAntiAffinity definition | `dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")` |
+
+### Capabilities
+
+| Helper identifier | Description | Expected Input |
+| --------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | --------------------------------------- |
+| `common.capabilities.kubeVersion` | Return the target Kubernetes version (using client default if .Values.kubeVersion is not set). | `.` Chart context |
+| `common.capabilities.apiVersions.has` | Return true if the apiVersion is supported | `dict "version" "batch/v1" "context" $` |
+| `common.capabilities.job.apiVersion` | Return the appropriate apiVersion for job. | `.` Chart context |
+| `common.capabilities.cronjob.apiVersion` | Return the appropriate apiVersion for cronjob. | `.` Chart context |
+| `common.capabilities.daemonset.apiVersion` | Return the appropriate apiVersion for daemonset. | `.` Chart context |
+| `common.capabilities.deployment.apiVersion` | Return the appropriate apiVersion for deployment. | `.` Chart context |
+| `common.capabilities.statefulset.apiVersion` | Return the appropriate apiVersion for statefulset. | `.` Chart context |
+| `common.capabilities.ingress.apiVersion` | Return the appropriate apiVersion for ingress. | `.` Chart context |
+| `common.capabilities.rbac.apiVersion` | Return the appropriate apiVersion for RBAC resources. | `.` Chart context |
+| `common.capabilities.crd.apiVersion` | Return the appropriate apiVersion for CRDs. | `.` Chart context |
+| `common.capabilities.policy.apiVersion` | Return the appropriate apiVersion for podsecuritypolicy. | `.` Chart context |
+| `common.capabilities.networkPolicy.apiVersion` | Return the appropriate apiVersion for networkpolicy. | `.` Chart context |
+| `common.capabilities.apiService.apiVersion` | Return the appropriate apiVersion for APIService. | `.` Chart context |
+| `common.capabilities.hpa.apiVersion` | Return the appropriate apiVersion for Horizontal Pod Autoscaler | `.` Chart context |
+| `common.capabilities.vpa.apiVersion` | Return the appropriate apiVersion for Vertical Pod Autoscaler. | `.` Chart context |
+| `common.capabilities.psp.supported` | Returns true if PodSecurityPolicy is supported | `.` Chart context |
+| `common.capabilities.supportsHelmVersion` | Returns true if the used Helm version is 3.3+ | `.` Chart context |
+| `common.capabilities.admissionConfiguration.supported` | Returns true if AdmissionConfiguration is supported | `.` Chart context |
+| `common.capabilities.admissionConfiguration.apiVersion` | Return the appropriate apiVersion for AdmissionConfiguration. | `.` Chart context |
+| `common.capabilities.podSecurityConfiguration.apiVersion` | Return the appropriate apiVersion for PodSecurityConfiguration. | `.` Chart context |
+
+### Certificates
+
+| Helper identifier | Description | Expected Input |
+| ------------------ | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
+| `common.certs.sans`| Returns a space-separated list of Subject Alternative Names (SANs) to create a TLS certificate | `dict "namespace" "default" "clusterDomain" "cluster.local" "serviceName" "my-service" "headlessServiceName" "my-service-headless"` |
+
+### Compatibility
+
+| Helper identifier | Description | Expected Input |
+| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
+| `common.compatibility.isOpenshift` | Return true if the detected platform is Openshift | `.` Chart context |
+| `common.compatibility.renderSecurityContext` | Render a compatible securityContext depending on the platform. By default it is maintained as it is. In other platforms like Openshift we remove default user/group values that do not work out of the box with the restricted-v1 SCC | `dict "secContext" .Values.containerSecurityContext "context" $` |
+
+### Errors
+
+| Helper identifier | Description | Expected Input |
+| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
+| `common.errors.upgrade.passwords.empty` | It will ensure required passwords are given when we are upgrading a chart. If `validationErrors` is not empty it will throw an error and will stop the upgrade action. | `dict "validationErrors" (list $validationError00 $validationError01) "context" $` |
+| `common.errors.insecureImages` | Throw error when original container images are replaced. The error can be bypassed by setting the `global.security.allowInsecureImages` to true. | `dict "images" (list .Values.path.to.the.imageRoot) "context" $` |
+
+### Images
+
+| Helper identifier | Description | Expected Input |
+| --------------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
+| `common.images.image` | Return the proper and full image name | `dict "imageRoot" .Values.path.to.the.image "global" $`, see [ImageRoot](#imageroot) for the structure. |
+| `common.images.pullSecrets` | Return the proper Docker Image Registry Secret Names (deprecated: use common.images.renderPullSecrets instead) | `dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global` |
+| `common.images.renderPullSecrets` | Return the proper Docker Image Registry Secret Names (evaluates values as templates) | `dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "context" $` |
+| `common.images.version` | Return the proper image version | `dict "imageRoot" .Values.path.to.the.image "chart" .Chart` , see [ImageRoot](#imageroot) for the structure. |
+
+### Ingress
+
+| Helper identifier | Description | Expected Input |
+| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `common.ingress.backend` | Generate a proper Ingress backend entry depending on the API version | `dict "serviceName" "foo" "servicePort" "bar"`, see the [Ingress deprecation notice](https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/) for the syntax differences |
+| `common.ingress.certManagerRequest` | Prints "true" if required cert-manager annotations for TLS signed certificates are set in the Ingress annotations | `dict "annotations" .Values.path.to.the.ingress.annotations` |
+
+### Labels
+
+| Helper identifier | Description | Expected Input |
+| --------------------------- | --------------------------------------------------------------------------- | ----------------- |
+| `common.labels.standard` | Return Kubernetes standard labels | `.` Chart context |
+| `common.labels.matchLabels` | Labels to use on `deploy.spec.selector.matchLabels` and `svc.spec.selector` | `.` Chart context |
+
+### Names
+
+| Helper identifier | Description | Expected Input |
+| ---------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
+| `common.names.name` | Expand the name of the chart or use `.Values.nameOverride` | `.` Chart context |
+| `common.names.fullname` | Create a default fully qualified app name. | `.` Chart context |
+| `common.names.namespace` | Allow the release namespace to be overridden | `.` Chart context |
+| `common.names.fullname.namespace` | Create a fully qualified app name adding the installation's namespace | `.` Chart context |
+| `common.names.chart` | Chart name plus version | `.` Chart context |
+| `common.names.dependency.fullname` | Create a default fully qualified dependency name. | `dict "chartName" "dependency-chart-name" "chartValues" .Values.dependency-chart "context" $` |
+
+### Resources
+
+| Helper identifier | Description | Expected Input |
+| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |
+| `common.resources.preset` | Return a resource request/limit object based on a given preset. These presets are for basic testing and not meant to be used in production. | `dict "type" "nano"` |
+
+### Secrets
+
+| Helper identifier | Description | Expected Input |
+| --------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `common.secrets.name` | Generate the name of the secret. | `dict "existingSecret" .Values.path.to.the.existingSecret "defaultNameSuffix" "mySuffix" "context" $` see [ExistingSecret](#existingsecret) for the structure. |
+| `common.secrets.key` | Generate secret key. | `dict "existingSecret" .Values.path.to.the.existingSecret "key" "keyName"` see [ExistingSecret](#existingsecret) for the structure. |
+| `common.secrets.passwords.manage` | Generate secret password or retrieve one if already created. | `dict "secret" "secret-name" "key" "keyName" "providedValues" (list "path.to.password1" "path.to.password2") "length" 10 "strong" false "chartName" "chartName" "honorProvidedValues" false "context" $`, length, strong, honorProvidedValues and chartName fields are optional. |
+| `common.secrets.exists` | Returns whether a previous generated secret already exists. | `dict "secret" "secret-name" "context" $` |
+| `common.secrets.lookup` | Reuses the value from an existing secret, otherwise sets its value to a default value. | `dict "secret" "secret-name" "key" "keyName" "defaultValue" .Values.myValue "context" $` |
+
+### Storage
+
+| Helper identifier | Description | Expected Input |
+| ---------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
+| `common.storage.class` | Return the proper Storage Class | `dict "persistence" .Values.path.to.the.persistence "global" $`, see [Persistence](#persistence) for the structure. |
+
+### TplValues
+
+| Helper identifier | Description | Expected Input |
+| ---------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `common.tplvalues.render` | Renders a value that contains template | `dict "value" .Values.path.to.the.Value "context" $`, value is the value should rendered as template, context frequently is the chart context `$` or `.` |
+| `common.tplvalues.merge` | Merge a list of values that contains template after rendering them. | `dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $` |
+| `common.tplvalues.merge-overwrite` | Merge a list of values that contains template after rendering them. | `dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $` |
+
+### Utils
+
+| Helper identifier | Description | Expected Input |
+| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
+| `common.utils.fieldToEnvVar` | Build environment variable name given a field. | `dict "field" "my-password"` |
+| `common.utils.secret.getvalue` | Print instructions to get a secret value. | `dict "secret" "secret-name" "field" "secret-value-field" "context" $` |
+| `common.utils.getValueFromKey` | Gets a value from `.Values` object given its key path | `dict "key" "path.to.key" "context" $` |
+| `common.utils.getKeyFromList` | Returns first `.Values` key with a defined value or first of the list if all non-defined | `dict "keys" (list "path.to.key1" "path.to.key2") "context" $` |
+| `common.utils.checksumTemplate` | Checksum a template at "path" containing a *single* resource (ConfigMap,Secret) for use in pod annotations, excluding the metadata (see #18376) | `dict "path" "/configmap.yaml" "context" $` |
+
+### Validations
+
+| Helper identifier | Description | Expected Input |
+| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `common.validations.values.single.empty` | Validate a value must not be empty. | `dict "valueKey" "path.to.value" "secret" "secret.name" "field" "my-password" "subchart" "subchart" "context" $` secret, field and subchart are optional. In case they are given, the helper will generate a how to get instruction. See [ValidateValue](#validatevalue) |
+| `common.validations.values.multiple.empty` | Validate a multiple values must not be empty. It returns a shared error for all the values. | `dict "required" (list $validateValueConf00 $validateValueConf01) "context" $`. See [ValidateValue](#validatevalue) |
+| `common.validations.values.mariadb.passwords` | This helper will ensure required password for MariaDB are not empty. It returns a shared error for all the values. | `dict "secret" "mariadb-secret" "subchart" "true" "context" $` subchart field is optional and could be true or false it depends on where you will use mariadb chart and the helper. |
+
+### Warnings
+
+| Helper identifier | Description | Expected Input |
+| -------------------------------- | ----------------------------------------------------------------- | ---------------------------------------------------------- |
+| `common.warnings.rollingTag` | Warning about using rolling tag. | `ImageRoot` see [ImageRoot](#imageroot) for the structure. |
+| `common.warnings.modifiedImages` | Warning about replaced images from the original. | `ImageRoot` see [ImageRoot](#imageroot) for the structure. |
+| `common.warnings.resources` | Warning about not setting the resource object in all deployments. | `dict "sections" (list "path1" "path2") context $` |
+
+### FIPS
+
+| Helper identifier | Description | Expected Input |
+| -------------------- | ------------------- | ------------------------------------------------------------------------------- |
+| `common.fips.enabled` | Enable FIPS mode | `.` Chart context |
+| `common.fips.config` | Configure FIPS mode | `dict "tech" "openssl|java|golang" "fips" .Values.fips "global" .Values.global` |
+
+## Special input schemas
+
+### ImageRoot
+
+```yaml
+registry:
+ type: string
+ description: Docker registry where the image is located
+ example: docker.io
+
+repository:
+ type: string
+ description: Repository and image name
+ example: bitnami/nginx
+
+tag:
+ type: string
+ description: image tag
+ example: 1.16.1-debian-10-r63
+
+pullPolicy:
+ type: string
+ description: Specify a imagePullPolicy.'
+
+pullSecrets:
+ type: array
+ items:
+ type: string
+ description: Optionally specify an array of imagePullSecrets (evaluated as templates).
+
+debug:
+ type: boolean
+ description: Set to true if you would like to see extra information on logs
+ example: false
+
+## An instance would be:
+# registry: docker.io
+# repository: bitnami/nginx
+# tag: 1.16.1-debian-10-r63
+# pullPolicy: IfNotPresent
+# debug: false
+```
+
+### Persistence
+
+```yaml
+enabled:
+ type: boolean
+ description: Whether enable persistence.
+ example: true
+
+storageClass:
+ type: string
+ description: Ghost data Persistent Volume Storage Class, If set to "-", storageClassName: "" which disables dynamic provisioning.
+ example: "-"
+
+accessMode:
+ type: string
+ description: Access mode for the Persistent Volume Storage.
+ example: ReadWriteOnce
+
+size:
+ type: string
+ description: Size the Persistent Volume Storage.
+ example: 8Gi
+
+path:
+ type: string
+ description: Path to be persisted.
+ example: /bitnami
+
+## An instance would be:
+# enabled: true
+# storageClass: "-"
+# accessMode: ReadWriteOnce
+# size: 8Gi
+# path: /bitnami
+```
+
+### ExistingSecret
+
+```yaml
+name:
+ type: string
+ description: Name of the existing secret.
+ example: mySecret
+keyMapping:
+ description: Mapping between the expected key name and the name of the key in the existing secret.
+ type: object
+
+## An instance would be:
+# name: mySecret
+# keyMapping:
+# password: myPasswordKey
+```
+
+#### Example of use
+
+When we store sensitive data for a deployment in a secret, some times we want to give to users the possibility of using theirs existing secrets.
+
+```yaml
+# templates/secret.yaml
+---
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ include "common.names.fullname" . }}
+ labels:
+ app: {{ include "common.names.fullname" . }}
+type: Opaque
+data:
+ password: {{ .Values.password | b64enc | quote }}
+
+# templates/dpl.yaml
+---
+...
+ env:
+ - name: PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ include "common.secrets.name" (dict "existingSecret" .Values.existingSecret "context" $) }}
+ key: {{ include "common.secrets.key" (dict "existingSecret" .Values.existingSecret "key" "password") }}
+...
+
+# values.yaml
+---
+name: mySecret
+keyMapping:
+ password: myPasswordKey
+```
+
+### ValidateValue
+
+#### NOTES.txt
+
+```console
+{{- $validateValueConf00 := (dict "valueKey" "path.to.value00" "secret" "secretName" "field" "password-00") -}}
+{{- $validateValueConf01 := (dict "valueKey" "path.to.value01" "secret" "secretName" "field" "password-01") -}}
+
+{{ include "common.validations.values.multiple.empty" (dict "required" (list $validateValueConf00 $validateValueConf01) "context" $) }}
+```
+
+If we force those values to be empty we will see some alerts
+
+```console
+helm install test mychart --set path.to.value00="",path.to.value01=""
+ 'path.to.value00' must not be empty, please add '--set path.to.value00=$PASSWORD_00' to the command. To get the current value:
+
+ export PASSWORD_00=$(kubectl get secret --namespace default secretName -o jsonpath="{.data.password-00}" | base64 -d)
+
+ 'path.to.value01' must not be empty, please add '--set path.to.value01=$PASSWORD_01' to the command. To get the current value:
+
+ export PASSWORD_01=$(kubectl get secret --namespace default secretName -o jsonpath="{.data.password-01}" | base64 -d)
+```
+
+## Upgrading
+
+### To 1.0.0
+
+[On November 13, 2020, Helm v2 support was formally finished](https://github.com/helm/charts#status-of-the-project), this major version is the result of the required changes applied to the Helm Chart to be able to incorporate the different features added in Helm v3 and to be consistent with the Helm project itself regarding the Helm v2 EOL.
+
+#### What changes were introduced in this major version?
+
+- Previous versions of this Helm Chart use `apiVersion: v1` (installable by both Helm 2 and 3), this Helm Chart was updated to `apiVersion: v2` (installable by Helm 3 only). [Here](https://helm.sh/docs/topics/charts/#the-apiversion-field) you can find more information about the `apiVersion` field.
+- Use `type: library`. [Here](https://v3.helm.sh/docs/faq/#library-chart-support) you can find more information.
+- The different fields present in the *Chart.yaml* file has been ordered alphabetically in a homogeneous way for all the Bitnami Helm Charts
+
+#### Considerations when upgrading to this version
+
+- If you want to upgrade to this version from a previous one installed with Helm v3, you shouldn't face any issues
+- If you want to upgrade to this version using Helm v2, this scenario is not supported as this version doesn't support Helm v2 anymore
+- If you installed the previous version with Helm v2 and wants to upgrade to this version with Helm v3, please refer to the [official Helm documentation](https://helm.sh/docs/topics/v2_v3_migration/#migration-use-cases) about migrating from Helm v2 to v3
+
+#### Useful links
+
+-
+-
+-
+
+## License
+
+Copyright © 2025 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_affinities.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_affinities.tpl
new file mode 100644
index 0000000..c6ccc62
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_affinities.tpl
@@ -0,0 +1,169 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Return a soft nodeAffinity definition
+{{ include "common.affinities.nodes.soft" (dict "key" "FOO" "values" (list "BAR" "BAZ")) -}}
+*/}}
+{{- define "common.affinities.nodes.soft" -}}
+preferredDuringSchedulingIgnoredDuringExecution:
+ - preference:
+ matchExpressions:
+ - key: {{ .key }}
+ operator: In
+ values:
+ {{- range .values }}
+ - {{ . | quote }}
+ {{- end }}
+ weight: 1
+{{- end -}}
+
+{{/*
+Return a hard nodeAffinity definition
+{{ include "common.affinities.nodes.hard" (dict "key" "FOO" "values" (list "BAR" "BAZ")) -}}
+*/}}
+{{- define "common.affinities.nodes.hard" -}}
+requiredDuringSchedulingIgnoredDuringExecution:
+ nodeSelectorTerms:
+ - matchExpressions:
+ - key: {{ .key }}
+ operator: In
+ values:
+ {{- range .values }}
+ - {{ . | quote }}
+ {{- end }}
+{{- end -}}
+
+{{/*
+Return a nodeAffinity definition
+{{ include "common.affinities.nodes" (dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")) -}}
+*/}}
+{{- define "common.affinities.nodes" -}}
+ {{- if eq .type "soft" }}
+ {{- include "common.affinities.nodes.soft" . -}}
+ {{- else if eq .type "hard" }}
+ {{- include "common.affinities.nodes.hard" . -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Return a topologyKey definition
+{{ include "common.affinities.topologyKey" (dict "topologyKey" "BAR") -}}
+*/}}
+{{- define "common.affinities.topologyKey" -}}
+{{ .topologyKey | default "kubernetes.io/hostname" -}}
+{{- end -}}
+
+{{/*
+Return a soft podAffinity/podAntiAffinity definition
+{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "extraNamespaces" (list "namespace1" "namespace2") "context" $) -}}
+*/}}
+{{- define "common.affinities.pods.soft" -}}
+{{- $component := default "" .component -}}
+{{- $customLabels := default (dict) .customLabels -}}
+{{- $extraMatchLabels := default (dict) .extraMatchLabels -}}
+{{- $extraPodAffinityTerms := default (list) .extraPodAffinityTerms -}}
+{{- $extraNamespaces := default (list) .extraNamespaces -}}
+preferredDuringSchedulingIgnoredDuringExecution:
+ - podAffinityTerm:
+ labelSelector:
+ matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }}
+ {{- if not (empty $component) }}
+ {{ printf "app.kubernetes.io/component: %s" $component }}
+ {{- end }}
+ {{- range $key, $value := $extraMatchLabels }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+ {{- if $extraNamespaces }}
+ namespaces:
+ - {{ .context.Release.Namespace }}
+ {{- with $extraNamespaces }}
+ {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }}
+ weight: 1
+ {{- range $extraPodAffinityTerms }}
+ - podAffinityTerm:
+ labelSelector:
+ matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" $.context )) | nindent 10 }}
+ {{- if not (empty $component) }}
+ {{ printf "app.kubernetes.io/component: %s" $component }}
+ {{- end }}
+ {{- range $key, $value := .extraMatchLabels }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+ {{- if .namespaces }}
+ namespaces:
+ - {{ $.context.Release.Namespace }}
+ {{- with .namespaces }}
+ {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }}
+ weight: {{ .weight | default 1 -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Return a hard podAffinity/podAntiAffinity definition
+{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "extraNamespaces" (list "namespace1" "namespace2") "context" $) -}}
+*/}}
+{{- define "common.affinities.pods.hard" -}}
+{{- $component := default "" .component -}}
+{{- $customLabels := default (dict) .customLabels -}}
+{{- $extraMatchLabels := default (dict) .extraMatchLabels -}}
+{{- $extraPodAffinityTerms := default (list) .extraPodAffinityTerms -}}
+{{- $extraNamespaces := default (list) .extraNamespaces -}}
+requiredDuringSchedulingIgnoredDuringExecution:
+ - labelSelector:
+ matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }}
+ {{- if not (empty $component) }}
+ {{ printf "app.kubernetes.io/component: %s" $component }}
+ {{- end }}
+ {{- range $key, $value := $extraMatchLabels }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+ {{- if $extraNamespaces }}
+ namespaces:
+ - {{ .context.Release.Namespace }}
+ {{- with $extraNamespaces }}
+ {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 6 }}
+ {{- end }}
+ {{- end }}
+ topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }}
+ {{- range $extraPodAffinityTerms }}
+ - labelSelector:
+ matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" $.context )) | nindent 8 }}
+ {{- if not (empty $component) }}
+ {{ printf "app.kubernetes.io/component: %s" $component }}
+ {{- end }}
+ {{- range $key, $value := .extraMatchLabels }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+ {{- if .namespaces }}
+ namespaces:
+ - {{ $.context.Release.Namespace }}
+ {{- with .namespaces }}
+ {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 6 }}
+ {{- end }}
+ {{- end }}
+ topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Return a podAffinity/podAntiAffinity definition
+{{ include "common.affinities.pods" (dict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")) -}}
+*/}}
+{{- define "common.affinities.pods" -}}
+ {{- if eq .type "soft" }}
+ {{- include "common.affinities.pods.soft" . -}}
+ {{- else if eq .type "hard" }}
+ {{- include "common.affinities.pods.hard" . -}}
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_capabilities.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_capabilities.tpl
new file mode 100644
index 0000000..58f58c1
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_capabilities.tpl
@@ -0,0 +1,178 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Return the target Kubernetes version
+*/}}
+{{- define "common.capabilities.kubeVersion" -}}
+{{- default (default .Capabilities.KubeVersion.Version .Values.kubeVersion) ((.Values.global).kubeVersion) -}}
+{{- end -}}
+
+{{/*
+Return true if the apiVersion is supported
+Usage:
+{{ include "common.capabilities.apiVersions.has" (dict "version" "batch/v1" "context" $) }}
+*/}}
+{{- define "common.capabilities.apiVersions.has" -}}
+{{- $providedAPIVersions := default .context.Values.apiVersions ((.context.Values.global).apiVersions) -}}
+{{- if and (empty $providedAPIVersions) (.context.Capabilities.APIVersions.Has .version) -}}
+ {{- true -}}
+{{- else if has .version $providedAPIVersions -}}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for poddisruptionbudget.
+*/}}
+{{- define "common.capabilities.policy.apiVersion" -}}
+{{- print "policy/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for networkpolicy.
+*/}}
+{{- define "common.capabilities.networkPolicy.apiVersion" -}}
+{{- print "networking.k8s.io/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for job.
+*/}}
+{{- define "common.capabilities.job.apiVersion" -}}
+{{- print "batch/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for cronjob.
+*/}}
+{{- define "common.capabilities.cronjob.apiVersion" -}}
+{{- print "batch/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for daemonset.
+*/}}
+{{- define "common.capabilities.daemonset.apiVersion" -}}
+{{- print "apps/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for deployment.
+*/}}
+{{- define "common.capabilities.deployment.apiVersion" -}}
+{{- print "apps/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for statefulset.
+*/}}
+{{- define "common.capabilities.statefulset.apiVersion" -}}
+{{- print "apps/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for ingress.
+*/}}
+{{- define "common.capabilities.ingress.apiVersion" -}}
+{{- print "networking.k8s.io/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for RBAC resources.
+*/}}
+{{- define "common.capabilities.rbac.apiVersion" -}}
+{{- print "rbac.authorization.k8s.io/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for CRDs.
+*/}}
+{{- define "common.capabilities.crd.apiVersion" -}}
+{{- print "apiextensions.k8s.io/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for APIService.
+*/}}
+{{- define "common.capabilities.apiService.apiVersion" -}}
+{{- print "apiregistration.k8s.io/v1" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for Horizontal Pod Autoscaler.
+*/}}
+{{- define "common.capabilities.hpa.apiVersion" -}}
+{{- $kubeVersion := include "common.capabilities.kubeVersion" .context -}}
+{{- print "autoscaling/v2" -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for Vertical Pod Autoscaler.
+*/}}
+{{- define "common.capabilities.vpa.apiVersion" -}}
+{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}}
+{{- if and (not (empty $kubeVersion)) (semverCompare "<1.25-0" $kubeVersion) -}}
+{{- print "autoscaling/v1beta2" -}}
+{{- else -}}
+{{- print "autoscaling/v1" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Returns true if PodSecurityPolicy is supported
+*/}}
+{{- define "common.capabilities.psp.supported" -}}
+{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}}
+{{- if or (empty $kubeVersion) (semverCompare "<1.25-0" $kubeVersion) -}}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Returns true if AdmissionConfiguration is supported
+*/}}
+{{- define "common.capabilities.admissionConfiguration.supported" -}}
+{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}}
+ {{- true -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for AdmissionConfiguration.
+*/}}
+{{- define "common.capabilities.admissionConfiguration.apiVersion" -}}
+{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}}
+{{- if and (not (empty $kubeVersion)) (semverCompare "<1.25-0" $kubeVersion) -}}
+{{- print "apiserver.config.k8s.io/v1beta1" -}}
+{{- else -}}
+{{- print "apiserver.config.k8s.io/v1" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for PodSecurityConfiguration.
+*/}}
+{{- define "common.capabilities.podSecurityConfiguration.apiVersion" -}}
+{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}}
+{{- if and (not (empty $kubeVersion)) (semverCompare "<1.25-0" $kubeVersion) -}}
+{{- print "pod-security.admission.config.k8s.io/v1beta1" -}}
+{{- else -}}
+{{- print "pod-security.admission.config.k8s.io/v1" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Returns true if the used Helm version is 3.3+.
+A way to check the used Helm version was not introduced until version 3.3.0 with .Capabilities.HelmVersion, which contains an additional "{}}" structure.
+This check is introduced as a regexMatch instead of {{ if .Capabilities.HelmVersion }} because checking for the key HelmVersion in <3.3 results in a "interface not found" error.
+**To be removed when the catalog's minimun Helm version is 3.3**
+*/}}
+{{- define "common.capabilities.supportsHelmVersion" -}}
+{{- if regexMatch "{(v[0-9])*[^}]*}}$" (.Capabilities | toString ) }}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_certs.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_certs.tpl
new file mode 100644
index 0000000..55efc51
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_certs.tpl
@@ -0,0 +1,51 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Returns a space-separated list of Subject Alternative Names (SANs) to create a TLS certificate
+Usage:
+{{ include "common.certs.sans" (dict "namespace" "default" "clusterDomain" "cluster.local" "serviceName" "my-service" "headlessServiceName" "my-service-headless" "loopback" true "extraSANs" (list "custom.domain.com")) }}
+
+Params:
+ - namespace - String - Required - Namespace where the app which we are generating the certificate for is deployed.
+ - clusterDomain - String - Optional - Cluster domain. Default is "cluster.local".
+ - serviceName - String - Optional - App service name. If provided, the following SANs will be generated:
+ - serviceName.namespace.svc.clusterDomain
+ - serviceName.namespace.svc
+ - serviceName.namespace
+ - serviceName
+ - headlessServiceName - String - Optional - App headless service name. If provided, the following wildcard SANs will be generated:
+ - *.headlessServiceName.namespace.svc.clusterDomain
+ - *.headlessServiceName.namespace.svc
+ - *.headlessServiceName.namespace
+ - *.headlessServiceName
+ - extraSANs - List - Optional - Additional custom SANs to be added.
+ - loopback - Boolean - Optional - If true, "localhost" will be added to the SANs.
+*/}}
+{{- define "common.certs.sans" -}}
+{{- $sans := list }}
+{{- if .serviceName -}}
+ {{- $sans = append $sans (printf "%s.%s.svc.%s" .serviceName .namespace (default "cluster.local" .clusterDomain)) -}}
+ {{- $sans = append $sans (printf "%s.%s.svc" .serviceName .namespace) -}}
+ {{- $sans = append $sans (printf "%s.%s" .serviceName .namespace) -}}
+ {{- $sans = append $sans .serviceName -}}
+{{- end -}}
+{{- if .headlessServiceName -}}
+ {{- /* Include wildcard SANs for headless service */ -}}
+ {{- $sans = append $sans (printf "*.%s.%s.svc.%s" .headlessServiceName .namespace (default "cluster.local" .clusterDomain)) -}}
+ {{- $sans = append $sans (printf "*.%s.%s.svc" .headlessServiceName .namespace) -}}
+ {{- $sans = append $sans (printf "*.%s.%s" .headlessServiceName .namespace) -}}
+ {{- $sans = append $sans (printf "*.%s" .headlessServiceName) -}}
+{{- end -}}
+{{- range .extraSANs }}
+ {{- $sans = append $sans . -}}
+{{- end -}}
+{{- if (default false .loopback) -}}
+ {{- $sans = append $sans "localhost" }}
+{{- end -}}
+{{- join " " $sans | trim -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_compatibility.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_compatibility.tpl
new file mode 100644
index 0000000..19c26db
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_compatibility.tpl
@@ -0,0 +1,46 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Return true if the detected platform is Openshift
+Usage:
+{{- include "common.compatibility.isOpenshift" . -}}
+*/}}
+{{- define "common.compatibility.isOpenshift" -}}
+{{- if .Capabilities.APIVersions.Has "security.openshift.io/v1" -}}
+{{- true -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Render a compatible securityContext depending on the platform. By default it is maintained as it is. In other platforms like Openshift we remove default user/group values that do not work out of the box with the restricted-v1 SCC
+Usage:
+{{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.containerSecurityContext "context" $) -}}
+*/}}
+{{- define "common.compatibility.renderSecurityContext" -}}
+{{- $adaptedContext := .secContext -}}
+
+{{- if (((.context.Values.global).compatibility).openshift) -}}
+ {{- if or (eq .context.Values.global.compatibility.openshift.adaptSecurityContext "force") (and (eq .context.Values.global.compatibility.openshift.adaptSecurityContext "auto") (include "common.compatibility.isOpenshift" .context)) -}}
+ {{/* Remove incompatible user/group values that do not work in Openshift out of the box */}}
+ {{- $adaptedContext = omit $adaptedContext "fsGroup" "runAsUser" "runAsGroup" -}}
+ {{- if not .secContext.seLinuxOptions -}}
+ {{/* If it is an empty object, we remove it from the resulting context because it causes validation issues */}}
+ {{- $adaptedContext = omit $adaptedContext "seLinuxOptions" -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+{{/* Remove empty seLinuxOptions object if global.compatibility.omitEmptySeLinuxOptions is set to true */}}
+{{- if and (((.context.Values.global).compatibility).omitEmptySeLinuxOptions) (not .secContext.seLinuxOptions) -}}
+ {{- $adaptedContext = omit $adaptedContext "seLinuxOptions" -}}
+{{- end -}}
+{{/* Remove fields that are disregarded when running the container in privileged mode */}}
+{{- if $adaptedContext.privileged -}}
+ {{- $adaptedContext = omit $adaptedContext "capabilities" -}}
+{{- end -}}
+{{- omit $adaptedContext "enabled" | toYaml -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_errors.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_errors.tpl
new file mode 100644
index 0000000..fb704c9
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_errors.tpl
@@ -0,0 +1,92 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Throw error when upgrading using empty passwords values that must not be empty.
+
+Usage:
+{{- $validationError00 := include "common.validations.values.single.empty" (dict "valueKey" "path.to.password00" "secret" "secretName" "field" "password-00") -}}
+{{- $validationError01 := include "common.validations.values.single.empty" (dict "valueKey" "path.to.password01" "secret" "secretName" "field" "password-01") -}}
+{{ include "common.errors.upgrade.passwords.empty" (dict "validationErrors" (list $validationError00 $validationError01) "context" $) }}
+
+Required password params:
+ - validationErrors - String - Required. List of validation strings to be return, if it is empty it won't throw error.
+ - context - Context - Required. Parent context.
+*/}}
+{{- define "common.errors.upgrade.passwords.empty" -}}
+ {{- $validationErrors := join "" .validationErrors -}}
+ {{- if and $validationErrors .context.Release.IsUpgrade -}}
+ {{- $errorString := "\nPASSWORDS ERROR: You must provide your current passwords when upgrading the release." -}}
+ {{- $errorString = print $errorString "\n Note that even after reinstallation, old credentials may be needed as they may be kept in persistent volume claims." -}}
+ {{- $errorString = print $errorString "\n Further information can be obtained at https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues/#credential-errors-while-upgrading-chart-releases" -}}
+ {{- $errorString = print $errorString "\n%s" -}}
+ {{- printf $errorString $validationErrors | fail -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Throw error when original container images are replaced.
+The error can be bypassed by setting the "global.security.allowInsecureImages" to true. In this case,
+a warning message will be shown instead.
+
+Usage:
+{{ include "common.errors.insecureImages" (dict "images" (list .Values.path.to.the.imageRoot) "context" $) }}
+*/}}
+{{- define "common.errors.insecureImages" -}}
+{{- $relocatedImages := list -}}
+{{- $replacedImages := list -}}
+{{- $bitnamiLegacyImages := list -}}
+{{- $retaggedImages := list -}}
+{{- $globalRegistry := ((.context.Values.global).imageRegistry) -}}
+{{- $originalImages := .context.Chart.Annotations.images -}}
+{{- range .images -}}
+ {{- $registryName := default .registry $globalRegistry -}}
+ {{- $fullImageNameNoTag := printf "%s/%s" $registryName .repository -}}
+ {{- $fullImageName := printf "%s:%s" $fullImageNameNoTag .tag -}}
+ {{- if not (contains $fullImageNameNoTag $originalImages) -}}
+ {{- if not (contains $registryName $originalImages) -}}
+ {{- $relocatedImages = append $relocatedImages $fullImageName -}}
+ {{- else if not (contains .repository $originalImages) -}}
+ {{- $replacedImages = append $replacedImages $fullImageName -}}
+ {{- if contains "docker.io/bitnamilegacy/" $fullImageNameNoTag -}}
+ {{- $bitnamiLegacyImages = append $bitnamiLegacyImages $fullImageName -}}
+ {{- end -}}
+ {{- end -}}
+ {{- end -}}
+ {{- if not (contains (printf "%s:%s" .repository .tag) $originalImages) -}}
+ {{- $retaggedImages = append $retaggedImages $fullImageName -}}
+ {{- end -}}
+{{- end -}}
+
+{{- if and (or (gt (len $relocatedImages) 0) (gt (len $replacedImages) 0)) (((.context.Values.global).security).allowInsecureImages) -}}
+ {{- print "\n\n⚠ SECURITY WARNING: Verifying original container images was skipped. Please note this Helm chart was designed, tested, and validated on multiple platforms using a specific set of Bitnami and Bitnami Secure Images containers. Substituting other containers is likely to cause degraded security and performance, broken chart features, and missing environment variables.\n" -}}
+{{- else if (or (gt (len $relocatedImages) 0) (gt (len $replacedImages) 0)) -}}
+ {{- $errorString := "Original containers have been substituted for unrecognized ones. Deploying this chart with non-standard containers is likely to cause degraded security and performance, broken chart features, and missing environment variables." -}}
+ {{- $errorString = print $errorString "\n\nUnrecognized images:" -}}
+ {{- range (concat $relocatedImages $replacedImages) -}}
+ {{- $errorString = print $errorString "\n - " . -}}
+ {{- end -}}
+ {{- if and (eq (len $relocatedImages) 0) (eq (len $replacedImages) (len $bitnamiLegacyImages)) -}}
+ {{- $errorString = print "\n\n⚠ WARNING: " $errorString -}}
+ {{- print $errorString -}}
+ {{- else if or (contains "docker.io/bitnami/" $originalImages) (contains "docker.io/bitnamiprem/" $originalImages) (contains "docker.io/bitnamisecure/" $originalImages) -}}
+ {{- $errorString = print "\n\n⚠ ERROR: " $errorString -}}
+ {{- $errorString = print $errorString "\n\nIf you are sure you want to proceed with non-standard containers, you can skip container image verification by setting the global parameter 'global.security.allowInsecureImages' to true." -}}
+ {{- $errorString = print $errorString "\nFurther information can be obtained at https://github.com/bitnami/charts/issues/30850" -}}
+ {{- print $errorString | fail -}}
+ {{- else if gt (len $replacedImages) 0 -}}
+ {{- $errorString = print "\n\n⚠ WARNING: " $errorString -}}
+ {{- print $errorString -}}
+ {{- end -}}
+{{- else if gt (len $retaggedImages) 0 -}}
+ {{- $warnString := "\n\n⚠ WARNING: Original containers have been retagged. Please note this Helm chart was tested, and validated on multiple platforms using a specific set of Bitnami and Bitnami Secure Images containers. Substituting original image tags could cause unexpected behavior." -}}
+ {{- $warnString = print $warnString "\n\nRetagged images:" -}}
+ {{- range $retaggedImages -}}
+ {{- $warnString = print $warnString "\n - " . -}}
+ {{- end -}}
+ {{- print $warnString -}}
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_fips.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_fips.tpl
new file mode 100644
index 0000000..fd0d06a
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_fips.tpl
@@ -0,0 +1,73 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Enable FIPS features
+{{ include "common.fips.enabled" . }}
+*/}}
+{{- define "common.fips.enabled" -}}
+ {{- $fips := .Chart.Annotations.fips -}}
+ {{- if eq "true" $fips -}}
+ {{- true -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Get FIPS environment variable value for the given tech
+{{ include "common.fips.config" (dict "tech" "openssl|java|golang" "fips" .Values.fips "global" .Values.global) }}
+*/}}
+{{- define "common.fips.config" -}}
+ {{- $availableTechs := list "openssl" "java" "golang" -}}
+ {{- if not (has .tech $availableTechs) -}}
+ {{- printf "The common.fips.config method can only provide configuration for: %s" $availableTechs | fail -}}
+ {{- end -}}
+ {{- $tech := get (.fips) .tech -}}
+ {{- $value := $tech | default (.global).defaultFips -}}
+ {{- if empty $value -}}
+ {{- printf "Please configure a value for 'fips.%s' or 'global.defaultFips'" .tech | fail -}}
+ {{- else -}}
+ {{- $method := printf "common.fips.%s" .tech -}}
+ {{- include $method (dict "value" $value) | trim | print -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Map OpenSSL values for FIPS configuration
+{{ include "common.fips.openssl" (dict "value" "restricted") }}
+*/}}
+{{- define "common.fips.openssl" -}}
+ {{- ternary "yes" "no" (eq .value "restricted") | print -}}
+{{- end -}}
+
+{{/*
+Map JAVA values for FIPS configuration
+{{ include "common.fips.java" (dict "value" "restricted") }}
+*/}}
+{{- define "common.fips.java" -}}
+ {{- $suffix := ternary "original" .value (eq .value "off") -}}
+ {{- $javaSecurityFile := printf "java.security.%s" $suffix -}}
+ {{/* The two equals signs mean the property file will completely override the master properties file */}}
+ {{- $javaSecurityOpt := printf "-Djava.security.properties==/opt/bitnami/java/conf/security/%s" $javaSecurityFile -}}
+ {{- $bcModulesFlag := "--module-path=/opt/bitnami/bc-fips/" -}}
+ {{- $restrictedFlags := printf "%s %s" $bcModulesFlag $javaSecurityOpt -}}
+
+ {{- ternary $restrictedFlags $javaSecurityOpt (eq .value "restricted") | print -}}
+{{- end -}}
+
+{{/*
+Map Golang values for FIPS configuration
+{{ include "common.fips.golang" (dict "value" "restricted") }}
+*/}}
+{{- define "common.fips.golang" -}}
+ {{- if eq .value "restricted" -}}
+ {{- print "fips140=only" -}}
+ {{- else if eq .value "relaxed" -}}
+ {{- print "fips140=on" -}}
+ {{- else -}}
+ {{- print "fips140=off" -}}
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_images.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_images.tpl
new file mode 100644
index 0000000..76bb7ce
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_images.tpl
@@ -0,0 +1,115 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Return the proper image name.
+If image tag and digest are not defined, termination fallbacks to chart appVersion.
+{{ include "common.images.image" ( dict "imageRoot" .Values.path.to.the.image "global" .Values.global "chart" .Chart ) }}
+*/}}
+{{- define "common.images.image" -}}
+{{- $registryName := default .imageRoot.registry ((.global).imageRegistry) -}}
+{{- $repositoryName := .imageRoot.repository -}}
+{{- $separator := ":" -}}
+{{- $termination := .imageRoot.tag | toString -}}
+
+{{- if not .imageRoot.tag }}
+ {{- if .chart }}
+ {{- $termination = .chart.AppVersion | toString -}}
+ {{- end -}}
+{{- end -}}
+{{- if .imageRoot.digest }}
+ {{- $separator = "@" -}}
+ {{- $termination = .imageRoot.digest | toString -}}
+{{- end -}}
+{{- if $registryName }}
+ {{- printf "%s/%s%s%s" $registryName $repositoryName $separator $termination -}}
+{{- else -}}
+ {{- printf "%s%s%s" $repositoryName $separator $termination -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the proper Docker Image Registry Secret Names (deprecated: use common.images.renderPullSecrets instead)
+{{ include "common.images.pullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global) }}
+*/}}
+{{- define "common.images.pullSecrets" -}}
+ {{- $pullSecrets := list }}
+
+ {{- range ((.global).imagePullSecrets) -}}
+ {{- if kindIs "map" . -}}
+ {{- $pullSecrets = append $pullSecrets .name -}}
+ {{- else -}}
+ {{- $pullSecrets = append $pullSecrets . -}}
+ {{- end }}
+ {{- end -}}
+
+ {{- range .images -}}
+ {{- range .pullSecrets -}}
+ {{- if kindIs "map" . -}}
+ {{- $pullSecrets = append $pullSecrets .name -}}
+ {{- else -}}
+ {{- $pullSecrets = append $pullSecrets . -}}
+ {{- end -}}
+ {{- end -}}
+ {{- end -}}
+
+ {{- if (not (empty $pullSecrets)) -}}
+imagePullSecrets:
+ {{- range $pullSecrets | uniq }}
+ - name: {{ . }}
+ {{- end }}
+ {{- end }}
+{{- end -}}
+
+{{/*
+Return the proper Docker Image Registry Secret Names evaluating values as templates
+{{ include "common.images.renderPullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "context" $) }}
+*/}}
+{{- define "common.images.renderPullSecrets" -}}
+ {{- $pullSecrets := list }}
+ {{- $context := .context }}
+
+ {{- range (($context.Values.global).imagePullSecrets) -}}
+ {{- if kindIs "map" . -}}
+ {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" .name "context" $context)) -}}
+ {{- else -}}
+ {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" . "context" $context)) -}}
+ {{- end -}}
+ {{- end -}}
+
+ {{- range .images -}}
+ {{- range .pullSecrets -}}
+ {{- if kindIs "map" . -}}
+ {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" .name "context" $context)) -}}
+ {{- else -}}
+ {{- $pullSecrets = append $pullSecrets (include "common.tplvalues.render" (dict "value" . "context" $context)) -}}
+ {{- end -}}
+ {{- end -}}
+ {{- end -}}
+
+ {{- if (not (empty $pullSecrets)) -}}
+imagePullSecrets:
+ {{- range $pullSecrets | uniq }}
+ - name: {{ . }}
+ {{- end }}
+ {{- end }}
+{{- end -}}
+
+{{/*
+Return the proper image version (ingores image revision/prerelease info & fallbacks to chart appVersion)
+{{ include "common.images.version" ( dict "imageRoot" .Values.path.to.the.image "chart" .Chart ) }}
+*/}}
+{{- define "common.images.version" -}}
+{{- $imageTag := .imageRoot.tag | toString -}}
+{{/* regexp from https://github.com/Masterminds/semver/blob/23f51de38a0866c5ef0bfc42b3f735c73107b700/version.go#L41-L44 */}}
+{{- if regexMatch `^([0-9]+)(\.[0-9]+)?(\.[0-9]+)?(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?$` $imageTag -}}
+ {{- $version := semver $imageTag -}}
+ {{- printf "%d.%d.%d" $version.Major $version.Minor $version.Patch -}}
+{{- else -}}
+ {{- print .chart.AppVersion -}}
+{{- end -}}
+{{- end -}}
+
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_ingress.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_ingress.tpl
new file mode 100644
index 0000000..2d0dbf1
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_ingress.tpl
@@ -0,0 +1,41 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Generate backend entry that is compatible with all Kubernetes API versions.
+
+Usage:
+{{ include "common.ingress.backend" (dict "serviceName" "backendName" "servicePort" "backendPort" "context" $) }}
+
+Params:
+ - serviceName - String. Name of an existing service backend
+ - servicePort - String/Int. Port name (or number) of the service. It will be translated to different yaml depending if it is a string or an integer.
+ - context - Dict - Required. The context for the template evaluation.
+*/}}
+{{- define "common.ingress.backend" -}}
+service:
+ name: {{ .serviceName }}
+ port:
+ {{- if typeIs "string" .servicePort }}
+ name: {{ .servicePort }}
+ {{- else if or (typeIs "int" .servicePort) (typeIs "float64" .servicePort) }}
+ number: {{ .servicePort | int }}
+ {{- end }}
+{{- end -}}
+
+{{/*
+Return true if cert-manager required annotations for TLS signed
+certificates are set in the Ingress annotations
+Ref: https://cert-manager.io/docs/usage/ingress/#supported-annotations
+Usage:
+{{ include "common.ingress.certManagerRequest" ( dict "annotations" .Values.path.to.the.ingress.annotations ) }}
+*/}}
+{{- define "common.ingress.certManagerRequest" -}}
+{{ if or (hasKey .annotations "cert-manager.io/cluster-issuer") (hasKey .annotations "cert-manager.io/issuer") (hasKey .annotations "kubernetes.io/tls-acme") }}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_labels.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_labels.tpl
new file mode 100644
index 0000000..4c98597
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_labels.tpl
@@ -0,0 +1,46 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Kubernetes standard labels
+{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}}
+*/}}
+{{- define "common.labels.standard" -}}
+{{- if and (hasKey . "customLabels") (hasKey . "context") -}}
+{{- $default := dict "app.kubernetes.io/name" (include "common.names.name" .context) "helm.sh/chart" (include "common.names.chart" .context) "app.kubernetes.io/instance" .context.Release.Name "app.kubernetes.io/managed-by" .context.Release.Service -}}
+{{- with .context.Chart.AppVersion -}}
+{{- $_ := set $default "app.kubernetes.io/version" . -}}
+{{- end -}}
+{{ template "common.tplvalues.merge" (dict "values" (list .customLabels $default) "context" .context) }}
+{{- else -}}
+app.kubernetes.io/name: {{ include "common.names.name" . }}
+helm.sh/chart: {{ include "common.names.chart" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- with .Chart.AppVersion }}
+app.kubernetes.io/version: {{ . | replace "+" "_" | quote }}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector
+{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}}
+
+We don't want to loop over custom labels appending them to the selector
+since it's very likely that it will break deployments, services, etc.
+However, it's important to overwrite the standard labels if the user
+overwrote them on metadata.labels fields.
+*/}}
+{{- define "common.labels.matchLabels" -}}
+{{- if and (hasKey . "customLabels") (hasKey . "context") -}}
+{{ merge (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") (dict "app.kubernetes.io/name" (include "common.names.name" .context) "app.kubernetes.io/instance" .context.Release.Name ) | toYaml }}
+{{- else -}}
+app.kubernetes.io/name: {{ include "common.names.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_names.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_names.tpl
new file mode 100644
index 0000000..d5d0ae4
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_names.tpl
@@ -0,0 +1,72 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "common.names.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "common.names.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "common.names.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- $releaseName := regexReplaceAll "(-?[^a-z\\d\\-])+-?" (lower .Release.Name) "-" -}}
+{{- if contains $name $releaseName -}}
+{{- $releaseName | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" $releaseName $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified dependency name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+Usage:
+{{ include "common.names.dependency.fullname" (dict "chartName" "dependency-chart-name" "chartValues" .Values.dependency-chart "context" $) }}
+*/}}
+{{- define "common.names.dependency.fullname" -}}
+{{- if .chartValues.fullnameOverride -}}
+{{- .chartValues.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .chartName .chartValues.nameOverride -}}
+{{- if contains $name .context.Release.Name -}}
+{{- .context.Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .context.Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Allow the release namespace to be overridden for multi-namespace deployments in combined charts.
+*/}}
+{{- define "common.names.namespace" -}}
+{{- default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a fully qualified app name adding the installation's namespace.
+*/}}
+{{- define "common.names.fullname.namespace" -}}
+{{- printf "%s-%s" (include "common.names.fullname" .) (include "common.names.namespace" .) | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_resources.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_resources.tpl
new file mode 100644
index 0000000..d8a43e1
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_resources.tpl
@@ -0,0 +1,50 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Return a resource request/limit object based on a given preset.
+These presets are for basic testing and not meant to be used in production
+{{ include "common.resources.preset" (dict "type" "nano") -}}
+*/}}
+{{- define "common.resources.preset" -}}
+{{/* The limits are the requests increased by 50% (except ephemeral-storage and xlarge/2xlarge sizes)*/}}
+{{- $presets := dict
+ "nano" (dict
+ "requests" (dict "cpu" "100m" "memory" "128Mi" "ephemeral-storage" "50Mi")
+ "limits" (dict "cpu" "150m" "memory" "192Mi" "ephemeral-storage" "2Gi")
+ )
+ "micro" (dict
+ "requests" (dict "cpu" "250m" "memory" "256Mi" "ephemeral-storage" "50Mi")
+ "limits" (dict "cpu" "375m" "memory" "384Mi" "ephemeral-storage" "2Gi")
+ )
+ "small" (dict
+ "requests" (dict "cpu" "500m" "memory" "512Mi" "ephemeral-storage" "50Mi")
+ "limits" (dict "cpu" "750m" "memory" "768Mi" "ephemeral-storage" "2Gi")
+ )
+ "medium" (dict
+ "requests" (dict "cpu" "500m" "memory" "1024Mi" "ephemeral-storage" "50Mi")
+ "limits" (dict "cpu" "750m" "memory" "1536Mi" "ephemeral-storage" "2Gi")
+ )
+ "large" (dict
+ "requests" (dict "cpu" "1.0" "memory" "2048Mi" "ephemeral-storage" "50Mi")
+ "limits" (dict "cpu" "1.5" "memory" "3072Mi" "ephemeral-storage" "2Gi")
+ )
+ "xlarge" (dict
+ "requests" (dict "cpu" "1.0" "memory" "3072Mi" "ephemeral-storage" "50Mi")
+ "limits" (dict "cpu" "3.0" "memory" "6144Mi" "ephemeral-storage" "2Gi")
+ )
+ "2xlarge" (dict
+ "requests" (dict "cpu" "1.0" "memory" "3072Mi" "ephemeral-storage" "50Mi")
+ "limits" (dict "cpu" "6.0" "memory" "12288Mi" "ephemeral-storage" "2Gi")
+ )
+ }}
+{{- if hasKey $presets .type -}}
+{{- index $presets .type | toYaml -}}
+{{- else -}}
+{{- printf "ERROR: Preset key '%s' invalid. Allowed values are %s" .type (join "," (keys $presets)) | fail -}}
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_secrets.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_secrets.tpl
new file mode 100644
index 0000000..7868c00
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_secrets.tpl
@@ -0,0 +1,192 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Generate secret name.
+
+Usage:
+{{ include "common.secrets.name" (dict "existingSecret" .Values.path.to.the.existingSecret "defaultNameSuffix" "mySuffix" "context" $) }}
+
+Params:
+ - existingSecret - ExistingSecret/String - Optional. The path to the existing secrets in the values.yaml given by the user
+ to be used instead of the default one. Allows for it to be of type String (just the secret name) for backwards compatibility.
+ +info: https://github.com/bitnami/charts/tree/main/bitnami/common#existingsecret
+ - defaultNameSuffix - String - Optional. It is used only if we have several secrets in the same deployment.
+ - context - Dict - Required. The context for the template evaluation.
+*/}}
+{{- define "common.secrets.name" -}}
+{{- $name := (include "common.names.fullname" .context) -}}
+
+{{- if .defaultNameSuffix -}}
+{{- $name = printf "%s-%s" $name .defaultNameSuffix | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- with .existingSecret -}}
+{{- if not (typeIs "string" .) -}}
+{{- with .name -}}
+{{- $name = . -}}
+{{- end -}}
+{{- else -}}
+{{- $name = . -}}
+{{- end -}}
+{{- end -}}
+
+{{- printf "%s" $name -}}
+{{- end -}}
+
+{{/*
+Generate secret key.
+
+Usage:
+{{ include "common.secrets.key" (dict "existingSecret" .Values.path.to.the.existingSecret "key" "keyName") }}
+
+Params:
+ - existingSecret - ExistingSecret/String - Optional. The path to the existing secrets in the values.yaml given by the user
+ to be used instead of the default one. Allows for it to be of type String (just the secret name) for backwards compatibility.
+ +info: https://github.com/bitnami/charts/tree/main/bitnami/common#existingsecret
+ - key - String - Required. Name of the key in the secret.
+*/}}
+{{- define "common.secrets.key" -}}
+{{- $key := .key -}}
+
+{{- if .existingSecret -}}
+ {{- if not (typeIs "string" .existingSecret) -}}
+ {{- if .existingSecret.keyMapping -}}
+ {{- $key = index .existingSecret.keyMapping $.key -}}
+ {{- end -}}
+ {{- end }}
+{{- end -}}
+
+{{- printf "%s" $key -}}
+{{- end -}}
+
+{{/*
+Generate secret password or retrieve one if already created.
+
+Usage:
+{{ include "common.secrets.passwords.manage" (dict "secret" "secret-name" "key" "keyName" "providedValues" (list "path.to.password1" "path.to.password2") "length" 10 "strong" false "chartName" "chartName" "honorProvidedValues" false "context" $) }}
+
+Params:
+ - secret - String - Required - Name of the 'Secret' resource where the password is stored.
+ - key - String - Required - Name of the key in the secret.
+ - providedValues - List - Required - The path to the validating value in the values.yaml, e.g: "mysql.password". Will pick first parameter with a defined value.
+ - length - int - Optional - Length of the generated random password.
+ - strong - Boolean - Optional - Whether to add symbols to the generated random password.
+ - chartName - String - Optional - Name of the chart used when said chart is deployed as a subchart.
+ - context - Context - Required - Parent context.
+ - failOnNew - Boolean - Optional - Default to true. If set to false, skip errors adding new keys to existing secrets.
+ - skipB64enc - Boolean - Optional - Default to false. If set to true, no the secret will not be base64 encrypted.
+ - skipQuote - Boolean - Optional - Default to false. If set to true, no quotes will be added around the secret.
+ - honorProvidedValues - Boolean - Optional - Default to false. If set to true, the values in providedValues have higher priority than an existing secret
+The order in which this function returns a secret password:
+ 1. Password provided via the values.yaml if honorProvidedValues = true
+ (If one of the keys passed to the 'providedValues' parameter to this function is a valid path to a key in the values.yaml and has a value, the value of the first key with a value will be returned)
+ 2. Already existing 'Secret' resource
+ (If a 'Secret' resource is found under the name provided to the 'secret' parameter to this function and that 'Secret' resource contains a key with the name passed as the 'key' parameter to this function then the value of this existing secret password will be returned)
+ 3. Password provided via the values.yaml if honorProvidedValues = false
+ (If one of the keys passed to the 'providedValues' parameter to this function is a valid path to a key in the values.yaml and has a value, the value of the first key with a value will be returned)
+ 4. Randomly generated secret password
+ (A new random secret password with the length specified in the 'length' parameter will be generated and returned)
+
+*/}}
+{{- define "common.secrets.passwords.manage" -}}
+
+{{- $password := "" }}
+{{- $subchart := "" }}
+{{- $chartName := default "" .chartName }}
+{{- $passwordLength := default 10 .length }}
+{{- $providedPasswordKey := include "common.utils.getKeyFromList" (dict "keys" .providedValues "context" $.context) }}
+{{- $providedPasswordValue := include "common.utils.getValueFromKey" (dict "key" $providedPasswordKey "context" $.context) }}
+{{- $secretData := (lookup "v1" "Secret" (include "common.names.namespace" .context) .secret).data }}
+{{- if $secretData }}
+ {{- if hasKey $secretData .key }}
+ {{- $password = index $secretData .key | b64dec }}
+ {{- else if not (eq .failOnNew false) }}
+ {{- printf "\nPASSWORDS ERROR: The secret \"%s\" does not contain the key \"%s\"\n" .secret .key | fail -}}
+ {{- end -}}
+{{- end }}
+
+{{- if and $providedPasswordValue .honorProvidedValues }}
+ {{- $password = tpl ($providedPasswordValue | toString) .context }}
+{{- end }}
+
+{{- if not $password }}
+ {{- if $providedPasswordValue }}
+ {{- $password = tpl ($providedPasswordValue | toString) .context }}
+ {{- else }}
+ {{- if .context.Values.enabled }}
+ {{- $subchart = $chartName }}
+ {{- end -}}
+
+ {{- if not (eq .failOnNew false) }}
+ {{- $requiredPassword := dict "valueKey" $providedPasswordKey "secret" .secret "field" .key "subchart" $subchart "context" $.context -}}
+ {{- $requiredPasswordError := include "common.validations.values.single.empty" $requiredPassword -}}
+ {{- $passwordValidationErrors := list $requiredPasswordError -}}
+ {{- include "common.errors.upgrade.passwords.empty" (dict "validationErrors" $passwordValidationErrors "context" $.context) -}}
+ {{- end }}
+
+ {{- if .strong }}
+ {{- $subStr := list (lower (randAlpha 1)) (randNumeric 1) (upper (randAlpha 1)) | join "_" }}
+ {{- $password = randAscii $passwordLength }}
+ {{- $password = regexReplaceAllLiteral "\\W" $password "@" | substr 5 $passwordLength }}
+ {{- $password = printf "%s%s" $subStr $password | toString | shuffle }}
+ {{- else }}
+ {{- $password = randAlphaNum $passwordLength }}
+ {{- end }}
+ {{- end -}}
+{{- end -}}
+{{- if not .skipB64enc }}
+{{- $password = $password | b64enc }}
+{{- end -}}
+{{- if .skipQuote -}}
+{{- printf "%s" $password -}}
+{{- else -}}
+{{- printf "%s" $password | quote -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Reuses the value from an existing secret, otherwise sets its value to a default value.
+
+Usage:
+{{ include "common.secrets.lookup" (dict "secret" "secret-name" "key" "keyName" "defaultValue" .Values.myValue "context" $) }}
+
+Params:
+ - secret - String - Required - Name of the 'Secret' resource where the password is stored.
+ - key - String - Required - Name of the key in the secret.
+ - defaultValue - String - Required - The path to the validating value in the values.yaml, e.g: "mysql.password". Will pick first parameter with a defined value.
+ - context - Context - Required - Parent context.
+
+*/}}
+{{- define "common.secrets.lookup" -}}
+{{- $value := "" -}}
+{{- $secretData := (lookup "v1" "Secret" (include "common.names.namespace" .context) .secret).data -}}
+{{- if and $secretData (hasKey $secretData .key) -}}
+ {{- $value = index $secretData .key -}}
+{{- else if .defaultValue -}}
+ {{- $value = .defaultValue | toString | b64enc -}}
+{{- end -}}
+{{- if $value -}}
+{{- printf "%s" $value -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Returns whether a previous generated secret already exists
+
+Usage:
+{{ include "common.secrets.exists" (dict "secret" "secret-name" "context" $) }}
+
+Params:
+ - secret - String - Required - Name of the 'Secret' resource where the password is stored.
+ - context - Context - Required - Parent context.
+*/}}
+{{- define "common.secrets.exists" -}}
+{{- $secret := (lookup "v1" "Secret" (include "common.names.namespace" .context) .secret) }}
+{{- if $secret }}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_storage.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_storage.tpl
new file mode 100644
index 0000000..aa75856
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_storage.tpl
@@ -0,0 +1,21 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Return the proper Storage Class
+{{ include "common.storage.class" ( dict "persistence" .Values.path.to.the.persistence "global" $) }}
+*/}}
+{{- define "common.storage.class" -}}
+{{- $storageClass := (.global).storageClass | default .persistence.storageClass | default (.global).defaultStorageClass | default "" -}}
+{{- if $storageClass -}}
+ {{- if (eq "-" $storageClass) -}}
+ {{- printf "storageClassName: \"\"" -}}
+ {{- else -}}
+ {{- printf "storageClassName: %s" $storageClass -}}
+ {{- end -}}
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_tplvalues.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_tplvalues.tpl
new file mode 100644
index 0000000..a04f4c1
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_tplvalues.tpl
@@ -0,0 +1,52 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Renders a value that contains template perhaps with scope if the scope is present.
+Usage:
+{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ ) }}
+{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ "scope" $app ) }}
+*/}}
+{{- define "common.tplvalues.render" -}}
+{{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }}
+{{- if contains "{{" (toJson .value) }}
+ {{- if .scope }}
+ {{- tpl (cat "{{- with $.RelativeScope -}}" $value "{{- end }}") (merge (dict "RelativeScope" .scope) .context) }}
+ {{- else }}
+ {{- tpl $value .context }}
+ {{- end }}
+{{- else }}
+ {{- $value }}
+{{- end }}
+{{- end -}}
+
+{{/*
+Merge a list of values that contains template after rendering them.
+Merge precedence is consistent with http://masterminds.github.io/sprig/dicts.html#merge-mustmerge
+Usage:
+{{ include "common.tplvalues.merge" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }}
+*/}}
+{{- define "common.tplvalues.merge" -}}
+{{- $dst := dict -}}
+{{- range .values -}}
+{{- $dst = include "common.tplvalues.render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | merge $dst -}}
+{{- end -}}
+{{ $dst | toYaml }}
+{{- end -}}
+
+{{/*
+Merge a list of values that contains template after rendering them.
+Merge precedence is consistent with https://masterminds.github.io/sprig/dicts.html#mergeoverwrite-mustmergeoverwrite
+Usage:
+{{ include "common.tplvalues.merge-overwrite" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }}
+*/}}
+{{- define "common.tplvalues.merge-overwrite" -}}
+{{- $dst := dict -}}
+{{- range .values -}}
+{{- $dst = include "common.tplvalues.render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | mergeOverwrite $dst -}}
+{{- end -}}
+{{ $dst | toYaml }}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_utils.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_utils.tpl
new file mode 100644
index 0000000..d53c74a
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_utils.tpl
@@ -0,0 +1,77 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Print instructions to get a secret value.
+Usage:
+{{ include "common.utils.secret.getvalue" (dict "secret" "secret-name" "field" "secret-value-field" "context" $) }}
+*/}}
+{{- define "common.utils.secret.getvalue" -}}
+{{- $varname := include "common.utils.fieldToEnvVar" . -}}
+export {{ $varname }}=$(kubectl get secret --namespace {{ include "common.names.namespace" .context | quote }} {{ .secret }} -o jsonpath="{.data.{{ .field }}}" | base64 -d)
+{{- end -}}
+
+{{/*
+Build env var name given a field
+Usage:
+{{ include "common.utils.fieldToEnvVar" dict "field" "my-password" }}
+*/}}
+{{- define "common.utils.fieldToEnvVar" -}}
+ {{- $fieldNameSplit := splitList "-" .field -}}
+ {{- $upperCaseFieldNameSplit := list -}}
+
+ {{- range $fieldNameSplit -}}
+ {{- $upperCaseFieldNameSplit = append $upperCaseFieldNameSplit ( upper . ) -}}
+ {{- end -}}
+
+ {{ join "_" $upperCaseFieldNameSplit }}
+{{- end -}}
+
+{{/*
+Gets a value from .Values given
+Usage:
+{{ include "common.utils.getValueFromKey" (dict "key" "path.to.key" "context" $) }}
+*/}}
+{{- define "common.utils.getValueFromKey" -}}
+{{- $splitKey := splitList "." .key -}}
+{{- $value := "" -}}
+{{- $latestObj := $.context.Values -}}
+{{- range $splitKey -}}
+ {{- if not $latestObj -}}
+ {{- printf "please review the entire path of '%s' exists in values" $.key | fail -}}
+ {{- end -}}
+ {{- $value = ( index $latestObj . ) -}}
+ {{- $latestObj = $value -}}
+{{- end -}}
+{{- printf "%v" (default "" $value) -}}
+{{- end -}}
+
+{{/*
+Returns first .Values key with a defined value or first of the list if all non-defined
+Usage:
+{{ include "common.utils.getKeyFromList" (dict "keys" (list "path.to.key1" "path.to.key2") "context" $) }}
+*/}}
+{{- define "common.utils.getKeyFromList" -}}
+{{- $key := first .keys -}}
+{{- $reverseKeys := reverse .keys }}
+{{- range $reverseKeys }}
+ {{- $value := include "common.utils.getValueFromKey" (dict "key" . "context" $.context ) }}
+ {{- if $value -}}
+ {{- $key = . }}
+ {{- end -}}
+{{- end -}}
+{{- printf "%s" $key -}}
+{{- end -}}
+
+{{/*
+Checksum a template at "path" containing a *single* resource (ConfigMap,Secret) for use in pod annotations, excluding the metadata (see #18376).
+Usage:
+{{ include "common.utils.checksumTemplate" (dict "path" "/configmap.yaml" "context" $) }}
+*/}}
+{{- define "common.utils.checksumTemplate" -}}
+{{- $obj := include (print .context.Template.BasePath .path) .context | fromYaml -}}
+{{ omit $obj "apiVersion" "kind" "metadata" | toYaml | sha256sum }}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/_warnings.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/_warnings.tpl
new file mode 100644
index 0000000..62c44df
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/_warnings.tpl
@@ -0,0 +1,109 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Warning about using rolling tag.
+Usage:
+{{ include "common.warnings.rollingTag" .Values.path.to.the.imageRoot }}
+*/}}
+{{- define "common.warnings.rollingTag" -}}
+
+{{- if and (contains "bitnami/" .repository) (not (.tag | toString | regexFind "-r\\d+$|sha256:")) }}
+WARNING: Rolling tag detected ({{ .repository }}:{{ .tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment.
++info https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-understand-rolling-tags-containers-index.html
+{{- end }}
+{{- end -}}
+
+{{/*
+Warning about replaced images from the original.
+Usage:
+{{ include "common.warnings.modifiedImages" (dict "images" (list .Values.path.to.the.imageRoot) "context" $) }}
+*/}}
+{{- define "common.warnings.modifiedImages" -}}
+{{- $affectedImages := list -}}
+{{- $printMessage := false -}}
+{{- $originalImages := .context.Chart.Annotations.images -}}
+{{- range .images -}}
+ {{- $fullImageName := printf (printf "%s/%s:%s" .registry .repository .tag) -}}
+ {{- if not (contains $fullImageName $originalImages) }}
+ {{- $affectedImages = append $affectedImages (printf "%s/%s:%s" .registry .repository .tag) -}}
+ {{- $printMessage = true -}}
+ {{- end -}}
+{{- end -}}
+{{- if $printMessage }}
+
+⚠ SECURITY WARNING: Original containers have been substituted. This Helm chart was designed, tested, and validated on multiple platforms using a specific set of Bitnami and Tanzu Application Catalog containers. Substituting other containers is likely to cause degraded security and performance, broken chart features, and missing environment variables.
+
+Substituted images detected:
+{{- range $affectedImages }}
+ - {{ . }}
+{{- end }}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Warning about not setting the resource object in all deployments.
+Usage:
+{{ include "common.warnings.resources" (dict "sections" (list "path1" "path2") context $) }}
+Example:
+{{- include "common.warnings.resources" (dict "sections" (list "csiProvider.provider" "server" "volumePermissions" "") "context" $) }}
+The list in the example assumes that the following values exist:
+ - csiProvider.provider.resources
+ - server.resources
+ - volumePermissions.resources
+ - resources
+*/}}
+{{- define "common.warnings.resources" -}}
+{{- $values := .context.Values -}}
+{{- $printMessage := false -}}
+{{ $affectedSections := list -}}
+{{- range .sections -}}
+ {{- if eq . "" -}}
+ {{/* Case where the resources section is at the root (one main deployment in the chart) */}}
+ {{- if not (index $values "resources") -}}
+ {{- $affectedSections = append $affectedSections "resources" -}}
+ {{- $printMessage = true -}}
+ {{- end -}}
+ {{- else -}}
+ {{/* Case where the are multiple resources sections (more than one main deployment in the chart) */}}
+ {{- $keys := split "." . -}}
+ {{/* We iterate through the different levels until arriving to the resource section. Example: a.b.c.resources */}}
+ {{- $section := $values -}}
+ {{- range $keys -}}
+ {{- $section = index $section . -}}
+ {{- end -}}
+ {{- if not (index $section "resources") -}}
+ {{/* If the section has enabled=false or replicaCount=0, do not include it */}}
+ {{- if and (hasKey $section "enabled") -}}
+ {{- if index $section "enabled" -}}
+ {{/* enabled=true */}}
+ {{- $affectedSections = append $affectedSections (printf "%s.resources" .) -}}
+ {{- $printMessage = true -}}
+ {{- end -}}
+ {{- else if and (hasKey $section "replicaCount") -}}
+ {{/* We need a casting to int because number 0 is not treated as an int by default */}}
+ {{- if (gt (index $section "replicaCount" | int) 0) -}}
+ {{/* replicaCount > 0 */}}
+ {{- $affectedSections = append $affectedSections (printf "%s.resources" .) -}}
+ {{- $printMessage = true -}}
+ {{- end -}}
+ {{- else -}}
+ {{/* Default case, add it to the affected sections */}}
+ {{- $affectedSections = append $affectedSections (printf "%s.resources" .) -}}
+ {{- $printMessage = true -}}
+ {{- end -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+{{- if $printMessage }}
+
+WARNING: There are "resources" sections in the chart not set. Using "resourcesPreset" is not recommended for production. For production installations, please set the following values according to your workload needs:
+{{- range $affectedSections }}
+ - {{ . }}
+{{- end }}
++info https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/validations/_cassandra.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/validations/_cassandra.tpl
new file mode 100644
index 0000000..f8fd213
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/validations/_cassandra.tpl
@@ -0,0 +1,51 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Auxiliary function to get the right value for existingSecret.
+
+Usage:
+{{ include "common.cassandra.values.existingSecret" (dict "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether Cassandra is used as subchart or not. Default: false
+*/}}
+{{- define "common.cassandra.values.existingSecret" -}}
+ {{- if .subchart -}}
+ {{- .context.Values.cassandra.dbUser.existingSecret | quote -}}
+ {{- else -}}
+ {{- .context.Values.dbUser.existingSecret | quote -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for enabled cassandra.
+
+Usage:
+{{ include "common.cassandra.values.enabled" (dict "context" $) }}
+*/}}
+{{- define "common.cassandra.values.enabled" -}}
+ {{- if .subchart -}}
+ {{- printf "%v" .context.Values.cassandra.enabled -}}
+ {{- else -}}
+ {{- printf "%v" (not .context.Values.enabled) -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for the key dbUser
+
+Usage:
+{{ include "common.cassandra.values.key.dbUser" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether Cassandra is used as subchart or not. Default: false
+*/}}
+{{- define "common.cassandra.values.key.dbUser" -}}
+ {{- if .subchart -}}
+ cassandra.dbUser
+ {{- else -}}
+ dbUser
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/validations/_mariadb.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/validations/_mariadb.tpl
new file mode 100644
index 0000000..6ea8c0f
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/validations/_mariadb.tpl
@@ -0,0 +1,108 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Validate MariaDB required passwords are not empty.
+
+Usage:
+{{ include "common.validations.values.mariadb.passwords" (dict "secret" "secretName" "subchart" false "context" $) }}
+Params:
+ - secret - String - Required. Name of the secret where MariaDB values are stored, e.g: "mysql-passwords-secret"
+ - subchart - Boolean - Optional. Whether MariaDB is used as subchart or not. Default: false
+*/}}
+{{- define "common.validations.values.mariadb.passwords" -}}
+ {{- $existingSecret := include "common.mariadb.values.auth.existingSecret" . -}}
+ {{- $enabled := include "common.mariadb.values.enabled" . -}}
+ {{- $architecture := include "common.mariadb.values.architecture" . -}}
+ {{- $authPrefix := include "common.mariadb.values.key.auth" . -}}
+ {{- $valueKeyRootPassword := printf "%s.rootPassword" $authPrefix -}}
+ {{- $valueKeyUsername := printf "%s.username" $authPrefix -}}
+ {{- $valueKeyPassword := printf "%s.password" $authPrefix -}}
+ {{- $valueKeyReplicationPassword := printf "%s.replicationPassword" $authPrefix -}}
+
+ {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}}
+ {{- $requiredPasswords := list -}}
+
+ {{- $requiredRootPassword := dict "valueKey" $valueKeyRootPassword "secret" .secret "field" "mariadb-root-password" -}}
+ {{- $requiredPasswords = append $requiredPasswords $requiredRootPassword -}}
+
+ {{- $valueUsername := include "common.utils.getValueFromKey" (dict "key" $valueKeyUsername "context" .context) }}
+ {{- if not (empty $valueUsername) -}}
+ {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "mariadb-password" -}}
+ {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}}
+ {{- end -}}
+
+ {{- if (eq $architecture "replication") -}}
+ {{- $requiredReplicationPassword := dict "valueKey" $valueKeyReplicationPassword "secret" .secret "field" "mariadb-replication-password" -}}
+ {{- $requiredPasswords = append $requiredPasswords $requiredReplicationPassword -}}
+ {{- end -}}
+
+ {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}}
+
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for existingSecret.
+
+Usage:
+{{ include "common.mariadb.values.auth.existingSecret" (dict "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MariaDB is used as subchart or not. Default: false
+*/}}
+{{- define "common.mariadb.values.auth.existingSecret" -}}
+ {{- if .subchart -}}
+ {{- .context.Values.mariadb.auth.existingSecret | quote -}}
+ {{- else -}}
+ {{- .context.Values.auth.existingSecret | quote -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for enabled mariadb.
+
+Usage:
+{{ include "common.mariadb.values.enabled" (dict "context" $) }}
+*/}}
+{{- define "common.mariadb.values.enabled" -}}
+ {{- if .subchart -}}
+ {{- printf "%v" .context.Values.mariadb.enabled -}}
+ {{- else -}}
+ {{- printf "%v" (not .context.Values.enabled) -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for architecture
+
+Usage:
+{{ include "common.mariadb.values.architecture" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MariaDB is used as subchart or not. Default: false
+*/}}
+{{- define "common.mariadb.values.architecture" -}}
+ {{- if .subchart -}}
+ {{- .context.Values.mariadb.architecture -}}
+ {{- else -}}
+ {{- .context.Values.architecture -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for the key auth
+
+Usage:
+{{ include "common.mariadb.values.key.auth" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MariaDB is used as subchart or not. Default: false
+*/}}
+{{- define "common.mariadb.values.key.auth" -}}
+ {{- if .subchart -}}
+ mariadb.auth
+ {{- else -}}
+ auth
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/validations/_mongodb.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/validations/_mongodb.tpl
new file mode 100644
index 0000000..e678a6d
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/validations/_mongodb.tpl
@@ -0,0 +1,67 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Auxiliary function to get the right value for existingSecret.
+
+Usage:
+{{ include "common.mongodb.values.auth.existingSecret" (dict "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MongoDb is used as subchart or not. Default: false
+*/}}
+{{- define "common.mongodb.values.auth.existingSecret" -}}
+ {{- if .subchart -}}
+ {{- .context.Values.mongodb.auth.existingSecret | quote -}}
+ {{- else -}}
+ {{- .context.Values.auth.existingSecret | quote -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for enabled mongodb.
+
+Usage:
+{{ include "common.mongodb.values.enabled" (dict "context" $) }}
+*/}}
+{{- define "common.mongodb.values.enabled" -}}
+ {{- if .subchart -}}
+ {{- printf "%v" .context.Values.mongodb.enabled -}}
+ {{- else -}}
+ {{- printf "%v" (not .context.Values.enabled) -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for the key auth
+
+Usage:
+{{ include "common.mongodb.values.key.auth" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MongoDB® is used as subchart or not. Default: false
+*/}}
+{{- define "common.mongodb.values.key.auth" -}}
+ {{- if .subchart -}}
+ mongodb.auth
+ {{- else -}}
+ auth
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for architecture
+
+Usage:
+{{ include "common.mongodb.values.architecture" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MongoDB® is used as subchart or not. Default: false
+*/}}
+{{- define "common.mongodb.values.architecture" -}}
+ {{- if .subchart -}}
+ {{- .context.Values.mongodb.architecture -}}
+ {{- else -}}
+ {{- .context.Values.architecture -}}
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/validations/_mysql.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/validations/_mysql.tpl
new file mode 100644
index 0000000..fbb65c3
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/validations/_mysql.tpl
@@ -0,0 +1,67 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Auxiliary function to get the right value for existingSecret.
+
+Usage:
+{{ include "common.mysql.values.auth.existingSecret" (dict "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false
+*/}}
+{{- define "common.mysql.values.auth.existingSecret" -}}
+ {{- if .subchart -}}
+ {{- .context.Values.mysql.auth.existingSecret | quote -}}
+ {{- else -}}
+ {{- .context.Values.auth.existingSecret | quote -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for enabled mysql.
+
+Usage:
+{{ include "common.mysql.values.enabled" (dict "context" $) }}
+*/}}
+{{- define "common.mysql.values.enabled" -}}
+ {{- if .subchart -}}
+ {{- printf "%v" .context.Values.mysql.enabled -}}
+ {{- else -}}
+ {{- printf "%v" (not .context.Values.enabled) -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for architecture
+
+Usage:
+{{ include "common.mysql.values.architecture" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false
+*/}}
+{{- define "common.mysql.values.architecture" -}}
+ {{- if .subchart -}}
+ {{- .context.Values.mysql.architecture -}}
+ {{- else -}}
+ {{- .context.Values.architecture -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for the key auth
+
+Usage:
+{{ include "common.mysql.values.key.auth" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false
+*/}}
+{{- define "common.mysql.values.key.auth" -}}
+ {{- if .subchart -}}
+ mysql.auth
+ {{- else -}}
+ auth
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/validations/_postgresql.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/validations/_postgresql.tpl
new file mode 100644
index 0000000..51d4716
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/validations/_postgresql.tpl
@@ -0,0 +1,105 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Auxiliary function to decide whether evaluate global values.
+
+Usage:
+{{ include "common.postgresql.values.use.global" (dict "key" "key-of-global" "context" $) }}
+Params:
+ - key - String - Required. Field to be evaluated within global, e.g: "existingSecret"
+*/}}
+{{- define "common.postgresql.values.use.global" -}}
+ {{- if .context.Values.global -}}
+ {{- if .context.Values.global.postgresql -}}
+ {{- index .context.Values.global.postgresql .key | quote -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for existingSecret.
+
+Usage:
+{{ include "common.postgresql.values.existingSecret" (dict "context" $) }}
+*/}}
+{{- define "common.postgresql.values.existingSecret" -}}
+ {{- $globalValue := include "common.postgresql.values.use.global" (dict "key" "existingSecret" "context" .context) -}}
+
+ {{- if .subchart -}}
+ {{- default (.context.Values.postgresql.existingSecret | quote) $globalValue -}}
+ {{- else -}}
+ {{- default (.context.Values.existingSecret | quote) $globalValue -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for enabled postgresql.
+
+Usage:
+{{ include "common.postgresql.values.enabled" (dict "context" $) }}
+*/}}
+{{- define "common.postgresql.values.enabled" -}}
+ {{- if .subchart -}}
+ {{- printf "%v" .context.Values.postgresql.enabled -}}
+ {{- else -}}
+ {{- printf "%v" (not .context.Values.enabled) -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for the key postgressPassword.
+
+Usage:
+{{ include "common.postgresql.values.key.postgressPassword" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether postgresql is used as subchart or not. Default: false
+*/}}
+{{- define "common.postgresql.values.key.postgressPassword" -}}
+ {{- $globalValue := include "common.postgresql.values.use.global" (dict "key" "postgresqlUsername" "context" .context) -}}
+
+ {{- if not $globalValue -}}
+ {{- if .subchart -}}
+ postgresql.postgresqlPassword
+ {{- else -}}
+ postgresqlPassword
+ {{- end -}}
+ {{- else -}}
+ global.postgresql.postgresqlPassword
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for enabled.replication.
+
+Usage:
+{{ include "common.postgresql.values.enabled.replication" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether postgresql is used as subchart or not. Default: false
+*/}}
+{{- define "common.postgresql.values.enabled.replication" -}}
+ {{- if .subchart -}}
+ {{- printf "%v" .context.Values.postgresql.replication.enabled -}}
+ {{- else -}}
+ {{- printf "%v" .context.Values.replication.enabled -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right value for the key replication.password.
+
+Usage:
+{{ include "common.postgresql.values.key.replicationPassword" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether postgresql is used as subchart or not. Default: false
+*/}}
+{{- define "common.postgresql.values.key.replicationPassword" -}}
+ {{- if .subchart -}}
+ postgresql.replication.password
+ {{- else -}}
+ replication.password
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/validations/_redis.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/validations/_redis.tpl
new file mode 100644
index 0000000..9fedfef
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/validations/_redis.tpl
@@ -0,0 +1,48 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Auxiliary function to get the right value for enabled redis.
+
+Usage:
+{{ include "common.redis.values.enabled" (dict "context" $) }}
+*/}}
+{{- define "common.redis.values.enabled" -}}
+ {{- if .subchart -}}
+ {{- printf "%v" .context.Values.redis.enabled -}}
+ {{- else -}}
+ {{- printf "%v" (not .context.Values.enabled) -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Auxiliary function to get the right prefix path for the values
+
+Usage:
+{{ include "common.redis.values.key.prefix" (dict "subchart" "true" "context" $) }}
+Params:
+ - subchart - Boolean - Optional. Whether redis is used as subchart or not. Default: false
+*/}}
+{{- define "common.redis.values.keys.prefix" -}}
+ {{- if .subchart -}}redis.{{- else -}}{{- end -}}
+{{- end -}}
+
+{{/*
+Checks whether the redis chart's includes the standarizations (version >= 14)
+
+Usage:
+{{ include "common.redis.values.standarized.version" (dict "context" $) }}
+*/}}
+{{- define "common.redis.values.standarized.version" -}}
+
+ {{- $standarizedAuth := printf "%s%s" (include "common.redis.values.keys.prefix" .) "auth" -}}
+ {{- $standarizedAuthValues := include "common.utils.getValueFromKey" (dict "key" $standarizedAuth "context" .context) }}
+
+ {{- if $standarizedAuthValues -}}
+ {{- true -}}
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/templates/validations/_validations.tpl b/charts/semaphore/charts/postgresql/charts/common/templates/validations/_validations.tpl
new file mode 100644
index 0000000..7cdee61
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/templates/validations/_validations.tpl
@@ -0,0 +1,51 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Validate values must not be empty.
+
+Usage:
+{{- $validateValueConf00 := (dict "valueKey" "path.to.value" "secret" "secretName" "field" "password-00") -}}
+{{- $validateValueConf01 := (dict "valueKey" "path.to.value" "secret" "secretName" "field" "password-01") -}}
+{{ include "common.validations.values.empty" (dict "required" (list $validateValueConf00 $validateValueConf01) "context" $) }}
+
+Validate value params:
+ - valueKey - String - Required. The path to the validating value in the values.yaml, e.g: "mysql.password"
+ - secret - String - Optional. Name of the secret where the validating value is generated/stored, e.g: "mysql-passwords-secret"
+ - field - String - Optional. Name of the field in the secret data, e.g: "mysql-password"
+*/}}
+{{- define "common.validations.values.multiple.empty" -}}
+ {{- range .required -}}
+ {{- include "common.validations.values.single.empty" (dict "valueKey" .valueKey "secret" .secret "field" .field "context" $.context) -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Validate a value must not be empty.
+
+Usage:
+{{ include "common.validations.value.empty" (dict "valueKey" "mariadb.password" "secret" "secretName" "field" "my-password" "subchart" "subchart" "context" $) }}
+
+Validate value params:
+ - valueKey - String - Required. The path to the validating value in the values.yaml, e.g: "mysql.password"
+ - secret - String - Optional. Name of the secret where the validating value is generated/stored, e.g: "mysql-passwords-secret"
+ - field - String - Optional. Name of the field in the secret data, e.g: "mysql-password"
+ - subchart - String - Optional - Name of the subchart that the validated password is part of.
+*/}}
+{{- define "common.validations.values.single.empty" -}}
+ {{- $value := include "common.utils.getValueFromKey" (dict "key" .valueKey "context" .context) }}
+ {{- $subchart := ternary "" (printf "%s." .subchart) (empty .subchart) }}
+
+ {{- if not $value -}}
+ {{- $varname := "my-value" -}}
+ {{- $getCurrentValue := "" -}}
+ {{- if and .secret .field -}}
+ {{- $varname = include "common.utils.fieldToEnvVar" . -}}
+ {{- $getCurrentValue = printf " To get the current value:\n\n %s\n" (include "common.utils.secret.getvalue" .) -}}
+ {{- end -}}
+ {{- printf "\n '%s' must not be empty, please add '--set %s%s=$%s' to the command.%s" .valueKey $subchart .valueKey $varname $getCurrentValue -}}
+ {{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/charts/common/values.yaml b/charts/semaphore/charts/postgresql/charts/common/values.yaml
new file mode 100644
index 0000000..de2cac5
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/charts/common/values.yaml
@@ -0,0 +1,8 @@
+# Copyright Broadcom, Inc. All Rights Reserved.
+# SPDX-License-Identifier: APACHE-2.0
+
+## bitnami/common
+## It is required by CI/CD tools and processes.
+## @skip exampleValue
+##
+exampleValue: common-chart
diff --git a/charts/semaphore/charts/postgresql/templates/NOTES.txt b/charts/semaphore/charts/postgresql/templates/NOTES.txt
new file mode 100644
index 0000000..1a086d2
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/NOTES.txt
@@ -0,0 +1,123 @@
+{{- $releaseNamespace := include "common.names.namespace" . }}
+CHART NAME: {{ .Chart.Name }}
+CHART VERSION: {{ .Chart.Version }}
+APP VERSION: {{ .Chart.AppVersion }}
+
+⚠ WARNING: Since August 28th, 2025, only a limited subset of images/charts are available for free.
+ Subscribe to Bitnami Secure Images to receive continued support and security updates.
+ More info at https://bitnami.com and https://github.com/bitnami/containers/issues/83267
+
+** Please be patient while the chart is being deployed **
+
+{{- if .Values.diagnosticMode.enabled }}
+The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with:
+
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }}
+
+Get the list of pods by executing:
+
+ kubectl get pods --namespace {{ $releaseNamespace }} -l app.kubernetes.io/instance={{ .Release.Name }}
+
+Access the pod you want to debug by executing
+
+ kubectl exec --namespace {{ $releaseNamespace }} -ti -- /opt/bitnami/scripts/postgresql/entrypoint.sh /bin/bash
+
+In order to replicate the container startup scripts execute this command:
+
+ /opt/bitnami/scripts/postgresql/entrypoint.sh /opt/bitnami/scripts/postgresql/run.sh
+
+{{- else }}
+
+{{- $customUser := include "postgresql.v1.username" . }}
+{{- $postgresPassword := include "common.secrets.lookup" (dict "secret" (include "postgresql.v1.chart.fullname" .) "key" .Values.auth.secretKeys.adminPasswordKey "defaultValue" (ternary .Values.auth.postgresPassword .Values.auth.password (eq $customUser "postgres")) "context" $) -}}
+{{- $authEnabled := and (not (or .Values.global.postgresql.auth.existingSecret .Values.auth.existingSecret)) (or $postgresPassword .Values.auth.enablePostgresUser (and (not (empty $customUser)) (ne $customUser "postgres"))) }}
+{{- if not $authEnabled }}
+
+WARNING: PostgreSQL has been configured without authentication, this is not recommended for production environments.
+{{- end }}
+
+PostgreSQL can be accessed via port {{ include "postgresql.v1.service.port" . }} on the following DNS names from within your cluster:
+
+ {{ include "postgresql.v1.primary.fullname" . }}.{{ $releaseNamespace }}.svc.cluster.local - Read/Write connection
+
+{{- if eq .Values.architecture "replication" }}
+
+ {{ include "postgresql.v1.readReplica.fullname" . }}.{{ $releaseNamespace }}.svc.cluster.local - Read only connection
+
+{{- end }}
+
+{{- if and (not (empty $customUser)) (ne $customUser "postgres") }}
+{{- if .Values.auth.enablePostgresUser }}
+
+To get the password for "postgres" run:
+
+ export POSTGRES_ADMIN_PASSWORD=$(kubectl get secret --namespace {{ $releaseNamespace }} {{ include "postgresql.v1.secretName" . }} -o jsonpath="{.data.{{include "postgresql.v1.adminPasswordKey" .}}}" | base64 -d)
+{{- end }}
+
+To get the password for "{{ $customUser }}" run:
+
+ export POSTGRES_PASSWORD=$(kubectl get secret --namespace {{ $releaseNamespace }} {{ include "postgresql.v1.secretName" . }} -o jsonpath="{.data.{{include "postgresql.v1.userPasswordKey" .}}}" | base64 -d)
+{{- else }}
+{{- if .Values.auth.enablePostgresUser }}
+
+To get the password for "{{ default "postgres" $customUser }}" run:
+
+ export POSTGRES_PASSWORD=$(kubectl get secret --namespace {{ $releaseNamespace }} {{ include "postgresql.v1.secretName" . }} -o jsonpath="{.data.{{ ternary "password" (include "postgresql.v1.adminPasswordKey" .) (and (not (empty $customUser)) (ne $customUser "postgres")) }}}" | base64 -d)
+{{- end }}
+{{- end }}
+
+To connect to your database run the following command:
+ {{- if $authEnabled }}
+
+ kubectl run {{ include "postgresql.v1.chart.fullname" . }}-client --rm --tty -i --restart='Never' --namespace {{ $releaseNamespace }} --image {{ include "postgresql.v1.image" . }} --env="PGPASSWORD=$POSTGRES_PASSWORD" \
+ --command -- psql --host {{ include "postgresql.v1.primary.fullname" . }} -U {{ default "postgres" $customUser }} -d {{- if include "postgresql.v1.database" . }} {{ include "postgresql.v1.database" . }}{{- else }} postgres{{- end }} -p {{ include "postgresql.v1.service.port" . }}
+ {{- else }}
+
+ kubectl run {{ include "postgresql.v1.chart.fullname" . }}-client --rm --tty -i --restart='Never' --namespace {{ $releaseNamespace }} --image {{ include "postgresql.v1.image" . }} \
+ --command -- psql --host {{ include "postgresql.v1.primary.fullname" . }} -d {{- if include "postgresql.v1.database" . }} {{ include "postgresql.v1.database" . }}{{- else }} postgres{{- end }} -p {{ include "postgresql.v1.service.port" . }}
+ {{- end }}
+
+ > NOTE: If you access the container using bash, make sure that you execute "/opt/bitnami/scripts/postgresql/entrypoint.sh /bin/bash" in order to avoid the error "psql: local user with ID {{ .Values.primary.containerSecurityContext.runAsUser }}} does not exist"
+
+To connect to your database from outside the cluster execute the following commands:
+
+{{- if contains "NodePort" .Values.primary.service.type }}
+
+ export NODE_IP=$(kubectl get nodes --namespace {{ $releaseNamespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+ export NODE_PORT=$(kubectl get --namespace {{ $releaseNamespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "postgresql.v1.primary.fullname" . }})
+ {{- if $authEnabled }}
+ PGPASSWORD="$POSTGRES_PASSWORD" psql --host $NODE_IP --port $NODE_PORT -U {{ default "postgres" $customUser }} -d {{- if include "postgresql.v1.database" . }} {{ include "postgresql.v1.database" . }}{{- else }} postgres{{- end }}
+ {{- else }}
+ psql --host $NODE_IP --port $NODE_PORT -d {{- if include "postgresql.v1.database" . }} {{ include "postgresql.v1.database" . }}{{- else }} postgres{{- end }}
+ {{- end }}
+{{- else if contains "LoadBalancer" .Values.primary.service.type }}
+
+ NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+ Watch the status with: 'kubectl get svc --namespace {{ $releaseNamespace }} -w {{ include "postgresql.v1.primary.fullname" . }}'
+
+ export SERVICE_IP=$(kubectl get svc --namespace {{ $releaseNamespace }} {{ include "postgresql.v1.primary.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
+ {{- if $authEnabled }}
+ PGPASSWORD="$POSTGRES_PASSWORD" psql --host $SERVICE_IP --port {{ include "postgresql.v1.service.port" . }} -U {{ default "postgres" $customUser }} -d {{- if include "postgresql.v1.database" . }} {{ include "postgresql.v1.database" . }}{{- else }} postgres{{- end }}
+ {{- else }}
+ psql --host $SERVICE_IP --port {{ include "postgresql.v1.service.port" . }} -d {{- if include "postgresql.v1.database" . }} {{ include "postgresql.v1.database" . }}{{- else }} postgres{{- end }}
+ {{- end }}
+{{- else if contains "ClusterIP" .Values.primary.service.type }}
+
+ kubectl port-forward --namespace {{ $releaseNamespace }} svc/{{ include "postgresql.v1.primary.fullname" . }} {{ include "postgresql.v1.service.port" . }}:{{ include "postgresql.v1.service.port" . }} &
+ {{- if $authEnabled }}
+ PGPASSWORD="$POSTGRES_PASSWORD" psql --host 127.0.0.1 -U {{ default "postgres" $customUser }} -d {{- if include "postgresql.v1.database" . }} {{ include "postgresql.v1.database" . }}{{- else }} postgres{{- end }} -p {{ include "postgresql.v1.service.port" . }}
+ {{- else }}
+ psql --host 127.0.0.1 -d {{- if include "postgresql.v1.database" . }} {{ include "postgresql.v1.database" . }}{{- else }} postgres{{- end }} -p {{ include "postgresql.v1.service.port" . }}
+ {{- end }}
+{{- end }}
+{{- end }}
+
+WARNING: The configured password will be ignored on new installation in case when previous PostgreSQL release was deleted through the helm command. In that case, old PVC will have an old password, and setting it through helm won't take effect. Deleting persistent volumes (PVs) will solve the issue.
+
+{{- include "postgresql.v1.validateValues" . -}}
+{{- include "common.warnings.rollingTag" .Values.image -}}
+{{- include "common.warnings.rollingTag" .Values.volumePermissions.image }}
+{{- include "common.warnings.resources" (dict "sections" (list "metrics" "primary" "readReplicas" "volumePermissions") "context" $) }}
+{{- include "common.warnings.modifiedImages" (dict "images" (list .Values.image .Values.volumePermissions.image .Values.metrics.image) "context" $) }}
+{{- include "common.errors.insecureImages" (dict "images" (list .Values.image .Values.volumePermissions.image .Values.metrics.image) "context" $) }}
diff --git a/charts/semaphore/charts/postgresql/templates/_helpers.tpl b/charts/semaphore/charts/postgresql/templates/_helpers.tpl
new file mode 100644
index 0000000..c582fc1
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/_helpers.tpl
@@ -0,0 +1,458 @@
+{{/*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{/* vim: set filetype=mustache: */}}
+
+{{/*
+Create a global name for the chart to use and parse with other naming functions
+Please use instead of "common.names.fullname" to preserve support for .Values.global.postgresql.fullnameOverride
+*/}}
+{{- define "postgresql.v1.chart.fullname" -}}
+{{- default (include "common.names.fullname" .) .Values.global.postgresql.fullnameOverride -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name for PostgreSQL Primary objects
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "postgresql.v1.primary.fullname" -}}
+{{- $fullname := include "postgresql.v1.chart.fullname" . -}}
+{{- ternary (printf "%s-%s" $fullname .Values.primary.name | trunc 63 | trimSuffix "-") $fullname (eq .Values.architecture "replication") -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name for PostgreSQL read-only replicas objects
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "postgresql.v1.readReplica.fullname" -}}
+{{- printf "%s-%s" (include "postgresql.v1.chart.fullname" .) .Values.readReplicas.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create the default FQDN for PostgreSQL primary headless service
+We truncate at 63 chars because of the DNS naming spec.
+*/}}
+{{- define "postgresql.v1.primary.svc.headless" -}}
+{{- printf "%s-hl" (include "postgresql.v1.primary.fullname" .) | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create the default FQDN for PostgreSQL read-only replicas headless service
+We truncate at 63 chars because of the DNS naming spec.
+*/}}
+{{- define "postgresql.v1.readReplica.svc.headless" -}}
+{{- printf "%s-hl" (include "postgresql.v1.readReplica.fullname" .) | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Return the proper PostgreSQL image name
+*/}}
+{{- define "postgresql.v1.image" -}}
+{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
+{{- end -}}
+
+{{/*
+Return the proper PostgreSQL metrics image name
+*/}}
+{{- define "postgresql.v1.metrics.image" -}}
+{{ include "common.images.image" (dict "imageRoot" .Values.metrics.image "global" .Values.global) }}
+{{- end -}}
+
+{{/*
+Return the proper image name (for the init container volume-permissions image)
+*/}}
+{{- define "postgresql.v1.volumePermissions.image" -}}
+{{ include "common.images.image" (dict "imageRoot" .Values.volumePermissions.image "global" .Values.global) }}
+{{- end -}}
+
+{{/*
+Return the proper Docker Image Registry Secret Names
+*/}}
+{{- define "postgresql.v1.imagePullSecrets" -}}
+{{ include "common.images.renderPullSecrets" (dict "images" (list .Values.image .Values.metrics.image .Values.volumePermissions.image) "context" $) }}
+{{- end -}}
+
+{{/*
+Return the name for a custom user to create
+*/}}
+{{- define "postgresql.v1.username" -}}
+{{- if .Values.global.postgresql.auth.username -}}
+ {{- .Values.global.postgresql.auth.username -}}
+{{- else -}}
+ {{- .Values.auth.username -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the name for a custom database to create
+*/}}
+{{- define "postgresql.v1.database" -}}
+{{- if .Values.global.postgresql.auth.database -}}
+ {{- printf "%s" (tpl .Values.global.postgresql.auth.database $) -}}
+{{- else if .Values.auth.database -}}
+ {{- printf "%s" (tpl .Values.auth.database $) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the password secret.
+*/}}
+{{- define "postgresql.v1.secretName" -}}
+{{- if .Values.global.postgresql.auth.existingSecret -}}
+ {{- printf "%s" (tpl .Values.global.postgresql.auth.existingSecret $) -}}
+{{- else if .Values.auth.existingSecret -}}
+ {{- printf "%s" (tpl .Values.auth.existingSecret $) -}}
+{{- else -}}
+ {{- printf "%s" (include "postgresql.v1.chart.fullname" .) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the replication-password key.
+*/}}
+{{- define "postgresql.v1.replicationPasswordKey" -}}
+{{- if or .Values.global.postgresql.auth.existingSecret .Values.auth.existingSecret -}}
+ {{- if .Values.global.postgresql.auth.secretKeys.replicationPasswordKey -}}
+ {{- printf "%s" (tpl .Values.global.postgresql.auth.secretKeys.replicationPasswordKey $) -}}
+ {{- else if .Values.auth.secretKeys.replicationPasswordKey -}}
+ {{- printf "%s" (tpl .Values.auth.secretKeys.replicationPasswordKey $) -}}
+ {{- else -}}
+ {{- "replication-password" -}}
+ {{- end -}}
+{{- else -}}
+ {{- "replication-password" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the admin-password key.
+*/}}
+{{- define "postgresql.v1.adminPasswordKey" -}}
+{{- if or .Values.global.postgresql.auth.existingSecret .Values.auth.existingSecret -}}
+ {{- if .Values.global.postgresql.auth.secretKeys.adminPasswordKey -}}
+ {{- printf "%s" (tpl .Values.global.postgresql.auth.secretKeys.adminPasswordKey $) -}}
+ {{- else if .Values.auth.secretKeys.adminPasswordKey -}}
+ {{- printf "%s" (tpl .Values.auth.secretKeys.adminPasswordKey $) -}}
+ {{- end -}}
+{{- else -}}
+ {{- "postgres-password" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the user-password key.
+*/}}
+{{- define "postgresql.v1.userPasswordKey" -}}
+{{- if or .Values.global.postgresql.auth.existingSecret .Values.auth.existingSecret -}}
+ {{- if or (empty (include "postgresql.v1.username" .)) (eq (include "postgresql.v1.username" .) "postgres") -}}
+ {{- printf "%s" (include "postgresql.v1.adminPasswordKey" .) -}}
+ {{- else -}}
+ {{- if .Values.global.postgresql.auth.secretKeys.userPasswordKey -}}
+ {{- printf "%s" (tpl .Values.global.postgresql.auth.secretKeys.userPasswordKey $) -}}
+ {{- else if .Values.auth.secretKeys.userPasswordKey -}}
+ {{- printf "%s" (tpl .Values.auth.secretKeys.userPasswordKey $) -}}
+ {{- end -}}
+ {{- end -}}
+{{- else -}}
+ {{- "password" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return true if a secret object should be created
+*/}}
+{{- define "postgresql.v1.createSecret" -}}
+{{- $customUser := include "postgresql.v1.username" . -}}
+{{- $postgresPassword := include "common.secrets.lookup" (dict "secret" (include "postgresql.v1.chart.fullname" .) "key" .Values.auth.secretKeys.adminPasswordKey "defaultValue" (ternary (coalesce .Values.global.postgresql.auth.postgresPassword .Values.auth.postgresPassword .Values.global.postgresql.auth.password .Values.auth.password) (coalesce .Values.global.postgresql.auth.postgresPassword .Values.auth.postgresPassword) (or (empty $customUser) (eq $customUser "postgres"))) "context" $) -}}
+{{- if and (not (or .Values.global.postgresql.auth.existingSecret .Values.auth.existingSecret)) (or $postgresPassword .Values.auth.enablePostgresUser (and (not (empty $customUser)) (ne $customUser "postgres")) (eq .Values.architecture "replication") (and .Values.ldap.enabled (or .Values.ldap.bind_password .Values.ldap.bindpw))) -}}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return true if a secret object should be created for PostgreSQL
+*/}}
+{{- define "postgresql.v1.createPreviousSecret" -}}
+{{- if and .Values.passwordUpdateJob.previousPasswords.postgresPassword (not .Values.passwordUpdateJob.previousPasswords.existingSecret) }}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the secret with previous PostgreSQL credentials
+*/}}
+{{- define "postgresql.v1.update-job.previousSecretName" -}}
+ {{- if .Values.passwordUpdateJob.previousPasswords.existingSecret -}}
+ {{- /* The secret with the new password is managed externally */ -}}
+ {{- tpl .Values.passwordUpdateJob.previousPasswords.existingSecret $ -}}
+ {{- else if .Values.passwordUpdateJob.previousPasswords.postgresPassword -}}
+ {{- /* The secret with the new password is managed externally */ -}}
+ {{- printf "%s-previous-secret" (include "postgresql.v1.chart.fullname" .) | trunc 63 | trimSuffix "-" -}}
+ {{- else -}}
+ {{- /* The secret with the new password is managed by the helm chart. We use the current secret name as it has the old password */ -}}
+ {{- include "postgresql.v1.chart.fullname" . -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Return the secret with new PostgreSQL credentials
+*/}}
+{{- define "postgresql.v1.update-job.newSecretName" -}}
+ {{- if and (not .Values.passwordUpdateJob.previousPasswords.existingSecret) (not .Values.passwordUpdateJob.previousPasswords.postgresPassword) -}}
+ {{- /* The secret with the new password is managed by the helm chart. We create a new secret as the current one has the old password */ -}}
+ {{- printf "%s-new-secret" (include "postgresql.v1.chart.fullname" .) | trunc 63 | trimSuffix "-" -}}
+ {{- else -}}
+ {{- /* The secret with the new password is managed externally */ -}}
+ {{- include "postgresql.v1.secretName" . -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Return PostgreSQL service port
+*/}}
+{{- define "postgresql.v1.service.port" -}}
+{{- if .Values.global.postgresql.service.ports.postgresql -}}
+ {{- .Values.global.postgresql.service.ports.postgresql -}}
+{{- else -}}
+ {{- .Values.primary.service.ports.postgresql -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return PostgreSQL service port
+*/}}
+{{- define "postgresql.v1.readReplica.service.port" -}}
+{{- if .Values.global.postgresql.service.ports.postgresql -}}
+ {{- .Values.global.postgresql.service.ports.postgresql -}}
+{{- else -}}
+ {{- .Values.readReplicas.service.ports.postgresql -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the PostgreSQL primary configuration ConfigMap name.
+*/}}
+{{- define "postgresql.v1.primary.configmapName" -}}
+{{- if .Values.primary.existingConfigmap -}}
+ {{- printf "%s" (tpl .Values.primary.existingConfigmap $) -}}
+{{- else -}}
+ {{- printf "%s-configuration" (include "postgresql.v1.primary.fullname" .) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return true if a configmap object should be created for PostgreSQL primary with the configuration
+*/}}
+{{- define "postgresql.v1.primary.createConfigmap" -}}
+{{- if and (or .Values.primary.configuration .Values.primary.pgHbaConfiguration) (not .Values.primary.existingConfigmap) -}}
+ {{- true -}}
+{{- else -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the PostgreSQL primary extended configuration ConfigMap name.
+*/}}
+{{- define "postgresql.v1.primary.extendedConfigmapName" -}}
+{{- if .Values.primary.existingExtendedConfigmap -}}
+ {{- printf "%s" (tpl .Values.primary.existingExtendedConfigmap $) -}}
+{{- else -}}
+ {{- printf "%s-extended-configuration" (include "postgresql.v1.primary.fullname" .) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the PostgreSQL read replica extended configuration ConfigMap name.
+*/}}
+{{- define "postgresql.v1.readReplicas.extendedConfigmapName" -}}
+ {{- printf "%s-extended-configuration" (include "postgresql.v1.readReplica.fullname" .) -}}
+{{- end -}}
+
+{{/*
+Return true if a configmap object should be created for PostgreSQL primary with the extended configuration
+*/}}
+{{- define "postgresql.v1.primary.createExtendedConfigmap" -}}
+{{- if and .Values.primary.extendedConfiguration (not .Values.primary.existingExtendedConfigmap) -}}
+ {{- true -}}
+{{- else -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return true if a configmap object should be created for PostgreSQL read replica with the extended configuration
+*/}}
+{{- define "postgresql.v1.readReplicas.createExtendedConfigmap" -}}
+{{- if .Values.readReplicas.extendedConfiguration -}}
+ {{- true -}}
+{{- else -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+ Create the name of the service account to use
+ */}}
+{{- define "postgresql.v1.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+ {{ default (include "postgresql.v1.chart.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+ {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return true if a configmap should be mounted with PostgreSQL configuration
+*/}}
+{{- define "postgresql.v1.mountConfigurationCM" -}}
+{{- if or .Values.primary.configuration .Values.primary.pgHbaConfiguration .Values.primary.existingConfigmap -}}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the pre-initialization scripts ConfigMap name.
+*/}}
+{{- define "postgresql.v1.preInitDb.scriptsCM" -}}
+{{- if .Values.primary.preInitDb.scriptsConfigMap -}}
+ {{- printf "%s" (tpl .Values.primary.preInitDb.scriptsConfigMap $) -}}
+{{- else -}}
+ {{- printf "%s-preinit-scripts" (include "postgresql.v1.primary.fullname" .) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the initialization scripts ConfigMap name.
+*/}}
+{{- define "postgresql.v1.initdb.scriptsCM" -}}
+{{- if .Values.primary.initdb.scriptsConfigMap -}}
+ {{- printf "%s" (tpl .Values.primary.initdb.scriptsConfigMap $) -}}
+{{- else -}}
+ {{- printf "%s-init-scripts" (include "postgresql.v1.primary.fullname" .) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return true if TLS is enabled for LDAP connection
+*/}}
+{{- define "postgresql.v1.ldap.tls.enabled" -}}
+{{- if and (kindIs "string" .Values.ldap.tls) (not (empty .Values.ldap.tls)) -}}
+ {{- true -}}
+{{- else if and (kindIs "map" .Values.ldap.tls) .Values.ldap.tls.enabled -}}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the readiness probe command
+*/}}
+{{- define "postgresql.v1.readinessProbeCommand" -}}
+{{- $customUser := include "postgresql.v1.username" . -}}
+- |
+{{- if (include "postgresql.v1.database" .) }}
+ exec pg_isready -U {{ default "postgres" $customUser | quote }} -d "dbname={{ include "postgresql.v1.database" . }} {{- if .Values.tls.enabled }} sslcert={{ include "postgresql.v1.tlsCert" . }} sslkey={{ include "postgresql.v1.tlsCertKey" . }}{{- end }}" -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }}
+{{- else }}
+ exec pg_isready -U {{ default "postgres" $customUser | quote }} {{- if .Values.tls.enabled }} -d "sslcert={{ include "postgresql.v1.tlsCert" . }} sslkey={{ include "postgresql.v1.tlsCertKey" . }}"{{- end }} -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }}
+{{- end }}
+ [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
+{{- end -}}
+
+{{/*
+Compile all warnings into a single message, and call fail.
+*/}}
+{{- define "postgresql.v1.validateValues" -}}
+{{- $messages := list -}}
+{{- $messages := append $messages (include "postgresql.v1.validateValues.ldapConfigurationMethod" .) -}}
+{{- $messages := append $messages (include "postgresql.v1.validateValues.psp" .) -}}
+{{- $messages := without $messages "" -}}
+{{- $message := join "\n" $messages -}}
+
+{{- if $message -}}
+{{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Validate values of Postgresql - If ldap.url is used then you don't need the other settings for ldap
+*/}}
+{{- define "postgresql.v1.validateValues.ldapConfigurationMethod" -}}
+{{- if and .Values.ldap.enabled (and (not (empty .Values.ldap.url)) (not (empty .Values.ldap.server))) -}}
+postgresql: ldap.url, ldap.server
+ You cannot set both `ldap.url` and `ldap.server` at the same time.
+ Please provide a unique way to configure LDAP.
+ More info at https://www.postgresql.org/docs/current/auth-ldap.html
+{{- end -}}
+{{- end -}}
+
+{{/*
+Validate values of Postgresql - If PSP is enabled RBAC should be enabled too
+*/}}
+{{- define "postgresql.v1.validateValues.psp" -}}
+{{- if and .Values.psp.create (not .Values.rbac.create) -}}
+postgresql: psp.create, rbac.create
+ RBAC should be enabled if PSP is enabled in order for PSP to work.
+ More info at https://kubernetes.io/docs/concepts/policy/pod-security-policy/#authorizing-policies
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the path to the cert file.
+*/}}
+{{- define "postgresql.v1.tlsCert" -}}
+{{- if .Values.tls.autoGenerated -}}
+ {{- printf "/opt/bitnami/postgresql/certs/tls.crt" -}}
+{{- else -}}
+ {{- required "Certificate filename is required when TLS in enabled" .Values.tls.certFilename | printf "/opt/bitnami/postgresql/certs/%s" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the path to the cert key file.
+*/}}
+{{- define "postgresql.v1.tlsCertKey" -}}
+{{- if .Values.tls.autoGenerated -}}
+ {{- printf "/opt/bitnami/postgresql/certs/tls.key" -}}
+{{- else -}}
+{{- required "Certificate Key filename is required when TLS in enabled" .Values.tls.certKeyFilename | printf "/opt/bitnami/postgresql/certs/%s" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the path to the CA cert file.
+*/}}
+{{- define "postgresql.v1.tlsCACert" -}}
+{{- if .Values.tls.autoGenerated -}}
+ {{- printf "/opt/bitnami/postgresql/certs/ca.crt" -}}
+{{- else -}}
+ {{- printf "/opt/bitnami/postgresql/certs/%s" .Values.tls.certCAFilename -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the path to the CRL file.
+*/}}
+{{- define "postgresql.v1.tlsCRL" -}}
+{{- if .Values.tls.crlFilename -}}
+{{- printf "/opt/bitnami/postgresql/certs/%s" .Values.tls.crlFilename -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return true if a TLS credentials secret object should be created
+*/}}
+{{- define "postgresql.v1.createTlsSecret" -}}
+{{- if and .Values.tls.autoGenerated (not .Values.tls.certificatesSecret) -}}
+ {{- true -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the path to the CA cert file.
+*/}}
+{{- define "postgresql.v1.tlsSecretName" -}}
+{{- if .Values.tls.autoGenerated -}}
+ {{- printf "%s-crt" (include "postgresql.v1.chart.fullname" .) -}}
+{{- else -}}
+ {{ tpl (required "A secret containing TLS certificates is required when TLS is enabled" .Values.tls.certificatesSecret) . }}
+{{- end -}}
+{{- end -}}
diff --git a/charts/semaphore/charts/postgresql/templates/backup/cronjob.yaml b/charts/semaphore/charts/postgresql/templates/backup/cronjob.yaml
new file mode 100644
index 0000000..357efe4
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/backup/cronjob.yaml
@@ -0,0 +1,151 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if .Values.backup.enabled }}
+{{- $customUser := include "postgresql.v1.username" . }}
+apiVersion: batch/v1
+kind: CronJob
+metadata:
+ name: {{ include "postgresql.v1.primary.fullname" . }}-pgdumpall
+ namespace: {{ include "common.names.namespace" . | quote }}
+ {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.backup.cronjob.labels .Values.commonLabels ) "context" . ) }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: pg_dumpall
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.backup.cronjob.annotations .Values.commonAnnotations ) "context" . ) }}
+ {{- if $annotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
+ {{- end }}
+spec:
+ schedule: {{ quote .Values.backup.cronjob.schedule }}
+ {{- if .Values.backup.cronjob.timeZone }}
+ timeZone: {{ .Values.backup.cronjob.timeZone | quote }}
+ {{- end }}
+ concurrencyPolicy: {{ .Values.backup.cronjob.concurrencyPolicy }}
+ failedJobsHistoryLimit: {{ .Values.backup.cronjob.failedJobsHistoryLimit }}
+ successfulJobsHistoryLimit: {{ .Values.backup.cronjob.successfulJobsHistoryLimit }}
+ {{- if .Values.backup.cronjob.startingDeadlineSeconds }}
+ startingDeadlineSeconds: {{ .Values.backup.cronjob.startingDeadlineSeconds }}
+ {{- end }}
+ jobTemplate:
+ spec:
+ {{- if .Values.backup.cronjob.ttlSecondsAfterFinished }}
+ ttlSecondsAfterFinished: {{ .Values.backup.cronjob.ttlSecondsAfterFinished }}
+ {{- end }}
+ template:
+ metadata:
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 12 }}
+ app.kubernetes.io/component: pg_dumpall
+ {{- if $annotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 12 }}
+ {{- end }}
+ spec:
+ {{- include "postgresql.v1.imagePullSecrets" . | nindent 10 }}
+ {{- if .Values.backup.cronjob.nodeSelector }}
+ nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.backup.cronjob.nodeSelector "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.backup.cronjob.tolerations }}
+ tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.backup.cronjob.tolerations "context" $) | nindent 12 }}
+ {{- end }}
+ containers:
+ - name: {{ include "postgresql.v1.primary.fullname" . }}-pgdumpall
+ image: {{ include "postgresql.v1.image" . }}
+ imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+ env:
+ - name: PGUSER
+ {{- if .Values.auth.enablePostgresUser }}
+ value: postgres
+ {{- else }}
+ value: {{ $customUser | quote }}
+ {{- end }}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: PGPASSWORD_FILE
+ value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.v1.adminPasswordKey" .) }}
+ {{- else }}
+ - name: PGPASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ include "postgresql.v1.secretName" . }}
+ key: {{ include "postgresql.v1.adminPasswordKey" . }}
+ {{- end }}
+ - name: PGHOST
+ value: {{ include "postgresql.v1.primary.fullname" . }}
+ - name: PGPORT
+ value: {{ include "postgresql.v1.service.port" . | quote }}
+ - name: PGDUMP_DIR
+ value: {{ .Values.backup.cronjob.storage.mountPath }}
+ {{- if include "common.fips.enabled" . }}
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.backup.cronjob.fips "global" .Values.global) | quote }}
+ {{- end }}
+ {{- if .Values.tls.enabled }}
+ - name: PGSSLROOTCERT
+ {{- if .Values.tls.autoGenerated }}
+ value: /tmp/certs/ca.crt
+ {{- else }}
+ value: {{ printf "/tmp/certs/%s" .Values.tls.certCAFilename }}
+ {{- end }}
+ {{- end }}
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.backup.cronjob.command "context" $) | nindent 14 }}
+ volumeMounts:
+ {{- if .Values.tls.enabled }}
+ - name: raw-certificates
+ mountPath: /tmp/certs
+ {{- end }}
+ {{- if .Values.backup.cronjob.storage.enabled }}
+ - name: datadir
+ mountPath: {{ .Values.backup.cronjob.storage.mountPath }}
+ subPath: {{ .Values.backup.cronjob.storage.subPath }}
+ {{- end }}
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: tmp-dir
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: postgresql-password
+ mountPath: /opt/bitnami/postgresql/secrets/
+ {{- end }}
+ {{- if .Values.backup.cronjob.extraVolumeMounts }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.backup.cronjob.extraVolumeMounts "context" $) | nindent 14 }}
+ {{- end }}
+ {{- if .Values.backup.cronjob.containerSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.backup.cronjob.containerSecurityContext "context" $) | nindent 14 }}
+ {{- end }}
+ {{- if .Values.backup.cronjob.resources }}
+ resources: {{- toYaml .Values.backup.cronjob.resources | nindent 14 }}
+ {{- else if ne .Values.backup.cronjob.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.backup.cronjob.resourcesPreset) | nindent 14 }}
+ {{- end }}
+ restartPolicy: {{ .Values.backup.cronjob.restartPolicy }}
+ {{- if .Values.backup.cronjob.podSecurityContext.enabled }}
+ securityContext:
+ fsGroup: {{ .Values.backup.cronjob.podSecurityContext.fsGroup }}
+ {{- end }}
+ volumes:
+ {{- if .Values.tls.enabled }}
+ - name: raw-certificates
+ secret:
+ secretName: {{ include "postgresql.v1.tlsSecretName" . }}
+ {{- end }}
+ {{- if .Values.backup.cronjob.storage.enabled }}
+ {{- if .Values.backup.cronjob.storage.existingClaim }}
+ - name: datadir
+ persistentVolumeClaim:
+ claimName: {{ printf "%s" (tpl .Values.backup.cronjob.storage.existingClaim .) }}
+ {{- else }}
+ - name: datadir
+ persistentVolumeClaim:
+ claimName: {{ include "postgresql.v1.primary.fullname" . }}-pgdumpall
+ {{- end }}
+ {{- end }}
+ - name: empty-dir
+ emptyDir: {}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: postgresql-password
+ secret:
+ secretName: {{ include "postgresql.v1.secretName" . }}
+ {{- end }}
+ {{- if .Values.backup.cronjob.extraVolumes }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.backup.cronjob.extraVolumes "context" $ ) | nindent 12 }}
+ {{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/backup/networkpolicy.yaml b/charts/semaphore/charts/postgresql/templates/backup/networkpolicy.yaml
new file mode 100644
index 0000000..21e1add
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/backup/networkpolicy.yaml
@@ -0,0 +1,32 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.backup.enabled .Values.backup.cronjob.networkPolicy.enabled }}
+kind: NetworkPolicy
+apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
+metadata:
+ name: {{ include "postgresql.v1.primary.fullname" . }}-pgdumpall
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: pg_dumpall
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.backup.cronjob.podLabels .Values.commonLabels ) "context" . ) }}
+ podSelector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
+ app.kubernetes.io/component: pg_dumpall
+ policyTypes:
+ - Egress
+ egress:
+ - ports:
+ - port: 5432
+ protocol: TCP
+ - port: 53
+ protocol: TCP
+ - port: 53
+ protocol: UDP
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/backup/pvc.yaml b/charts/semaphore/charts/postgresql/templates/backup/pvc.yaml
new file mode 100644
index 0000000..674ac3d
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/backup/pvc.yaml
@@ -0,0 +1,34 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.backup.enabled .Values.backup.cronjob.storage.enabled (not .Values.backup.cronjob.storage.existingClaim) -}}
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ name: {{ include "postgresql.v1.primary.fullname" . }}-pgdumpall
+ namespace: {{ include "common.names.namespace" . | quote }}
+ {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.backup.cronjob.labels .Values.commonLabels ) "context" . ) }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: pg_dumpall
+ {{- if or .Values.backup.cronjob.annotations .Values.commonAnnotations .Values.backup.cronjob.storage.resourcePolicy }}
+ annotations:
+ {{- if or .Values.backup.cronjob.annotations .Values.commonAnnotations }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.backup.cronjob.annotations .Values.commonAnnotations ) "context" . ) }}
+ {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
+ {{- end }}
+ {{- if .Values.backup.cronjob.storage.resourcePolicy }}
+ helm.sh/resource-policy: {{ .Values.backup.cronjob.storage.resourcePolicy | quote }}
+ {{- end }}
+ {{- end }}
+spec:
+ accessModes:
+ {{- range .Values.backup.cronjob.storage.accessModes }}
+ - {{ . | quote }}
+ {{- end }}
+ resources:
+ requests:
+ storage: {{ .Values.backup.cronjob.storage.size | quote }}
+ {{ include "common.storage.class" (dict "persistence" .Values.backup.cronjob.storage "global" .Values.global) }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/extra-list.yaml b/charts/semaphore/charts/postgresql/templates/extra-list.yaml
new file mode 100644
index 0000000..329f5c6
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/extra-list.yaml
@@ -0,0 +1,9 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- range .Values.extraDeploy }}
+---
+{{ include "common.tplvalues.render" (dict "value" . "context" $) }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/primary/configmap.yaml b/charts/semaphore/charts/postgresql/templates/primary/configmap.yaml
new file mode 100644
index 0000000..ad231e5
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/primary/configmap.yaml
@@ -0,0 +1,26 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if (include "postgresql.v1.primary.createConfigmap" .) }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ printf "%s-configuration" (include "postgresql.v1.primary.fullname" .) }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: primary
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+data:
+ {{- if .Values.primary.configuration }}
+ postgresql.conf: |
+ {{- include "common.tplvalues.render" ( dict "value" .Values.primary.configuration "context" $ ) | nindent 4 }}
+ {{- end }}
+ {{- if .Values.primary.pgHbaConfiguration }}
+ pg_hba.conf: |
+ {{- include "common.tplvalues.render" ( dict "value" .Values.primary.pgHbaConfiguration "context" $ ) | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/primary/extended-configmap.yaml b/charts/semaphore/charts/postgresql/templates/primary/extended-configmap.yaml
new file mode 100644
index 0000000..2d228e4
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/primary/extended-configmap.yaml
@@ -0,0 +1,20 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if (include "postgresql.v1.primary.createExtendedConfigmap" .) }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ printf "%s-extended-configuration" (include "postgresql.v1.primary.fullname" .) }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: primary
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+data:
+ override.conf: |-
+ {{- include "common.tplvalues.render" ( dict "value" .Values.primary.extendedConfiguration "context" $ ) | nindent 4 }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/primary/initialization-configmap.yaml b/charts/semaphore/charts/postgresql/templates/primary/initialization-configmap.yaml
new file mode 100644
index 0000000..450812a
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/primary/initialization-configmap.yaml
@@ -0,0 +1,17 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.primary.initdb.scripts (not .Values.primary.initdb.scriptsConfigMap) }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ printf "%s-init-scripts" (include "postgresql.v1.primary.fullname" .) }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+data: {{- include "common.tplvalues.render" (dict "value" .Values.primary.initdb.scripts "context" .) | nindent 2 }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/primary/metrics-configmap.yaml b/charts/semaphore/charts/postgresql/templates/primary/metrics-configmap.yaml
new file mode 100644
index 0000000..9bf889a
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/primary/metrics-configmap.yaml
@@ -0,0 +1,18 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.metrics.enabled .Values.metrics.customMetrics }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ printf "%s-metrics" (include "postgresql.v1.primary.fullname" .) }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+data:
+ custom-metrics.yaml: {{ toYaml .Values.metrics.customMetrics | quote }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/primary/metrics-svc.yaml b/charts/semaphore/charts/postgresql/templates/primary/metrics-svc.yaml
new file mode 100644
index 0000000..2e77c5b
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/primary/metrics-svc.yaml
@@ -0,0 +1,31 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if .Values.metrics.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ printf "%s-metrics" (include "postgresql.v1.primary.fullname" .) }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: metrics
+ {{- if or .Values.commonAnnotations .Values.metrics.service.annotations }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.service.annotations .Values.commonAnnotations ) "context" . ) }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
+ {{- end }}
+spec:
+ type: ClusterIP
+ sessionAffinity: {{ .Values.metrics.service.sessionAffinity }}
+ {{- if .Values.metrics.service.clusterIP }}
+ clusterIP: {{ .Values.metrics.service.clusterIP }}
+ {{- end }}
+ ports:
+ - name: http-metrics
+ port: {{ .Values.metrics.service.ports.metrics }}
+ targetPort: http-metrics
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.podLabels .Values.commonLabels ) "context" . ) }}
+ selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: primary
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/primary/networkpolicy.yaml b/charts/semaphore/charts/postgresql/templates/primary/networkpolicy.yaml
new file mode 100644
index 0000000..6e5e28f
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/primary/networkpolicy.yaml
@@ -0,0 +1,78 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if .Values.primary.networkPolicy.enabled }}
+kind: NetworkPolicy
+apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
+metadata:
+ name: {{ include "postgresql.v1.primary.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: primary
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.podLabels .Values.commonLabels ) "context" . ) }}
+ podSelector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
+ app.kubernetes.io/component: primary
+ policyTypes:
+ - Ingress
+ - Egress
+ {{- if .Values.primary.networkPolicy.allowExternalEgress }}
+ egress:
+ - {}
+ {{- else }}
+ egress:
+ # Allow dns resolution
+ - ports:
+ - port: 53
+ protocol: UDP
+ - port: 53
+ protocol: TCP
+ # Allow outbound connections to read-replicas
+ - ports:
+ - port: {{ .Values.containerPorts.postgresql }}
+ to:
+ - podSelector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }}
+ app.kubernetes.io/component: read
+ {{- if .Values.primary.networkPolicy.extraEgress }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.primary.networkPolicy.extraEgress "context" $ ) | nindent 4 }}
+ {{- end }}
+ {{- end }}
+ ingress:
+ - ports:
+ - port: {{ .Values.containerPorts.postgresql }}
+ {{- if .Values.metrics.enabled }}
+ - port: {{ .Values.metrics.containerPorts.metrics }}
+ {{- end }}
+ {{- if not .Values.primary.networkPolicy.allowExternal }}
+ from:
+ - podSelector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }}
+ - podSelector:
+ matchLabels:
+ {{ template "postgresql.v1.primary.fullname" . }}-client: "true"
+ {{- if .Values.primary.networkPolicy.ingressNSMatchLabels }}
+ - namespaceSelector:
+ matchLabels:
+ {{- range $key, $value := .Values.primary.networkPolicy.ingressNSMatchLabels }}
+ {{ $key | quote }}: {{ $value | quote }}
+ {{- end }}
+ {{- if .Values.primary.networkPolicy.ingressNSPodMatchLabels }}
+ podSelector:
+ matchLabels:
+ {{- range $key, $value := .Values.primary.networkPolicy.ingressNSPodMatchLabels }}
+ {{ $key | quote }}: {{ $value | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.primary.networkPolicy.extraIngress }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.primary.networkPolicy.extraIngress "context" $ ) | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/primary/pdb.yaml b/charts/semaphore/charts/postgresql/templates/primary/pdb.yaml
new file mode 100644
index 0000000..a03fb20
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/primary/pdb.yaml
@@ -0,0 +1,29 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if .Values.primary.pdb.create }}
+apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
+kind: PodDisruptionBudget
+metadata:
+ name: {{ include "postgresql.v1.primary.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.labels .Values.commonLabels ) "context" . ) }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: primary
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ {{- if .Values.primary.pdb.minAvailable }}
+ minAvailable: {{ .Values.primary.pdb.minAvailable }}
+ {{- end }}
+ {{- if or .Values.primary.pdb.maxUnavailable ( not .Values.primary.pdb.minAvailable ) }}
+ maxUnavailable: {{ .Values.primary.pdb.maxUnavailable | default 1 }}
+ {{- end }}
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.podLabels .Values.commonLabels ) "context" . ) }}
+ selector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
+ app.kubernetes.io/component: primary
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/primary/preinitialization-configmap.yaml b/charts/semaphore/charts/postgresql/templates/primary/preinitialization-configmap.yaml
new file mode 100644
index 0000000..ae6d188
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/primary/preinitialization-configmap.yaml
@@ -0,0 +1,17 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.primary.preInitDb.scripts (not .Values.primary.preInitDb.scriptsConfigMap) }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ printf "%s-preinit-scripts" (include "postgresql.v1.primary.fullname" .) }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+data: {{- include "common.tplvalues.render" (dict "value" .Values.primary.preInitDb.scripts "context" .) | nindent 2 }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/primary/servicemonitor.yaml b/charts/semaphore/charts/postgresql/templates/primary/servicemonitor.yaml
new file mode 100644
index 0000000..b17d7f5
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/primary/servicemonitor.yaml
@@ -0,0 +1,46 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+ name: {{ include "postgresql.v1.primary.fullname" . }}
+ namespace: {{ coalesce .Values.metrics.serviceMonitor.namespace (include "common.names.namespace" .) | quote }}
+ {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: metrics
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ {{- if .Values.metrics.serviceMonitor.jobLabel }}
+ jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }}
+ {{- end }}
+ selector:
+ {{- $svcLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.selector .Values.commonLabels ) "context" . ) }}
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $svcLabels "context" $ ) | nindent 6 }}
+ app.kubernetes.io/component: metrics
+ endpoints:
+ - port: http-metrics
+ {{- if .Values.metrics.serviceMonitor.interval }}
+ interval: {{ .Values.metrics.serviceMonitor.interval }}
+ {{- end }}
+ {{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
+ scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
+ {{- end }}
+ {{- if .Values.metrics.serviceMonitor.relabelings }}
+ relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.relabelings "context" $) | nindent 6 }}
+ {{- end }}
+ {{- if .Values.metrics.serviceMonitor.metricRelabelings }}
+ metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 6 }}
+ {{- end }}
+ {{- if .Values.metrics.serviceMonitor.honorLabels }}
+ honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }}
+ {{- end }}
+ namespaceSelector:
+ matchNames:
+ - {{ include "common.names.namespace" . | quote }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/primary/statefulset.yaml b/charts/semaphore/charts/postgresql/templates/primary/statefulset.yaml
new file mode 100644
index 0000000..3d9c1ce
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/primary/statefulset.yaml
@@ -0,0 +1,725 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- $customUser := include "postgresql.v1.username" . }}
+apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
+kind: StatefulSet
+metadata:
+ name: {{ include "postgresql.v1.primary.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.labels .Values.commonLabels ) "context" . ) }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: primary
+ {{- if or .Values.commonAnnotations .Values.primary.annotations }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.annotations .Values.commonAnnotations ) "context" . ) }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
+ {{- end }}
+spec:
+ replicas: 1
+ serviceName: {{ include "postgresql.v1.primary.svc.headless" . }}
+ {{- if .Values.primary.updateStrategy }}
+ updateStrategy: {{- toYaml .Values.primary.updateStrategy | nindent 4 }}
+ {{- end }}
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.podLabels .Values.commonLabels ) "context" . ) }}
+ selector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
+ app.kubernetes.io/component: primary
+ template:
+ metadata:
+ name: {{ include "postgresql.v1.primary.fullname" . }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
+ app.kubernetes.io/component: primary
+ {{- if or .Values.passwordUpdateJob.enabled (include "postgresql.v1.primary.createConfigmap" .) (include "postgresql.v1.primary.createExtendedConfigmap" .) .Values.primary.podAnnotations }}
+ annotations:
+ {{- if (include "postgresql.v1.primary.createConfigmap" .) }}
+ checksum/configuration: {{ pick (include (print $.Template.BasePath "/primary/configmap.yaml") . | fromYaml) "data" | toYaml | sha256sum }}
+ {{- end }}
+ {{- if (include "postgresql.v1.primary.createExtendedConfigmap" .) }}
+ checksum/extended-configuration: {{ pick (include (print $.Template.BasePath "/primary/extended-configmap.yaml") . | fromYaml) "data" | toYaml | sha256sum }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.enabled }}
+ charts.bitnami.com/password-last-update: {{ now | date "20060102150405" | quote }}
+ {{- end }}
+ {{- if .Values.primary.podAnnotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.primary.podAnnotations "context" $ ) | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ spec:
+ {{- if .Values.primary.extraPodSpec }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.primary.extraPodSpec "context" $) | nindent 6 }}
+ {{- end }}
+ serviceAccountName: {{ include "postgresql.v1.serviceAccountName" . }}
+ {{- include "postgresql.v1.imagePullSecrets" . | nindent 6 }}
+ automountServiceAccountToken: {{ .Values.primary.automountServiceAccountToken }}
+ {{- if .Values.primary.hostAliases }}
+ hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.primary.hostAliases "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.primary.affinity }}
+ affinity: {{- include "common.tplvalues.render" (dict "value" .Values.primary.affinity "context" $) | nindent 8 }}
+ {{- else }}
+ affinity:
+ podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAffinityPreset "component" "primary" "customLabels" $podLabels "context" $) | nindent 10 }}
+ podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAntiAffinityPreset "component" "primary" "customLabels" $podLabels "context" $) | nindent 10 }}
+ nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.primary.nodeAffinityPreset.type "key" .Values.primary.nodeAffinityPreset.key "values" .Values.primary.nodeAffinityPreset.values) | nindent 10 }}
+ {{- end }}
+ {{- if .Values.primary.nodeSelector }}
+ nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.primary.nodeSelector "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.primary.tolerations }}
+ tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.primary.tolerations "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.primary.topologySpreadConstraints }}
+ topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.primary.topologySpreadConstraints "context" .) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.primary.priorityClassName }}
+ priorityClassName: {{ .Values.primary.priorityClassName }}
+ {{- end }}
+ {{- if .Values.primary.schedulerName }}
+ schedulerName: {{ .Values.primary.schedulerName | quote }}
+ {{- end }}
+ {{- if .Values.primary.terminationGracePeriodSeconds }}
+ terminationGracePeriodSeconds: {{ .Values.primary.terminationGracePeriodSeconds }}
+ {{- end }}
+ {{- if .Values.primary.podSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.primary.podSecurityContext "context" $) | nindent 8 }}
+ {{- end }}
+ hostNetwork: {{ .Values.primary.hostNetwork }}
+ hostIPC: {{ .Values.primary.hostIPC }}
+ {{- if or (and .Values.tls.enabled (not .Values.volumePermissions.enabled)) (and .Values.volumePermissions.enabled (or .Values.primary.persistence.enabled .Values.shmVolume.enabled)) .Values.primary.initContainers }}
+ initContainers:
+ {{- if and .Values.tls.enabled (not .Values.volumePermissions.enabled) }}
+ - name: copy-certs
+ image: {{ include "postgresql.v1.volumePermissions.image" . }}
+ imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
+ {{- if .Values.primary.resources }}
+ resources: {{- toYaml .Values.primary.resources | nindent 12 }}
+ {{- else if ne .Values.primary.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.primary.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ # We don't require a privileged container in this case
+ {{- if .Values.primary.containerSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.primary.containerSecurityContext "context" $) | nindent 12 }}
+ {{- end }}
+ command:
+ - /bin/sh
+ - -ec
+ - |
+ cp /tmp/certs/* /opt/bitnami/postgresql/certs/
+ chmod 600 {{ include "postgresql.v1.tlsCertKey" . }}
+ {{- if include "common.fips.enabled" . }}
+ env:
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.volumePermissions.fips "global" .Values.global) | quote }}
+ {{- end }}
+ volumeMounts:
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: tmp-dir
+ - name: raw-certificates
+ mountPath: /tmp/certs
+ - name: postgresql-certificates
+ mountPath: /opt/bitnami/postgresql/certs
+ {{- else if and .Values.volumePermissions.enabled (or .Values.primary.persistence.enabled .Values.shmVolume.enabled) }}
+ - name: init-chmod-data
+ image: {{ include "postgresql.v1.volumePermissions.image" . }}
+ imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
+ {{- if .Values.volumePermissions.resources }}
+ resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
+ {{- else if ne .Values.volumePermissions.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.volumePermissions.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ command:
+ - /bin/sh
+ - -ec
+ - |
+ {{- if .Values.primary.persistence.enabled }}
+ {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }}
+ chown `id -u`:`id -G | cut -d " " -f2` {{ .Values.primary.persistence.mountPath }}
+ {{- else }}
+ chown {{ .Values.primary.containerSecurityContext.runAsUser }}:{{ .Values.primary.podSecurityContext.fsGroup }} {{ .Values.primary.persistence.mountPath }}
+ {{- end }}
+ mkdir -p {{ .Values.primary.persistence.mountPath }}/data {{- if (include "postgresql.v1.mountConfigurationCM" .) }} {{ .Values.primary.persistence.mountPath }}/conf {{- end }}
+ chmod 700 {{ .Values.primary.persistence.mountPath }}/data {{- if (include "postgresql.v1.mountConfigurationCM" .) }} {{ .Values.primary.persistence.mountPath }}/conf {{- end }}
+ find {{ .Values.primary.persistence.mountPath }} -mindepth 1 -maxdepth 1 {{- if not (include "postgresql.v1.mountConfigurationCM" .) }} -not -name "conf" {{- end }} -not -name ".snapshot" -not -name "lost+found" | \
+ {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }}
+ xargs -r chown -R `id -u`:`id -G | cut -d " " -f2`
+ {{- else }}
+ xargs -r chown -R {{ .Values.primary.containerSecurityContext.runAsUser }}:{{ .Values.primary.podSecurityContext.fsGroup }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.shmVolume.enabled }}
+ chmod -R 777 /dev/shm
+ {{- end }}
+ {{- if .Values.tls.enabled }}
+ cp /tmp/certs/* /opt/bitnami/postgresql/certs/
+ {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }}
+ chown -R `id -u`:`id -G | cut -d " " -f2` /opt/bitnami/postgresql/certs/
+ {{- else }}
+ chown -R {{ .Values.primary.containerSecurityContext.runAsUser }}:{{ .Values.primary.podSecurityContext.fsGroup }} /opt/bitnami/postgresql/certs/
+ {{- end }}
+ chmod 600 {{ include "postgresql.v1.tlsCertKey" . }}
+ {{- end }}
+ {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }}
+ securityContext: {{- omit .Values.volumePermissions.containerSecurityContext "runAsUser" | toYaml | nindent 12 }}
+ {{- else }}
+ securityContext: {{- .Values.volumePermissions.containerSecurityContext | toYaml | nindent 12 }}
+ {{- end }}
+ {{- if include "common.fips.enabled" . }}
+ env:
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.volumePermissions.fips "global" .Values.global) | quote }}
+ {{- end }}
+ volumeMounts:
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: tmp-dir
+ - name: {{ .Values.primary.persistence.volumeName }}
+ mountPath: {{ .Values.primary.persistence.mountPath }}
+ {{- if .Values.primary.persistence.subPath }}
+ subPath: {{ .Values.primary.persistence.subPath }}
+ {{- end }}
+ {{- if .Values.shmVolume.enabled }}
+ - name: dshm
+ mountPath: /dev/shm
+ {{- end }}
+ {{- if .Values.tls.enabled }}
+ - name: raw-certificates
+ mountPath: /tmp/certs
+ - name: postgresql-certificates
+ mountPath: /opt/bitnami/postgresql/certs
+ {{- end }}
+ {{- end }}
+ {{- if .Values.primary.initContainers }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.primary.initContainers "context" $ ) | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ containers:
+ - name: postgresql
+ image: {{ include "postgresql.v1.image" . }}
+ imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+ {{- if .Values.primary.containerSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.primary.containerSecurityContext "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.diagnosticMode.enabled }}
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
+ {{- else if .Values.primary.command }}
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.primary.command "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.diagnosticMode.enabled }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
+ {{- else if .Values.primary.args }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.primary.args "context" $) | nindent 12 }}
+ {{- end }}
+ env:
+ - name: BITNAMI_DEBUG
+ value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }}
+ - name: POSTGRESQL_PORT_NUMBER
+ value: {{ .Values.containerPorts.postgresql | quote }}
+ - name: POSTGRESQL_VOLUME_DIR
+ value: {{ .Values.primary.persistence.mountPath | quote }}
+ {{- if include "common.fips.enabled" . }}
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.primary.fips "global" .Values.global) | quote }}
+ {{- end }}
+ {{- if .Values.primary.persistence.mountPath }}
+ - name: PGDATA
+ value: {{ .Values.postgresqlDataDir | quote }}
+ {{- end }}
+ # Authentication
+ {{- if or (eq $customUser "postgres") (empty $customUser) }}
+ {{- if .Values.auth.enablePostgresUser }}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: POSTGRES_PASSWORD_FILE
+ value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.v1.adminPasswordKey" .) }}
+ {{- else }}
+ - name: POSTGRES_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ include "postgresql.v1.secretName" . }}
+ key: {{ include "postgresql.v1.adminPasswordKey" . }}
+ {{- end }}
+ {{- else }}
+ - name: ALLOW_EMPTY_PASSWORD
+ value: "true"
+ {{- end }}
+ {{- else }}
+ - name: POSTGRES_USER
+ value: {{ $customUser | quote }}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: POSTGRES_PASSWORD_FILE
+ value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.v1.userPasswordKey" .) }}
+ {{- else }}
+ - name: POSTGRES_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ include "postgresql.v1.secretName" . }}
+ key: {{ include "postgresql.v1.userPasswordKey" . }}
+ {{- end }}
+ {{- if .Values.auth.enablePostgresUser }}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: POSTGRES_POSTGRES_PASSWORD_FILE
+ value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.v1.adminPasswordKey" .) }}
+ {{- else }}
+ - name: POSTGRES_POSTGRES_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ include "postgresql.v1.secretName" . }}
+ key: {{ include "postgresql.v1.adminPasswordKey" . }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- if (include "postgresql.v1.database" .) }}
+ - name: POSTGRES_DATABASE
+ value: {{ (include "postgresql.v1.database" .) | quote }}
+ {{- end }}
+ {{- if or (eq .Values.architecture "replication") .Values.primary.standby.enabled }}
+ # Replication
+ - name: POSTGRES_REPLICATION_MODE
+ value: {{ ternary "slave" "master" .Values.primary.standby.enabled | quote }}
+ - name: POSTGRES_REPLICATION_USER
+ value: {{ .Values.auth.replicationUsername | quote }}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: POSTGRES_REPLICATION_PASSWORD_FILE
+ value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.v1.replicationPasswordKey" .) }}
+ {{- else }}
+ - name: POSTGRES_REPLICATION_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ include "postgresql.v1.secretName" . }}
+ key: {{ include "postgresql.v1.replicationPasswordKey" . }}
+ {{- end }}
+ {{- if ne .Values.replication.synchronousCommit "off" }}
+ - name: POSTGRES_SYNCHRONOUS_COMMIT_MODE
+ value: {{ .Values.replication.synchronousCommit | quote }}
+ - name: POSTGRES_NUM_SYNCHRONOUS_REPLICAS
+ value: {{ .Values.replication.numSynchronousReplicas | quote }}
+ {{- end }}
+ - name: POSTGRES_CLUSTER_APP_NAME
+ value: {{ .Values.replication.applicationName }}
+ {{- end }}
+ {{- if .Values.primary.initdb.args }}
+ # Initdb
+ - name: POSTGRES_INITDB_ARGS
+ value: {{ .Values.primary.initdb.args | quote }}
+ {{- end }}
+ {{- if .Values.primary.initdb.postgresqlWalDir }}
+ - name: POSTGRES_INITDB_WALDIR
+ value: {{ .Values.primary.initdb.postgresqlWalDir | quote }}
+ {{- end }}
+ {{- if .Values.primary.initdb.user }}
+ - name: POSTGRES_INITSCRIPTS_USERNAME
+ value: {{ .Values.primary.initdb.user }}
+ {{- end }}
+ {{- if .Values.primary.initdb.password }}
+ - name: POSTGRES_INITSCRIPTS_PASSWORD
+ value: {{ .Values.primary.initdb.password | quote }}
+ {{- end }}
+ {{- if .Values.primary.standby.enabled }}
+ # Standby
+ - name: POSTGRES_MASTER_HOST
+ value: {{ .Values.primary.standby.primaryHost }}
+ - name: POSTGRES_MASTER_PORT_NUMBER
+ value: {{ .Values.primary.standby.primaryPort | quote }}
+ {{- end }}
+ # LDAP
+ - name: POSTGRESQL_ENABLE_LDAP
+ value: {{ ternary "yes" "no" .Values.ldap.enabled | quote }}
+ {{- if .Values.ldap.enabled }}
+ {{- if or .Values.ldap.url .Values.ldap.uri }}
+ - name: POSTGRESQL_LDAP_URL
+ value: {{ coalesce .Values.ldap.url .Values.ldap.uri }}
+ {{- else }}
+ - name: POSTGRESQL_LDAP_SERVER
+ value: {{ .Values.ldap.server }}
+ - name: POSTGRESQL_LDAP_PORT
+ value: {{ .Values.ldap.port | quote }}
+ - name: POSTGRESQL_LDAP_SCHEME
+ value: {{ .Values.ldap.scheme }}
+ {{- if (include "postgresql.v1.ldap.tls.enabled" .) }}
+ - name: POSTGRESQL_LDAP_TLS
+ value: "1"
+ {{- end }}
+ - name: POSTGRESQL_LDAP_PREFIX
+ value: {{ .Values.ldap.prefix | quote }}
+ - name: POSTGRESQL_LDAP_SUFFIX
+ value: {{ .Values.ldap.suffix | quote }}
+ - name: POSTGRESQL_LDAP_BASE_DN
+ value: {{ coalesce .Values.ldap.baseDN .Values.ldap.basedn }}
+ - name: POSTGRESQL_LDAP_BIND_DN
+ value: {{ coalesce .Values.ldap.bindDN .Values.ldap.binddn}}
+ {{- if or (not (empty .Values.ldap.bind_password)) (not (empty .Values.ldap.bindpw)) }}
+ - name: POSTGRESQL_LDAP_BIND_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ include "postgresql.v1.secretName" . }}
+ key: ldap-password
+ {{- end }}
+ - name: POSTGRESQL_LDAP_SEARCH_ATTR
+ value: {{ coalesce .Values.ldap.search_attr .Values.ldap.searchAttribute }}
+ - name: POSTGRESQL_LDAP_SEARCH_FILTER
+ value: {{ coalesce .Values.ldap.search_filter .Values.ldap.searchFilter }}
+ {{- end }}
+ {{- end }}
+ # TLS
+ - name: POSTGRESQL_ENABLE_TLS
+ value: {{ ternary "yes" "no" .Values.tls.enabled | quote }}
+ {{- if .Values.tls.enabled }}
+ - name: POSTGRESQL_TLS_PREFER_SERVER_CIPHERS
+ value: {{ ternary "yes" "no" .Values.tls.preferServerCiphers | quote }}
+ - name: POSTGRESQL_TLS_CERT_FILE
+ value: {{ include "postgresql.v1.tlsCert" . }}
+ - name: POSTGRESQL_TLS_KEY_FILE
+ value: {{ include "postgresql.v1.tlsCertKey" . }}
+ {{- if .Values.tls.certCAFilename }}
+ - name: POSTGRESQL_TLS_CA_FILE
+ value: {{ include "postgresql.v1.tlsCACert" . }}
+ {{- end }}
+ {{- if .Values.tls.crlFilename }}
+ - name: POSTGRESQL_TLS_CRL_FILE
+ value: {{ include "postgresql.v1.tlsCRL" . }}
+ {{- end }}
+ {{- end }}
+ # Audit
+ - name: POSTGRESQL_LOG_HOSTNAME
+ value: {{ .Values.audit.logHostname | quote }}
+ - name: POSTGRESQL_LOG_CONNECTIONS
+ value: {{ .Values.audit.logConnections | quote }}
+ - name: POSTGRESQL_LOG_DISCONNECTIONS
+ value: {{ .Values.audit.logDisconnections | quote }}
+ {{- if .Values.audit.logLinePrefix }}
+ - name: POSTGRESQL_LOG_LINE_PREFIX
+ value: {{ .Values.audit.logLinePrefix | quote }}
+ {{- end }}
+ {{- if .Values.audit.logTimezone }}
+ - name: POSTGRESQL_LOG_TIMEZONE
+ value: {{ .Values.audit.logTimezone | quote }}
+ {{- end }}
+ {{- if .Values.audit.pgAuditLog }}
+ - name: POSTGRESQL_PGAUDIT_LOG
+ value: {{ .Values.audit.pgAuditLog | quote }}
+ {{- end }}
+ - name: POSTGRESQL_PGAUDIT_LOG_CATALOG
+ value: {{ .Values.audit.pgAuditLogCatalog | quote }}
+ # Others
+ - name: POSTGRESQL_CLIENT_MIN_MESSAGES
+ value: {{ .Values.audit.clientMinMessages | quote }}
+ - name: POSTGRESQL_SHARED_PRELOAD_LIBRARIES
+ value: {{ .Values.postgresqlSharedPreloadLibraries | quote }}
+ {{- if .Values.primary.extraEnvVars }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.primary.extraEnvVars "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if or .Values.primary.extraEnvVarsCM .Values.primary.extraEnvVarsSecret }}
+ envFrom:
+ {{- if .Values.primary.extraEnvVarsCM }}
+ - configMapRef:
+ name: {{ .Values.primary.extraEnvVarsCM }}
+ {{- end }}
+ {{- if .Values.primary.extraEnvVarsSecret }}
+ - secretRef:
+ name: {{ .Values.primary.extraEnvVarsSecret }}
+ {{- end }}
+ {{- end }}
+ ports:
+ - name: tcp-postgresql
+ containerPort: {{ .Values.containerPorts.postgresql }}
+ {{- if not .Values.diagnosticMode.enabled }}
+ {{- if .Values.primary.customStartupProbe }}
+ startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.primary.customStartupProbe "context" $) | nindent 12 }}
+ {{- else if .Values.primary.startupProbe.enabled }}
+ startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.primary.startupProbe "enabled") "context" $) | nindent 12 }}
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ {{- if (include "postgresql.v1.database" .) }}
+ - exec pg_isready -U {{ default "postgres" $customUser | quote }} -d "dbname={{ include "postgresql.v1.database" . }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} sslcert={{ include "postgresql.v1.tlsCert" . }} sslkey={{ include "postgresql.v1.tlsCertKey" . }}{{- end }}" -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }}
+ {{- else }}
+ - exec pg_isready -U {{ default "postgres" $customUser | quote }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} -d "sslcert={{ include "postgresql.v1.tlsCert" . }} sslkey={{ include "postgresql.v1.tlsCertKey" . }}"{{- end }} -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.primary.customLivenessProbe }}
+ livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.primary.customLivenessProbe "context" $) | nindent 12 }}
+ {{- else if .Values.primary.livenessProbe.enabled }}
+ livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.primary.livenessProbe "enabled") "context" $) | nindent 12 }}
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ {{- if (include "postgresql.v1.database" .) }}
+ - exec pg_isready -U {{ default "postgres" $customUser | quote }} -d "dbname={{ include "postgresql.v1.database" . }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} sslcert={{ include "postgresql.v1.tlsCert" . }} sslkey={{ include "postgresql.v1.tlsCertKey" . }}{{- end }}" -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }}
+ {{- else }}
+ - exec pg_isready -U {{ default "postgres" $customUser | quote }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} -d "sslcert={{ include "postgresql.v1.tlsCert" . }} sslkey={{ include "postgresql.v1.tlsCertKey" . }}"{{- end }} -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.primary.customReadinessProbe }}
+ readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.primary.customReadinessProbe "context" $) | nindent 12 }}
+ {{- else if .Values.primary.readinessProbe.enabled }}
+ readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.primary.readinessProbe "enabled") "context" $) | nindent 12 }}
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ - -e
+ {{- include "postgresql.v1.readinessProbeCommand" . | nindent 16 }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.primary.resources }}
+ resources: {{- toYaml .Values.primary.resources | nindent 12 }}
+ {{- else if ne .Values.primary.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.primary.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.primary.lifecycleHooks }}
+ lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.primary.lifecycleHooks "context" $) | nindent 12 }}
+ {{- end }}
+ volumeMounts:
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: tmp-dir
+ - name: empty-dir
+ mountPath: /opt/bitnami/postgresql/conf
+ subPath: app-conf-dir
+ - name: empty-dir
+ mountPath: /opt/bitnami/postgresql/tmp
+ subPath: app-tmp-dir
+ {{- if or .Values.primary.preInitDb.scriptsConfigMap .Values.primary.preInitDb.scripts }}
+ - name: custom-preinit-scripts
+ mountPath: /docker-entrypoint-preinitdb.d/
+ {{- end }}
+ {{- if .Values.primary.preInitDb.scriptsSecret }}
+ - name: custom-preinit-scripts-secret
+ mountPath: /docker-entrypoint-preinitdb.d/secret
+ {{- end }}
+ {{- if or .Values.primary.initdb.scriptsConfigMap .Values.primary.initdb.scripts }}
+ - name: custom-init-scripts
+ mountPath: /docker-entrypoint-initdb.d/
+ {{- end }}
+ {{- if .Values.primary.initdb.scriptsSecret }}
+ - name: custom-init-scripts-secret
+ mountPath: /docker-entrypoint-initdb.d/secret
+ {{- end }}
+ {{- if or .Values.primary.extendedConfiguration .Values.primary.existingExtendedConfigmap }}
+ - name: postgresql-extended-config
+ mountPath: {{ .Values.primary.persistence.mountPath }}/conf/conf.d/
+ {{- end }}
+ {{- if and .Values.auth.usePasswordFiles (or .Values.auth.enablePostgresUser $customUser) }}
+ - name: postgresql-password
+ mountPath: /opt/bitnami/postgresql/secrets/
+ {{- end }}
+ {{- if .Values.tls.enabled }}
+ - name: postgresql-certificates
+ mountPath: /opt/bitnami/postgresql/certs
+ readOnly: true
+ {{- end }}
+ {{- if .Values.shmVolume.enabled }}
+ - name: dshm
+ mountPath: /dev/shm
+ {{- end }}
+ - name: {{ .Values.primary.persistence.volumeName }}
+ mountPath: {{ .Values.primary.persistence.mountPath }}
+ {{- if .Values.primary.persistence.subPath }}
+ subPath: {{ .Values.primary.persistence.subPath }}
+ {{- end }}
+ {{- if or .Values.primary.configuration .Values.primary.pgHbaConfiguration .Values.primary.existingConfigmap }}
+ - name: postgresql-config
+ mountPath: {{ .Values.primary.persistence.mountPath }}/conf
+ {{- end }}
+ {{- if .Values.primary.extraVolumeMounts }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.primary.extraVolumeMounts "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.metrics.enabled }}
+ - name: metrics
+ image: {{ include "postgresql.v1.metrics.image" . }}
+ imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
+ {{- if .Values.metrics.containerSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.metrics.containerSecurityContext "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.diagnosticMode.enabled }}
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
+ {{- else if or .Values.metrics.customMetrics .Values.metrics.collectors }}
+ args:
+ {{- if .Values.metrics.customMetrics }}
+ - --extend.query-path
+ - /conf/custom-metrics.yaml
+ {{- end }}
+ {{- range $name, $enabled := .Values.metrics.collectors }}
+ - --{{ if not $enabled }}no-{{ end }}collector.{{ $name }}
+ {{- end }}
+ {{- end }}
+ env:
+ - name: DATA_SOURCE_URI
+ value: {{ printf "127.0.0.1:%d/postgres?sslmode=disable" (int (include "postgresql.v1.service.port" .)) }}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: DATA_SOURCE_PASS_FILE
+ value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.v1.adminPasswordKey" .) }}
+ {{- else }}
+ - name: DATA_SOURCE_PASS
+ valueFrom:
+ secretKeyRef:
+ name: {{ include "postgresql.v1.secretName" . }}
+ key: {{ include "postgresql.v1.adminPasswordKey" . }}
+ {{- end }}
+ - name: DATA_SOURCE_USER
+ value: "postgres"
+ {{- if include "common.fips.enabled" . }}
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.metrics.fips "global" .Values.global) | quote }}
+ - name: GODEBUG
+ value: {{ include "common.fips.config" (dict "tech" "golang" "fips" .Values.metrics.fips "global" .Values.global) | quote }}
+ {{- end }}
+ {{- if .Values.metrics.extraEnvVars }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.metrics.extraEnvVars "context" $) | nindent 12 }}
+ {{- end }}
+ ports:
+ - name: http-metrics
+ containerPort: {{ .Values.metrics.containerPorts.metrics }}
+ {{- if not .Values.diagnosticMode.enabled }}
+ {{- if .Values.metrics.customStartupProbe }}
+ startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customStartupProbe "context" $) | nindent 12 }}
+ {{- else if .Values.metrics.startupProbe.enabled }}
+ startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.startupProbe "enabled") "context" $) | nindent 12 }}
+ tcpSocket:
+ port: http-metrics
+ {{- end }}
+ {{- if .Values.metrics.customLivenessProbe }}
+ livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customLivenessProbe "context" $) | nindent 12 }}
+ {{- else if .Values.metrics.livenessProbe.enabled }}
+ livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.livenessProbe "enabled") "context" $) | nindent 12 }}
+ httpGet:
+ path: /
+ port: http-metrics
+ {{- end }}
+ {{- if .Values.metrics.customReadinessProbe }}
+ readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customReadinessProbe "context" $) | nindent 12 }}
+ {{- else if .Values.metrics.readinessProbe.enabled }}
+ readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.readinessProbe "enabled") "context" $) | nindent 12 }}
+ httpGet:
+ path: /
+ port: http-metrics
+ {{- end }}
+ {{- end }}
+ volumeMounts:
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: tmp-dir
+ {{- if and .Values.auth.usePasswordFiles (or .Values.auth.enablePostgresUser $customUser) }}
+ - name: postgresql-password
+ mountPath: /opt/bitnami/postgresql/secrets/
+ {{- end }}
+ {{- if .Values.metrics.customMetrics }}
+ - name: custom-metrics
+ mountPath: /conf
+ readOnly: true
+ {{- end }}
+ {{- if .Values.metrics.resources }}
+ resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
+ {{- else if ne .Values.metrics.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.metrics.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.primary.sidecars }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.primary.sidecars "context" $ ) | nindent 8 }}
+ {{- end }}
+ volumes:
+ - name: empty-dir
+ emptyDir: {}
+ {{- if or .Values.primary.configuration .Values.primary.pgHbaConfiguration .Values.primary.existingConfigmap }}
+ - name: postgresql-config
+ configMap:
+ name: {{ include "postgresql.v1.primary.configmapName" . }}
+ {{- end }}
+ {{- if or .Values.primary.extendedConfiguration .Values.primary.existingExtendedConfigmap }}
+ - name: postgresql-extended-config
+ configMap:
+ name: {{ include "postgresql.v1.primary.extendedConfigmapName" . }}
+ {{- end }}
+ {{- if and .Values.auth.usePasswordFiles (or .Values.auth.enablePostgresUser $customUser) }}
+ - name: postgresql-password
+ secret:
+ secretName: {{ include "postgresql.v1.secretName" . }}
+ {{- end }}
+ {{- if or .Values.primary.preInitDb.scriptsConfigMap .Values.primary.preInitDb.scripts }}
+ - name: custom-preinit-scripts
+ configMap:
+ name: {{ include "postgresql.v1.preInitDb.scriptsCM" . }}
+ {{- end }}
+ {{- if .Values.primary.preInitDb.scriptsSecret }}
+ - name: custom-preinit-scripts-secret
+ secret:
+ secretName: {{ tpl .Values.primary.preInitDb.scriptsSecret $ }}
+ {{- end }}
+ {{- if or .Values.primary.initdb.scriptsConfigMap .Values.primary.initdb.scripts }}
+ - name: custom-init-scripts
+ configMap:
+ name: {{ include "postgresql.v1.initdb.scriptsCM" . }}
+ {{- end }}
+ {{- if .Values.primary.initdb.scriptsSecret }}
+ - name: custom-init-scripts-secret
+ secret:
+ secretName: {{ tpl .Values.primary.initdb.scriptsSecret $ }}
+ {{- end }}
+ {{- if .Values.tls.enabled }}
+ - name: raw-certificates
+ secret:
+ secretName: {{ include "postgresql.v1.tlsSecretName" . }}
+ - name: postgresql-certificates
+ emptyDir: {}
+ {{- end }}
+ {{- if .Values.primary.extraVolumes }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.primary.extraVolumes "context" $ ) | nindent 8 }}
+ {{- end }}
+ {{- if and .Values.metrics.enabled .Values.metrics.customMetrics }}
+ - name: custom-metrics
+ configMap:
+ name: {{ printf "%s-metrics" (include "postgresql.v1.primary.fullname" .) }}
+ {{- end }}
+ {{- if .Values.shmVolume.enabled }}
+ - name: dshm
+ emptyDir:
+ medium: Memory
+ {{- if .Values.shmVolume.sizeLimit }}
+ sizeLimit: {{ .Values.shmVolume.sizeLimit }}
+ {{- end }}
+ {{- end }}
+ {{- if and .Values.primary.persistence.enabled .Values.primary.persistence.existingClaim }}
+ - name: {{ .Values.primary.persistence.volumeName }}
+ persistentVolumeClaim:
+ claimName: {{ tpl .Values.primary.persistence.existingClaim $ }}
+ {{- else if not .Values.primary.persistence.enabled }}
+ - name: {{ .Values.primary.persistence.volumeName }}
+ emptyDir: {}
+ {{- else }}
+ {{- if .Values.primary.persistentVolumeClaimRetentionPolicy.enabled }}
+ persistentVolumeClaimRetentionPolicy:
+ whenDeleted: {{ .Values.primary.persistentVolumeClaimRetentionPolicy.whenDeleted }}
+ whenScaled: {{ .Values.primary.persistentVolumeClaimRetentionPolicy.whenScaled }}
+ {{- end }}
+ volumeClaimTemplates:
+ - apiVersion: v1
+ kind: PersistentVolumeClaim
+ metadata:
+ name: {{ .Values.primary.persistence.volumeName }}
+ {{- if .Values.primary.persistence.annotations }}
+ annotations: {{- include "common.tplvalues.render" (dict "value" .Values.primary.persistence.annotations "context" $) | nindent 10 }}
+ {{- end }}
+ {{- if .Values.primary.persistence.labels }}
+ labels: {{- include "common.tplvalues.render" (dict "value" .Values.primary.persistence.labels "context" $) | nindent 10 }}
+ {{- end }}
+ spec:
+ accessModes:
+ {{- range .Values.primary.persistence.accessModes }}
+ - {{ . | quote }}
+ {{- end }}
+ {{- if .Values.primary.persistence.dataSource }}
+ dataSource: {{- include "common.tplvalues.render" (dict "value" .Values.primary.persistence.dataSource "context" $) | nindent 10 }}
+ {{- end }}
+ resources:
+ requests:
+ storage: {{ .Values.primary.persistence.size | quote }}
+ {{- if .Values.primary.persistence.selector }}
+ selector: {{- include "common.tplvalues.render" (dict "value" .Values.primary.persistence.selector "context" $) | nindent 10 }}
+ {{- end }}
+ {{- include "common.storage.class" (dict "persistence" .Values.primary.persistence "global" .Values.global) | nindent 8 }}
+ {{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/primary/svc-headless.yaml b/charts/semaphore/charts/postgresql/templates/primary/svc-headless.yaml
new file mode 100644
index 0000000..180cfcb
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/primary/svc-headless.yaml
@@ -0,0 +1,31 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "postgresql.v1.primary.svc.headless" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: primary
+ annotations:
+ {{- if or .Values.primary.service.headless.annotations .Values.commonAnnotations }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.service.headless.annotations .Values.commonAnnotations ) "context" . ) }}
+ {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
+ {{- end }}
+spec:
+ type: ClusterIP
+ clusterIP: None
+ # We want all pods in the StatefulSet to have their addresses published for
+ # the sake of the other Postgresql pods even before they're ready, since they
+ # have to be able to talk to each other in order to become ready.
+ publishNotReadyAddresses: true
+ ports:
+ - name: tcp-postgresql
+ port: {{ template "postgresql.v1.service.port" . }}
+ targetPort: tcp-postgresql
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.podLabels .Values.commonLabels ) "context" . ) }}
+ selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: primary
diff --git a/charts/semaphore/charts/postgresql/templates/primary/svc.yaml b/charts/semaphore/charts/postgresql/templates/primary/svc.yaml
new file mode 100644
index 0000000..5c19746
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/primary/svc.yaml
@@ -0,0 +1,58 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "postgresql.v1.primary.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ {{- $labels := .Values.commonLabels }}
+ {{- if .Values.primary.service.labels }}
+ {{- $labels = include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.service.labels $labels ) "context" . ) }}
+ {{- end }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: primary
+ {{- if or .Values.commonAnnotations .Values.primary.service.annotations }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.service.annotations .Values.commonAnnotations ) "context" . ) }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
+ {{- end }}
+spec:
+ type: {{ .Values.primary.service.type }}
+ {{- if or (eq .Values.primary.service.type "LoadBalancer") (eq .Values.primary.service.type "NodePort") }}
+ externalTrafficPolicy: {{ .Values.primary.service.externalTrafficPolicy | quote }}
+ {{- end }}
+ {{- if and (eq .Values.primary.service.type "LoadBalancer") (not (empty .Values.primary.service.loadBalancerSourceRanges)) }}
+ loadBalancerSourceRanges: {{ .Values.primary.service.loadBalancerSourceRanges | toJson}}
+ {{- end }}
+ {{- if and (eq .Values.primary.service.type "LoadBalancer") (not (empty .Values.primary.service.loadBalancerClass)) }}
+ loadBalancerClass: {{ .Values.primary.service.loadBalancerClass }}
+ {{- end }}
+ {{- if and (eq .Values.primary.service.type "LoadBalancer") (not (empty .Values.primary.service.loadBalancerIP)) }}
+ loadBalancerIP: {{ .Values.primary.service.loadBalancerIP }}
+ {{- end }}
+ {{- if and .Values.primary.service.clusterIP (eq .Values.primary.service.type "ClusterIP") }}
+ clusterIP: {{ .Values.primary.service.clusterIP }}
+ {{- end }}
+ {{- if ne .Values.primary.service.sessionAffinity "None"}}
+ sessionAffinity: {{ .Values.primary.service.sessionAffinity }}
+ {{- if .Values.primary.service.sessionAffinityConfig }}
+ sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.primary.service.sessionAffinityConfig "context" $) | nindent 4 }}
+ {{- end }}
+ {{- end }}
+ ports:
+ - name: tcp-postgresql
+ port: {{ template "postgresql.v1.service.port" . }}
+ targetPort: tcp-postgresql
+ {{- if and (or (eq .Values.primary.service.type "NodePort") (eq .Values.primary.service.type "LoadBalancer")) (not (empty .Values.primary.service.nodePorts.postgresql)) }}
+ nodePort: {{ .Values.primary.service.nodePorts.postgresql }}
+ {{- else if eq .Values.primary.service.type "ClusterIP" }}
+ nodePort: null
+ {{- end }}
+ {{- if .Values.primary.service.extraPorts }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.primary.service.extraPorts "context" $) | nindent 4 }}
+ {{- end }}
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.podLabels .Values.commonLabels ) "context" . ) }}
+ selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: primary
diff --git a/charts/semaphore/charts/postgresql/templates/prometheusrule.yaml b/charts/semaphore/charts/postgresql/templates/prometheusrule.yaml
new file mode 100644
index 0000000..fadcd32
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/prometheusrule.yaml
@@ -0,0 +1,22 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
+apiVersion: monitoring.coreos.com/v1
+kind: PrometheusRule
+metadata:
+ name: {{ include "postgresql.v1.chart.fullname" . }}
+ namespace: {{ coalesce .Values.metrics.prometheusRule.namespace (include "common.names.namespace" .) | quote }}
+ {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.prometheusRule.labels .Values.commonLabels ) "context" . ) }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: metrics
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ groups:
+ - name: {{ include "postgresql.v1.chart.fullname" . }}
+ rules: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.rules "context" $ ) | nindent 8 }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/psp.yaml b/charts/semaphore/charts/postgresql/templates/psp.yaml
new file mode 100644
index 0000000..b15efa3
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/psp.yaml
@@ -0,0 +1,42 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and (include "common.capabilities.psp.supported" .) .Values.psp.create }}
+apiVersion: policy/v1beta1
+kind: PodSecurityPolicy
+metadata:
+ name: {{ include "postgresql.v1.chart.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ privileged: false
+ volumes:
+ - 'configMap'
+ - 'secret'
+ - 'persistentVolumeClaim'
+ - 'emptyDir'
+ - 'projected'
+ hostNetwork: false
+ hostIPC: false
+ hostPID: false
+ runAsUser:
+ rule: 'RunAsAny'
+ seLinux:
+ rule: 'RunAsAny'
+ supplementalGroups:
+ rule: 'MustRunAs'
+ ranges:
+ - min: 1
+ max: 65535
+ fsGroup:
+ rule: 'MustRunAs'
+ ranges:
+ - min: 1
+ max: 65535
+ readOnlyRootFilesystem: false
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/read/extended-configmap.yaml b/charts/semaphore/charts/postgresql/templates/read/extended-configmap.yaml
new file mode 100644
index 0000000..6ffc93c
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/read/extended-configmap.yaml
@@ -0,0 +1,20 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if (include "postgresql.v1.readReplicas.createExtendedConfigmap" .) }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ printf "%s-extended-configuration" (include "postgresql.v1.readReplica.fullname" .) }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: read
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+data:
+ override.conf: |-
+ {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.extendedConfiguration "context" $ ) | nindent 4 }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/read/metrics-configmap.yaml b/charts/semaphore/charts/postgresql/templates/read/metrics-configmap.yaml
new file mode 100644
index 0000000..a4ed6b7
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/read/metrics-configmap.yaml
@@ -0,0 +1,18 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.metrics.enabled .Values.metrics.customMetrics (eq .Values.architecture "replication") }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ printf "%s-metrics" (include "postgresql.v1.readReplica.fullname" .) }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+data:
+ custom-metrics.yaml: {{ toYaml .Values.metrics.customMetrics | quote }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/read/metrics-svc.yaml b/charts/semaphore/charts/postgresql/templates/read/metrics-svc.yaml
new file mode 100644
index 0000000..fccd1b9
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/read/metrics-svc.yaml
@@ -0,0 +1,31 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.metrics.enabled (eq .Values.architecture "replication") }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ printf "%s-metrics" (include "postgresql.v1.readReplica.fullname" .) }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: metrics-read
+ {{- if or .Values.commonAnnotations .Values.metrics.service.annotations }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.service.annotations .Values.commonAnnotations ) "context" . ) }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
+ {{- end }}
+spec:
+ type: ClusterIP
+ sessionAffinity: {{ .Values.metrics.service.sessionAffinity }}
+ {{- if .Values.metrics.service.clusterIP }}
+ clusterIP: {{ .Values.metrics.service.clusterIP }}
+ {{- end }}
+ ports:
+ - name: http-metrics
+ port: {{ .Values.metrics.service.ports.metrics }}
+ targetPort: http-metrics
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.podLabels .Values.commonLabels ) "context" . ) }}
+ selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: read
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/read/networkpolicy.yaml b/charts/semaphore/charts/postgresql/templates/read/networkpolicy.yaml
new file mode 100644
index 0000000..9c730d8
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/read/networkpolicy.yaml
@@ -0,0 +1,80 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if eq .Values.architecture "replication" }}
+{{- if .Values.readReplicas.networkPolicy.enabled }}
+kind: NetworkPolicy
+apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
+metadata:
+ name: {{ include "postgresql.v1.readReplica.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: read
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.podLabels .Values.commonLabels ) "context" . ) }}
+ podSelector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
+ app.kubernetes.io/component: read
+ policyTypes:
+ - Ingress
+ - Egress
+ {{- if .Values.readReplicas.networkPolicy.allowExternalEgress }}
+ egress:
+ - {}
+ {{- else }}
+ egress:
+ # Allow dns resolution
+ - ports:
+ - port: 53
+ protocol: UDP
+ - port: 53
+ protocol: TCP
+ # Allow outbound connections to primary
+ - ports:
+ - port: {{ .Values.containerPorts.postgresql }}
+ to:
+ - podSelector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }}
+ app.kubernetes.io/component: primary
+ {{- if .Values.readReplicas.networkPolicy.extraEgress }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.networkPolicy.extraEgress "context" $ ) | nindent 4 }}
+ {{- end }}
+ {{- end }}
+ ingress:
+ - ports:
+ - port: {{ .Values.containerPorts.postgresql }}
+ {{- if .Values.metrics.enabled }}
+ - port: {{ .Values.metrics.containerPorts.metrics }}
+ {{- end }}
+ {{- if not .Values.readReplicas.networkPolicy.allowExternal }}
+ from:
+ - podSelector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }}
+ - podSelector:
+ matchLabels:
+ {{ template "postgresql.v1.readReplica.fullname" . }}-client: "true"
+ {{- if .Values.readReplicas.networkPolicy.ingressNSMatchLabels }}
+ - namespaceSelector:
+ matchLabels:
+ {{- range $key, $value := .Values.readReplicas.networkPolicy.ingressNSMatchLabels }}
+ {{ $key | quote }}: {{ $value | quote }}
+ {{- end }}
+ {{- if .Values.readReplicas.networkPolicy.ingressNSPodMatchLabels }}
+ podSelector:
+ matchLabels:
+ {{- range $key, $value := .Values.readReplicas.networkPolicy.ingressNSPodMatchLabels }}
+ {{ $key | quote }}: {{ $value | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.readReplicas.networkPolicy.extraIngress }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.networkPolicy.extraIngress "context" $ ) | nindent 4 }}
+ {{- end }}
+{{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/read/pdb.yaml b/charts/semaphore/charts/postgresql/templates/read/pdb.yaml
new file mode 100644
index 0000000..bd2eaad
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/read/pdb.yaml
@@ -0,0 +1,29 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and ( eq .Values.architecture "replication" ) .Values.readReplicas.pdb.create }}
+apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
+kind: PodDisruptionBudget
+metadata:
+ name: {{ include "postgresql.v1.readReplica.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.labels .Values.commonLabels ) "context" . ) }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: read
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ {{- if .Values.readReplicas.pdb.minAvailable }}
+ minAvailable: {{ .Values.readReplicas.pdb.minAvailable }}
+ {{- end }}
+ {{- if or .Values.readReplicas.pdb.maxUnavailable ( not .Values.readReplicas.pdb.minAvailable ) }}
+ maxUnavailable: {{ .Values.readReplicas.pdb.maxUnavailable | default 1 }}
+ {{- end }}
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.podLabels .Values.commonLabels ) "context" . ) }}
+ selector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
+ app.kubernetes.io/component: read
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/read/servicemonitor.yaml b/charts/semaphore/charts/postgresql/templates/read/servicemonitor.yaml
new file mode 100644
index 0000000..b1536a6
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/read/servicemonitor.yaml
@@ -0,0 +1,46 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled (eq .Values.architecture "replication") }}
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+ name: {{ include "postgresql.v1.readReplica.fullname" . }}
+ namespace: {{ coalesce .Values.metrics.serviceMonitor.namespace (include "common.names.namespace" .) | quote }}
+ {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: metrics-read
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+spec:
+ {{- if .Values.metrics.serviceMonitor.jobLabel }}
+ jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }}
+ {{- end }}
+ selector:
+ {{- $svcLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.selector .Values.commonLabels ) "context" . ) }}
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $svcLabels "context" $ ) | nindent 6 }}
+ app.kubernetes.io/component: metrics-read
+ endpoints:
+ - port: http-metrics
+ {{- if .Values.metrics.serviceMonitor.interval }}
+ interval: {{ .Values.metrics.serviceMonitor.interval }}
+ {{- end }}
+ {{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
+ scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
+ {{- end }}
+ {{- if .Values.metrics.serviceMonitor.relabelings }}
+ relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.relabelings "context" $) | nindent 6 }}
+ {{- end }}
+ {{- if .Values.metrics.serviceMonitor.metricRelabelings }}
+ metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 6 }}
+ {{- end }}
+ {{- if .Values.metrics.serviceMonitor.honorLabels }}
+ honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }}
+ {{- end }}
+ namespaceSelector:
+ matchNames:
+ - {{ include "common.names.namespace" . | quote }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/read/statefulset.yaml b/charts/semaphore/charts/postgresql/templates/read/statefulset.yaml
new file mode 100644
index 0000000..2952934
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/read/statefulset.yaml
@@ -0,0 +1,612 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if eq .Values.architecture "replication" }}
+{{- $customUser := include "postgresql.v1.username" . }}
+apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
+kind: StatefulSet
+metadata:
+ name: {{ include "postgresql.v1.readReplica.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.labels .Values.commonLabels ) "context" . ) }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: read
+ {{- if or .Values.commonAnnotations .Values.readReplicas.annotations }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.annotations .Values.commonAnnotations ) "context" . ) }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
+ {{- end }}
+spec:
+ replicas: {{ .Values.readReplicas.replicaCount }}
+ serviceName: {{ include "postgresql.v1.readReplica.svc.headless" . }}
+ {{- if .Values.readReplicas.updateStrategy }}
+ updateStrategy: {{- toYaml .Values.readReplicas.updateStrategy | nindent 4 }}
+ {{- end }}
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.podLabels .Values.commonLabels ) "context" . ) }}
+ selector:
+ matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
+ app.kubernetes.io/component: read
+ template:
+ metadata:
+ name: {{ include "postgresql.v1.readReplica.fullname" . }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
+ app.kubernetes.io/component: read
+ {{- if or .Values.passwordUpdateJob.enabled (include "postgresql.v1.readReplicas.createExtendedConfigmap" .) .Values.readReplicas.podAnnotations }}
+ annotations:
+ {{- if (include "postgresql.v1.readReplicas.createExtendedConfigmap" .) }}
+ checksum/extended-configuration: {{ pick (include (print $.Template.BasePath "/primary/extended-configmap.yaml") . | fromYaml) "data" | toYaml | sha256sum }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.enabled }}
+ charts.bitnami.com/password-last-update: {{ now | date "20060102150405" | quote }}
+ {{- end }}
+ {{- if .Values.readReplicas.podAnnotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.podAnnotations "context" $ ) | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ spec:
+ {{- if .Values.readReplicas.extraPodSpec }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.extraPodSpec "context" $) | nindent 6 }}
+ {{- end }}
+ serviceAccountName: {{ include "postgresql.v1.serviceAccountName" . }}
+ {{- include "postgresql.v1.imagePullSecrets" . | nindent 6 }}
+ automountServiceAccountToken: {{ .Values.readReplicas.automountServiceAccountToken }}
+ {{- if .Values.readReplicas.hostAliases }}
+ hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.hostAliases "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.readReplicas.affinity }}
+ affinity: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.affinity "context" $) | nindent 8 }}
+ {{- else }}
+ affinity:
+ podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.readReplicas.podAffinityPreset "component" "read" "customLabels" $podLabels "context" $) | nindent 10 }}
+ podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.readReplicas.podAntiAffinityPreset "component" "read" "customLabels" $podLabels "context" $) | nindent 10 }}
+ nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.readReplicas.nodeAffinityPreset.type "key" .Values.readReplicas.nodeAffinityPreset.key "values" .Values.readReplicas.nodeAffinityPreset.values) | nindent 10 }}
+ {{- end }}
+ {{- if .Values.readReplicas.nodeSelector }}
+ nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.nodeSelector "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.readReplicas.tolerations }}
+ tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.tolerations "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.readReplicas.topologySpreadConstraints }}
+ topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.topologySpreadConstraints "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.readReplicas.priorityClassName }}
+ priorityClassName: {{ .Values.readReplicas.priorityClassName }}
+ {{- end }}
+ {{- if .Values.readReplicas.schedulerName }}
+ schedulerName: {{ .Values.readReplicas.schedulerName | quote }}
+ {{- end }}
+ {{- if .Values.readReplicas.terminationGracePeriodSeconds }}
+ terminationGracePeriodSeconds: {{ .Values.readReplicas.terminationGracePeriodSeconds }}
+ {{- end }}
+ {{- if .Values.readReplicas.podSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.readReplicas.podSecurityContext "context" $) | nindent 8 }}
+ {{- end }}
+ hostNetwork: {{ .Values.readReplicas.hostNetwork }}
+ hostIPC: {{ .Values.readReplicas.hostIPC }}
+ {{- if or (and .Values.tls.enabled (not .Values.volumePermissions.enabled)) (and .Values.volumePermissions.enabled (or .Values.readReplicas.persistence.enabled .Values.shmVolume.enabled)) .Values.readReplicas.initContainers }}
+ initContainers:
+ {{- if and .Values.tls.enabled (not .Values.volumePermissions.enabled) }}
+ - name: copy-certs
+ image: {{ include "postgresql.v1.volumePermissions.image" . }}
+ imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
+ {{- if .Values.readReplicas.resources }}
+ resources: {{- toYaml .Values.readReplicas.resources | nindent 12 }}
+ {{- else if ne .Values.readReplicas.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.readReplicas.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ # We don't require a privileged container in this case
+ {{- if .Values.readReplicas.containerSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.readReplicas.containerSecurityContext "context" $) | nindent 12 }}
+ {{- end }}
+ command:
+ - /bin/sh
+ - -ec
+ - |
+ cp /tmp/certs/* /opt/bitnami/postgresql/certs/
+ chmod 600 {{ include "postgresql.v1.tlsCertKey" . }}
+ {{- if include "common.fips.enabled" . }}
+ env:
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.volumePermissions.fips "global" .Values.global) | quote }}
+ {{- end }}
+ volumeMounts:
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: tmp-dir
+ - name: raw-certificates
+ mountPath: /tmp/certs
+ - name: postgresql-certificates
+ mountPath: /opt/bitnami/postgresql/certs
+ {{- else if and .Values.volumePermissions.enabled (or .Values.readReplicas.persistence.enabled .Values.shmVolume.enabled) }}
+ - name: init-chmod-data
+ image: {{ include "postgresql.v1.volumePermissions.image" . }}
+ imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
+ {{- if .Values.readReplicas.resources }}
+ resources: {{- toYaml .Values.readReplicas.resources | nindent 12 }}
+ {{- else if ne .Values.readReplicas.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.readReplicas.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ command:
+ - /bin/sh
+ - -ec
+ - |
+ {{- if .Values.readReplicas.persistence.enabled }}
+ {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }}
+ chown `id -u`:`id -G | cut -d " " -f2` {{ .Values.readReplicas.persistence.mountPath }}
+ {{- else }}
+ chown {{ .Values.readReplicas.containerSecurityContext.runAsUser }}:{{ .Values.readReplicas.podSecurityContext.fsGroup }} {{ .Values.readReplicas.persistence.mountPath }}
+ {{- end }}
+ mkdir -p {{ .Values.readReplicas.persistence.mountPath }}/data {{- if (include "postgresql.v1.mountConfigurationCM" .) }} {{ .Values.readReplicas.persistence.mountPath }}/conf {{- end }}
+ chmod 700 {{ .Values.readReplicas.persistence.mountPath }}/data {{- if (include "postgresql.v1.mountConfigurationCM" .) }} {{ .Values.readReplicas.persistence.mountPath }}/conf {{- end }}
+ find {{ .Values.readReplicas.persistence.mountPath }} -mindepth 1 -maxdepth 1 {{- if not (include "postgresql.v1.mountConfigurationCM" .) }} -not -name "conf" {{- end }} -not -name ".snapshot" -not -name "lost+found" | \
+ {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }}
+ xargs -r chown -R `id -u`:`id -G | cut -d " " -f2`
+ {{- else }}
+ xargs -r chown -R {{ .Values.readReplicas.containerSecurityContext.runAsUser }}:{{ .Values.readReplicas.podSecurityContext.fsGroup }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.shmVolume.enabled }}
+ chmod -R 777 /dev/shm
+ {{- end }}
+ {{- if .Values.tls.enabled }}
+ cp /tmp/certs/* /opt/bitnami/postgresql/certs/
+ {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }}
+ chown -R `id -u`:`id -G | cut -d " " -f2` /opt/bitnami/postgresql/certs/
+ {{- else }}
+ chown -R {{ .Values.readReplicas.containerSecurityContext.runAsUser }}:{{ .Values.readReplicas.podSecurityContext.fsGroup }} /opt/bitnami/postgresql/certs/
+ {{- end }}
+ chmod 600 {{ include "postgresql.v1.tlsCertKey" . }}
+ {{- end }}
+ {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }}
+ securityContext: {{- omit .Values.volumePermissions.containerSecurityContext "runAsUser" | toYaml | nindent 12 }}
+ {{- else }}
+ securityContext: {{- .Values.volumePermissions.containerSecurityContext | toYaml | nindent 12 }}
+ {{- end }}
+ {{- if include "common.fips.enabled" . }}
+ env:
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.volumePermissions.fips "global" .Values.global) | quote }}
+ {{- end }}
+ volumeMounts:
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: tmp-dir
+ - name: data
+ mountPath: {{ .Values.readReplicas.persistence.mountPath }}
+ {{- if .Values.readReplicas.persistence.subPath }}
+ subPath: {{ .Values.readReplicas.persistence.subPath }}
+ {{- end }}
+ {{- if .Values.shmVolume.enabled }}
+ - name: dshm
+ mountPath: /dev/shm
+ {{- end }}
+ {{- if .Values.tls.enabled }}
+ - name: raw-certificates
+ mountPath: /tmp/certs
+ - name: postgresql-certificates
+ mountPath: /opt/bitnami/postgresql/certs
+ {{- end }}
+ {{- end }}
+ {{- if .Values.readReplicas.initContainers }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.initContainers "context" $ ) | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ containers:
+ - name: postgresql
+ image: {{ include "postgresql.v1.image" . }}
+ imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+ {{- if .Values.readReplicas.containerSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.readReplicas.containerSecurityContext "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.diagnosticMode.enabled }}
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
+ {{- else if .Values.readReplicas.command }}
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.command "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.diagnosticMode.enabled }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
+ {{- else if .Values.readReplicas.args }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.args "context" $) | nindent 12 }}
+ {{- end }}
+ env:
+ - name: BITNAMI_DEBUG
+ value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }}
+ - name: POSTGRESQL_PORT_NUMBER
+ value: {{ .Values.containerPorts.postgresql | quote }}
+ - name: POSTGRESQL_VOLUME_DIR
+ value: {{ .Values.readReplicas.persistence.mountPath | quote }}
+ {{- if .Values.readReplicas.persistence.mountPath }}
+ - name: PGDATA
+ value: {{ .Values.postgresqlDataDir | quote }}
+ {{- end }}
+ {{- if include "common.fips.enabled" . }}
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.readReplicas.fips "global" .Values.global) | quote }}
+ {{- end }}
+ {{- if include "common.fips.enabled" . }}
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.readReplicas.fips "global" .Values.global) | quote }}
+ {{- end }}
+ # Authentication
+ {{- if or (eq $customUser "postgres") (empty $customUser) }}
+ {{- if .Values.auth.enablePostgresUser }}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: POSTGRES_PASSWORD_FILE
+ value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.v1.adminPasswordKey" .) }}
+ {{- else }}
+ - name: POSTGRES_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ include "postgresql.v1.secretName" . }}
+ key: {{ include "postgresql.v1.adminPasswordKey" . }}
+ {{- end }}
+ {{- else }}
+ - name: ALLOW_EMPTY_PASSWORD
+ value: "true"
+ {{- end }}
+ {{- else }}
+ - name: POSTGRES_USER
+ value: {{ $customUser | quote }}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: POSTGRES_PASSWORD_FILE
+ value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.v1.userPasswordKey" .) }}
+ {{- else }}
+ - name: POSTGRES_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ include "postgresql.v1.secretName" . }}
+ key: {{ include "postgresql.v1.userPasswordKey" . }}
+ {{- end }}
+ {{- if .Values.auth.enablePostgresUser }}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: POSTGRES_POSTGRES_PASSWORD_FILE
+ value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.v1.adminPasswordKey" .) }}
+ {{- else }}
+ - name: POSTGRES_POSTGRES_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ include "postgresql.v1.secretName" . }}
+ key: {{ include "postgresql.v1.adminPasswordKey" . }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ # Replication
+ - name: POSTGRES_REPLICATION_MODE
+ value: "slave"
+ - name: POSTGRES_REPLICATION_USER
+ value: {{ .Values.auth.replicationUsername | quote }}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: POSTGRES_REPLICATION_PASSWORD_FILE
+ value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.v1.replicationPasswordKey" .) }}
+ {{- else }}
+ - name: POSTGRES_REPLICATION_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ include "postgresql.v1.secretName" . }}
+ key: {{ include "postgresql.v1.replicationPasswordKey" . }}
+ {{- end }}
+ - name: POSTGRES_CLUSTER_APP_NAME
+ value: {{ .Values.replication.applicationName }}
+ - name: POSTGRES_MASTER_HOST
+ value: {{ include "postgresql.v1.primary.fullname" . }}
+ - name: POSTGRES_MASTER_PORT_NUMBER
+ value: {{ include "postgresql.v1.service.port" . | quote }}
+ # TLS
+ - name: POSTGRESQL_ENABLE_TLS
+ value: {{ ternary "yes" "no" .Values.tls.enabled | quote }}
+ {{- if .Values.tls.enabled }}
+ - name: POSTGRESQL_TLS_PREFER_SERVER_CIPHERS
+ value: {{ ternary "yes" "no" .Values.tls.preferServerCiphers | quote }}
+ - name: POSTGRESQL_TLS_CERT_FILE
+ value: {{ include "postgresql.v1.tlsCert" . }}
+ - name: POSTGRESQL_TLS_KEY_FILE
+ value: {{ include "postgresql.v1.tlsCertKey" . }}
+ {{- if .Values.tls.certCAFilename }}
+ - name: POSTGRESQL_TLS_CA_FILE
+ value: {{ include "postgresql.v1.tlsCACert" . }}
+ {{- end }}
+ {{- if .Values.tls.crlFilename }}
+ - name: POSTGRESQL_TLS_CRL_FILE
+ value: {{ include "postgresql.v1.tlsCRL" . }}
+ {{- end }}
+ {{- end }}
+ # Audit
+ - name: POSTGRESQL_LOG_HOSTNAME
+ value: {{ .Values.audit.logHostname | quote }}
+ - name: POSTGRESQL_LOG_CONNECTIONS
+ value: {{ .Values.audit.logConnections | quote }}
+ - name: POSTGRESQL_LOG_DISCONNECTIONS
+ value: {{ .Values.audit.logDisconnections | quote }}
+ {{- if .Values.audit.logLinePrefix }}
+ - name: POSTGRESQL_LOG_LINE_PREFIX
+ value: {{ .Values.audit.logLinePrefix | quote }}
+ {{- end }}
+ {{- if .Values.audit.logTimezone }}
+ - name: POSTGRESQL_LOG_TIMEZONE
+ value: {{ .Values.audit.logTimezone | quote }}
+ {{- end }}
+ {{- if .Values.audit.pgAuditLog }}
+ - name: POSTGRESQL_PGAUDIT_LOG
+ value: {{ .Values.audit.pgAuditLog | quote }}
+ {{- end }}
+ - name: POSTGRESQL_PGAUDIT_LOG_CATALOG
+ value: {{ .Values.audit.pgAuditLogCatalog | quote }}
+ # Others
+ - name: POSTGRESQL_CLIENT_MIN_MESSAGES
+ value: {{ .Values.audit.clientMinMessages | quote }}
+ - name: POSTGRESQL_SHARED_PRELOAD_LIBRARIES
+ value: {{ .Values.postgresqlSharedPreloadLibraries | quote }}
+ {{- if .Values.readReplicas.extraEnvVars }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.extraEnvVars "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if or .Values.readReplicas.extraEnvVarsCM .Values.readReplicas.extraEnvVarsSecret }}
+ envFrom:
+ {{- if .Values.readReplicas.extraEnvVarsCM }}
+ - configMapRef:
+ name: {{ .Values.readReplicas.extraEnvVarsCM }}
+ {{- end }}
+ {{- if .Values.readReplicas.extraEnvVarsSecret }}
+ - secretRef:
+ name: {{ .Values.readReplicas.extraEnvVarsSecret }}
+ {{- end }}
+ {{- end }}
+ ports:
+ - name: tcp-postgresql
+ containerPort: {{ .Values.containerPorts.postgresql }}
+ {{- if not .Values.diagnosticMode.enabled }}
+ {{- if .Values.readReplicas.customStartupProbe }}
+ startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.customStartupProbe "context" $) | nindent 12 }}
+ {{- else if .Values.readReplicas.startupProbe.enabled }}
+ startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.readReplicas.startupProbe "enabled") "context" $) | nindent 12 }}
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ {{- if (include "postgresql.v1.database" .) }}
+ - exec pg_isready -U {{ default "postgres" $customUser| quote }} -d "dbname={{ include "postgresql.v1.database" . }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} sslcert={{ include "postgresql.v1.tlsCert" . }} sslkey={{ include "postgresql.v1.tlsCertKey" . }}{{- end }}" -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }}
+ {{- else }}
+ - exec pg_isready -U {{ default "postgres" $customUser | quote }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} -d "sslcert={{ include "postgresql.v1.tlsCert" . }} sslkey={{ include "postgresql.v1.tlsCertKey" . }}"{{- end }} -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.readReplicas.customLivenessProbe }}
+ livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.customLivenessProbe "context" $) | nindent 12 }}
+ {{- else if .Values.readReplicas.livenessProbe.enabled }}
+ livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.readReplicas.livenessProbe "enabled") "context" $) | nindent 12 }}
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ {{- if (include "postgresql.v1.database" .) }}
+ - exec pg_isready -U {{ default "postgres" $customUser | quote }} -d "dbname={{ include "postgresql.v1.database" . }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} sslcert={{ include "postgresql.v1.tlsCert" . }} sslkey={{ include "postgresql.v1.tlsCertKey" . }}{{- end }}" -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }}
+ {{- else }}
+ - exec pg_isready -U {{default "postgres" $customUser | quote }} {{- if and .Values.tls.enabled .Values.tls.certCAFilename }} -d "sslcert={{ include "postgresql.v1.tlsCert" . }} sslkey={{ include "postgresql.v1.tlsCertKey" . }}"{{- end }} -h 127.0.0.1 -p {{ .Values.containerPorts.postgresql }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.readReplicas.customReadinessProbe }}
+ readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.customReadinessProbe "context" $) | nindent 12 }}
+ {{- else if .Values.readReplicas.readinessProbe.enabled }}
+ readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.readReplicas.readinessProbe "enabled") "context" $) | nindent 12 }}
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ - -e
+ {{- include "postgresql.v1.readinessProbeCommand" . | nindent 16 }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.readReplicas.resources }}
+ resources: {{- toYaml .Values.readReplicas.resources | nindent 12 }}
+ {{- else if ne .Values.readReplicas.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.readReplicas.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.readReplicas.lifecycleHooks }}
+ lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.lifecycleHooks "context" $) | nindent 12 }}
+ {{- end }}
+ volumeMounts:
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: tmp-dir
+ - name: empty-dir
+ mountPath: /opt/bitnami/postgresql/conf
+ subPath: app-conf-dir
+ - name: empty-dir
+ mountPath: /opt/bitnami/postgresql/tmp
+ subPath: app-tmp-dir
+ {{- if and .Values.auth.usePasswordFiles (or .Values.auth.enablePostgresUser $customUser) }}
+ - name: postgresql-password
+ mountPath: /opt/bitnami/postgresql/secrets/
+ {{- end }}
+ {{- if .Values.readReplicas.extendedConfiguration }}
+ - name: postgresql-extended-config
+ mountPath: {{ .Values.readReplicas.persistence.mountPath }}/conf/conf.d/
+ {{- end }}
+ {{- if .Values.tls.enabled }}
+ - name: postgresql-certificates
+ mountPath: /opt/bitnami/postgresql/certs
+ readOnly: true
+ {{- end }}
+ {{- if .Values.shmVolume.enabled }}
+ - name: dshm
+ mountPath: /dev/shm
+ {{- end }}
+ - name: data
+ mountPath: {{ .Values.readReplicas.persistence.mountPath }}
+ {{- if .Values.readReplicas.persistence.subPath }}
+ subPath: {{ .Values.readReplicas.persistence.subPath }}
+ {{- end }}
+ {{- if .Values.readReplicas.extraVolumeMounts }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.extraVolumeMounts "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.metrics.enabled }}
+ - name: metrics
+ image: {{ include "postgresql.v1.metrics.image" . }}
+ imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
+ {{- if .Values.metrics.containerSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.metrics.containerSecurityContext "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.diagnosticMode.enabled }}
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
+ {{- else if or .Values.metrics.customMetrics .Values.metrics.collectors }}
+ args:
+ {{- if .Values.metrics.customMetrics }}
+ - --extend.query-path
+ - /conf/custom-metrics.yaml
+ {{- end }}
+ {{- range $name, $enabled := .Values.metrics.collectors }}
+ - --{{ if not $enabled }}no-{{ end }}collector.{{ $name }}
+ {{- end }}
+ {{- end }}
+ env:
+ - name: DATA_SOURCE_URI
+ value: {{ printf "127.0.0.1:%d/postgres?sslmode=disable" (int (include "postgresql.v1.service.port" .)) }}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: DATA_SOURCE_PASS_FILE
+ value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.v1.adminPasswordKey" .) }}
+ {{- else }}
+ - name: DATA_SOURCE_PASS
+ valueFrom:
+ secretKeyRef:
+ name: {{ include "postgresql.v1.secretName" . }}
+ key: {{ include "postgresql.v1.adminPasswordKey" . }}
+ {{- end }}
+ - name: DATA_SOURCE_USER
+ value: "postgres"
+ {{- if include "common.fips.enabled" . }}
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.metrics.fips "global" .Values.global) | quote }}
+ - name: GODEBUG
+ value: {{ include "common.fips.config" (dict "tech" "golang" "fips" .Values.metrics.fips "global" .Values.global) | quote }}
+ {{- end }}
+ {{- if .Values.metrics.extraEnvVars }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.metrics.extraEnvVars "context" $) | nindent 12 }}
+ {{- end }}
+ ports:
+ - name: http-metrics
+ containerPort: {{ .Values.metrics.containerPorts.metrics }}
+ {{- if not .Values.diagnosticMode.enabled }}
+ {{- if .Values.metrics.customStartupProbe }}
+ startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customStartupProbe "context" $) | nindent 12 }}
+ {{- else if .Values.metrics.startupProbe.enabled }}
+ startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.startupProbe "enabled") "context" $) | nindent 12 }}
+ tcpSocket:
+ port: http-metrics
+ {{- end }}
+ {{- if .Values.metrics.customLivenessProbe }}
+ livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customLivenessProbe "context" $) | nindent 12 }}
+ {{- else if .Values.metrics.livenessProbe.enabled }}
+ livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.livenessProbe "enabled") "context" $) | nindent 12 }}
+ httpGet:
+ path: /
+ port: http-metrics
+ {{- end }}
+ {{- if .Values.metrics.customReadinessProbe }}
+ readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customReadinessProbe "context" $) | nindent 12 }}
+ {{- else if .Values.metrics.readinessProbe.enabled }}
+ readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.readinessProbe "enabled") "context" $) | nindent 12 }}
+ httpGet:
+ path: /
+ port: http-metrics
+ {{- end }}
+ {{- end }}
+ volumeMounts:
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: tmp-dir
+ {{- if and .Values.auth.usePasswordFiles (or .Values.auth.enablePostgresUser $customUser) }}
+ - name: postgresql-password
+ mountPath: /opt/bitnami/postgresql/secrets/
+ {{- end }}
+ {{- if .Values.metrics.customMetrics }}
+ - name: custom-metrics
+ mountPath: /conf
+ readOnly: true
+ {{- end }}
+ {{- if .Values.metrics.resources }}
+ resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
+ {{- else if ne .Values.metrics.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.metrics.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.readReplicas.sidecars }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.sidecars "context" $ ) | nindent 8 }}
+ {{- end }}
+ volumes:
+ {{- if .Values.readReplicas.extendedConfiguration }}
+ - name: postgresql-extended-config
+ configMap:
+ name: {{ include "postgresql.v1.readReplicas.extendedConfigmapName" . }}
+ {{- end }}
+ {{- if and .Values.auth.usePasswordFiles (or .Values.auth.enablePostgresUser $customUser) }}
+ - name: postgresql-password
+ secret:
+ secretName: {{ include "postgresql.v1.secretName" . }}
+ {{- end }}
+ {{- if .Values.tls.enabled }}
+ - name: raw-certificates
+ secret:
+ secretName: {{ include "postgresql.v1.tlsSecretName" . }}
+ - name: postgresql-certificates
+ emptyDir: {}
+ {{- end }}
+ {{- if and .Values.metrics.enabled .Values.metrics.customMetrics }}
+ - name: custom-metrics
+ configMap:
+ name: {{ printf "%s-metrics" (include "postgresql.v1.readReplica.fullname" .) }}
+ {{- end }}
+ {{- if .Values.shmVolume.enabled }}
+ - name: dshm
+ emptyDir:
+ medium: Memory
+ {{- if .Values.shmVolume.sizeLimit }}
+ sizeLimit: {{ .Values.shmVolume.sizeLimit }}
+ {{- end }}
+ {{- end }}
+ - name: empty-dir
+ emptyDir: {}
+ {{- if .Values.readReplicas.extraVolumes }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.extraVolumes "context" $ ) | nindent 8 }}
+ {{- end }}
+ {{- if and .Values.readReplicas.persistence.enabled .Values.readReplicas.persistence.existingClaim }}
+ - name: data
+ persistentVolumeClaim:
+ claimName: {{ tpl .Values.readReplicas.persistence.existingClaim $ }}
+ {{- else if not .Values.readReplicas.persistence.enabled }}
+ - name: data
+ emptyDir: {}
+ {{- else }}
+ {{- if .Values.readReplicas.persistentVolumeClaimRetentionPolicy.enabled }}
+ persistentVolumeClaimRetentionPolicy:
+ whenDeleted: {{ .Values.readReplicas.persistentVolumeClaimRetentionPolicy.whenDeleted }}
+ whenScaled: {{ .Values.readReplicas.persistentVolumeClaimRetentionPolicy.whenScaled }}
+ {{- end }}
+ volumeClaimTemplates:
+ - apiVersion: v1
+ kind: PersistentVolumeClaim
+ metadata:
+ name: data
+ {{- if .Values.readReplicas.persistence.annotations }}
+ annotations: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.persistence.annotations "context" $) | nindent 10 }}
+ {{- end }}
+ {{- if .Values.readReplicas.persistence.labels }}
+ labels: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.persistence.labels "context" $) | nindent 10 }}
+ {{- end }}
+ spec:
+ accessModes:
+ {{- range .Values.readReplicas.persistence.accessModes }}
+ - {{ . | quote }}
+ {{- end }}
+ {{- if .Values.readReplicas.persistence.dataSource }}
+ dataSource: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.persistence.dataSource "context" $) | nindent 10 }}
+ {{- end }}
+ resources:
+ requests:
+ storage: {{ .Values.readReplicas.persistence.size | quote }}
+ {{- if .Values.readReplicas.persistence.selector }}
+ selector: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.persistence.selector "context" $) | nindent 10 }}
+ {{- end -}}
+ {{- include "common.storage.class" (dict "persistence" .Values.readReplicas.persistence "global" .Values.global) | nindent 8 }}
+ {{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/read/svc-headless.yaml b/charts/semaphore/charts/postgresql/templates/read/svc-headless.yaml
new file mode 100644
index 0000000..15342a3
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/read/svc-headless.yaml
@@ -0,0 +1,33 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if eq .Values.architecture "replication" }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "postgresql.v1.readReplica.svc.headless" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: read
+ annotations:
+ {{- if or .Values.readReplicas.service.headless.annotations .Values.commonAnnotations }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.service.headless.annotations .Values.commonAnnotations ) "context" . ) }}
+ {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
+ {{- end }}
+spec:
+ type: ClusterIP
+ clusterIP: None
+ # We want all pods in the StatefulSet to have their addresses published for
+ # the sake of the other Postgresql pods even before they're ready, since they
+ # have to be able to talk to each other in order to become ready.
+ publishNotReadyAddresses: true
+ ports:
+ - name: tcp-postgresql
+ port: {{ include "postgresql.v1.readReplica.service.port" . }}
+ targetPort: tcp-postgresql
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.podLabels .Values.commonLabels ) "context" . ) }}
+ selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: read
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/read/svc.yaml b/charts/semaphore/charts/postgresql/templates/read/svc.yaml
new file mode 100644
index 0000000..b44dd64
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/read/svc.yaml
@@ -0,0 +1,60 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if eq .Values.architecture "replication" }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "postgresql.v1.readReplica.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ {{- $labels := .Values.commonLabels }}
+ {{- if .Values.readReplicas.service.labels }}
+ {{- $labels = include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.service.labels $labels ) "context" . ) }}
+ {{- end }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: read
+ {{- if or .Values.commonAnnotations .Values.readReplicas.service.annotations }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.service.annotations .Values.commonAnnotations ) "context" . ) }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
+ {{- end }}
+spec:
+ type: {{ .Values.readReplicas.service.type }}
+ {{- if or (eq .Values.readReplicas.service.type "LoadBalancer") (eq .Values.readReplicas.service.type "NodePort") }}
+ externalTrafficPolicy: {{ .Values.readReplicas.service.externalTrafficPolicy | quote }}
+ {{- end }}
+ {{- if and (eq .Values.readReplicas.service.type "LoadBalancer") (not (empty .Values.readReplicas.service.loadBalancerSourceRanges)) }}
+ loadBalancerSourceRanges: {{ .Values.readReplicas.service.loadBalancerSourceRanges }}
+ {{- end }}
+ {{- if and (eq .Values.readReplicas.service.type "LoadBalancer") (not (empty .Values.readReplicas.service.loadBalancerClass)) }}
+ loadBalancerClass: {{ .Values.readReplicas.service.loadBalancerClass }}
+ {{- end }}
+ {{- if and (eq .Values.readReplicas.service.type "LoadBalancer") (not (empty .Values.readReplicas.service.loadBalancerIP)) }}
+ loadBalancerIP: {{ .Values.readReplicas.service.loadBalancerIP }}
+ {{- end }}
+ {{- if and .Values.readReplicas.service.clusterIP (eq .Values.readReplicas.service.type "ClusterIP") }}
+ clusterIP: {{ .Values.readReplicas.service.clusterIP }}
+ {{- end }}
+ {{- if ne .Values.readReplicas.service.sessionAffinity "None"}}
+ sessionAffinity: {{ .Values.readReplicas.service.sessionAffinity }}
+ {{- if .Values.readReplicas.service.sessionAffinityConfig }}
+ sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.service.sessionAffinityConfig "context" $) | nindent 4 }}
+ {{- end }}
+ {{- end }}
+ ports:
+ - name: tcp-postgresql
+ port: {{ include "postgresql.v1.readReplica.service.port" . }}
+ targetPort: tcp-postgresql
+ {{- if and (or (eq .Values.readReplicas.service.type "NodePort") (eq .Values.readReplicas.service.type "LoadBalancer")) (not (empty .Values.readReplicas.service.nodePorts.postgresql)) }}
+ nodePort: {{ .Values.readReplicas.service.nodePorts.postgresql }}
+ {{- else if eq .Values.readReplicas.service.type "ClusterIP" }}
+ nodePort: null
+ {{- end }}
+ {{- if .Values.readReplicas.service.extraPorts }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.service.extraPorts "context" $) | nindent 4 }}
+ {{- end }}
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.podLabels .Values.commonLabels ) "context" . ) }}
+ selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/component: read
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/role.yaml b/charts/semaphore/charts/postgresql/templates/role.yaml
new file mode 100644
index 0000000..ba906aa
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/role.yaml
@@ -0,0 +1,32 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if .Values.rbac.create }}
+kind: Role
+apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
+metadata:
+ name: {{ include "postgresql.v1.chart.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+# yamllint disable rule:indentation
+rules:
+ {{- if and (include "common.capabilities.psp.supported" .) .Values.psp.create }}
+ - apiGroups:
+ - 'policy'
+ resources:
+ - 'podsecuritypolicies'
+ verbs:
+ - 'use'
+ resourceNames:
+ - {{ include "postgresql.v1.chart.fullname" . }}
+ {{- end }}
+ {{- if .Values.rbac.rules }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.rbac.rules "context" $ ) | nindent 2 }}
+ {{- end }}
+# yamllint enable rule:indentation
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/rolebinding.yaml b/charts/semaphore/charts/postgresql/templates/rolebinding.yaml
new file mode 100644
index 0000000..974080a
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/rolebinding.yaml
@@ -0,0 +1,24 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if .Values.rbac.create }}
+kind: RoleBinding
+apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
+metadata:
+ name: {{ include "postgresql.v1.chart.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+roleRef:
+ kind: Role
+ name: {{ include "postgresql.v1.chart.fullname" . }}
+ apiGroup: rbac.authorization.k8s.io
+subjects:
+ - kind: ServiceAccount
+ name: {{ include "postgresql.v1.serviceAccountName" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/secrets.yaml b/charts/semaphore/charts/postgresql/templates/secrets.yaml
new file mode 100644
index 0000000..82dfdd4
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/secrets.yaml
@@ -0,0 +1,120 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- $host := include "postgresql.v1.primary.fullname" . }}
+{{- $port := include "postgresql.v1.service.port" . }}
+{{- $customUser := include "postgresql.v1.username" . }}
+{{- $postgresPassword := (ternary (coalesce .Values.global.postgresql.auth.password .Values.auth.password .Values.global.postgresql.auth.postgresPassword .Values.auth.postgresPassword) (coalesce .Values.global.postgresql.auth.postgresPassword .Values.auth.postgresPassword) (or (empty $customUser) (eq $customUser "postgres"))) }}
+{{- if (not $postgresPassword) }}
+{{- $postgresPassword = include "common.secrets.lookup" (dict "secret" (include "postgresql.v1.secretName" .) "key" (coalesce .Values.global.postgresql.auth.secretKeys.adminPasswordKey .Values.auth.secretKeys.adminPasswordKey) "defaultValue" (ternary (coalesce .Values.global.postgresql.auth.password .Values.auth.password .Values.global.postgresql.auth.postgresPassword .Values.auth.postgresPassword) (coalesce .Values.global.postgresql.auth.postgresPassword .Values.auth.postgresPassword) (or (empty $customUser) (eq $customUser "postgres"))) "context" $) | trimAll "\"" | b64dec }}
+{{- end }}
+{{- if and (not $postgresPassword) .Values.auth.enablePostgresUser }}
+{{- $postgresPassword = randAlphaNum 10 }}
+{{- end }}
+{{- $replicationPassword := "" }}
+{{- if eq .Values.architecture "replication" }}
+{{- $replicationPassword = include "common.secrets.passwords.manage" (dict "secret" (include "postgresql.v1.secretName" .) "key" (coalesce .Values.global.postgresql.auth.secretKeys.replicationPasswordKey .Values.auth.secretKeys.replicationPasswordKey) "providedValues" (list "auth.replicationPassword") "honorProvidedValues" true "context" $) | trimAll "\"" | b64dec }}
+{{- end }}
+{{- $ldapPassword := "" }}
+{{- if and .Values.ldap.enabled (or .Values.ldap.bind_password .Values.ldap.bindpw) }}
+{{- $ldapPassword = coalesce .Values.ldap.bind_password .Values.ldap.bindpw }}
+{{- end }}
+{{- $password := "" }}
+{{- if and (not (empty $customUser)) (ne $customUser "postgres") }}
+{{- $password = include "common.secrets.passwords.manage" (dict "secret" (include "postgresql.v1.secretName" .) "key" (coalesce .Values.global.postgresql.auth.secretKeys.userPasswordKey .Values.auth.secretKeys.userPasswordKey) "providedValues" (list "global.postgresql.auth.password" "auth.password") "honorProvidedValues" true "context" $) | trimAll "\"" | b64dec }}
+{{- end }}
+{{- $database := include "postgresql.v1.database" . }}
+{{- if (include "postgresql.v1.createSecret" .) }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ include "postgresql.v1.chart.fullname" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ {{- if or .Values.secretAnnotations .Values.commonAnnotations }}
+ annotations:
+ {{- if .Values.secretAnnotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.secretAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+ {{- if .Values.commonAnnotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+ {{- end }}
+type: Opaque
+data:
+ {{- if $postgresPassword }}
+ postgres-password: {{ $postgresPassword | b64enc | quote }}
+ {{- end }}
+ {{- if $password }}
+ password: {{ $password | b64enc | quote }}
+ {{- end }}
+ {{- if $replicationPassword }}
+ replication-password: {{ $replicationPassword | b64enc | quote }}
+ {{- end }}
+ # We don't auto-generate LDAP password when it's not provided as we do for other passwords
+ {{- if and .Values.ldap.enabled (or .Values.ldap.bind_password .Values.ldap.bindpw) }}
+ ldap-password: {{ $ldapPassword | b64enc | quote }}
+ {{- end }}
+{{- end }}
+{{- if .Values.serviceBindings.enabled }}
+{{- if $postgresPassword }}
+---
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ include "postgresql.v1.chart.fullname" . }}-svcbind-postgres
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ {{- if or .Values.secretAnnotations .Values.commonAnnotations }}
+ annotations:
+ {{- if .Values.secretAnnotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.secretAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+ {{- if .Values.commonAnnotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+ {{- end }}
+type: servicebinding.io/postgresql
+data:
+ provider: {{ print "bitnami" | b64enc | quote }}
+ type: {{ print "postgresql" | b64enc | quote }}
+ host: {{ $host | b64enc | quote }}
+ port: {{ $port | b64enc | quote }}
+ username: {{ print "postgres" | b64enc | quote }}
+ database: {{ print "postgres" | b64enc | quote }}
+ password: {{ $postgresPassword | b64enc | quote }}
+ uri: {{ printf "postgresql://postgres:%s@%s:%s/postgres" $postgresPassword $host $port | b64enc | quote }}
+{{- end }}
+{{- if $password }}
+---
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ include "postgresql.v1.chart.fullname" . }}-svcbind-custom-user
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ {{- if or .Values.secretAnnotations .Values.commonAnnotations }}
+ annotations:
+ {{- if .Values.secretAnnotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.secretAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+ {{- if .Values.commonAnnotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+ {{- end }}
+type: servicebinding.io/postgresql
+data:
+ provider: {{ print "bitnami" | b64enc | quote }}
+ type: {{ print "postgresql" | b64enc | quote }}
+ host: {{ $host | b64enc | quote }}
+ port: {{ $port | b64enc | quote }}
+ username: {{ $customUser | b64enc | quote }}
+ password: {{ $password | b64enc | quote }}
+ {{- if $database }}
+ database: {{ $database | b64enc | quote }}
+ {{- end }}
+ uri: {{ printf "postgresql://%s:%s@%s:%s/%s" $customUser $password $host $port $database | b64enc | quote }}
+{{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/serviceaccount.yaml b/charts/semaphore/charts/postgresql/templates/serviceaccount.yaml
new file mode 100644
index 0000000..3a0ccf0
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/serviceaccount.yaml
@@ -0,0 +1,18 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if .Values.serviceAccount.create }}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ include "postgresql.v1.serviceAccountName" . }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
+ {{- end }}
+automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/tls-secrets.yaml b/charts/semaphore/charts/postgresql/templates/tls-secrets.yaml
new file mode 100644
index 0000000..350c86e
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/tls-secrets.yaml
@@ -0,0 +1,30 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if (include "postgresql.v1.createTlsSecret" . ) }}
+{{- $secretName := printf "%s-crt" (include "postgresql.v1.chart.fullname" .) }}
+{{- $ca := genCA "postgresql-ca" 365 }}
+{{- $fullname := include "postgresql.v1.chart.fullname" . }}
+{{- $releaseNamespace := include "common.names.namespace" . }}
+{{- $clusterDomain := .Values.clusterDomain }}
+{{- $primaryHeadlessServiceName := include "postgresql.v1.primary.svc.headless" . }}
+{{- $readHeadlessServiceName := include "postgresql.v1.readReplica.svc.headless" . }}
+{{- $altNames := list (printf "*.%s.%s.svc.%s" $fullname $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $fullname $releaseNamespace $clusterDomain) (printf "*.%s.%s.svc.%s" $primaryHeadlessServiceName $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $primaryHeadlessServiceName $releaseNamespace $clusterDomain) (printf "*.%s.%s.svc.%s" $readHeadlessServiceName $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $readHeadlessServiceName $releaseNamespace $clusterDomain) $fullname }}
+{{- $cert := genSignedCert $fullname nil $altNames 365 $ca }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ $secretName }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ {{- if .Values.commonAnnotations }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+type: kubernetes.io/tls
+data:
+ tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" $) }}
+ tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }}
+ ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/update-password/job.yaml b/charts/semaphore/charts/postgresql/templates/update-password/job.yaml
new file mode 100644
index 0000000..09eee61
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/update-password/job.yaml
@@ -0,0 +1,239 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if .Values.passwordUpdateJob.enabled }}
+apiVersion: batch/v1
+kind: Job
+metadata:
+ name: {{ printf "%s-password-update" (include "postgresql.v1.chart.fullname" .) | trunc 63 | trimSuffix "-" }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: postgresql
+ app.kubernetes.io/component: update-job
+ {{- $defaultAnnotations := dict "helm.sh/hook" "pre-upgrade" "helm.sh/hook-delete-policy" "hook-succeeded" }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.passwordUpdateJob.annotations .Values.commonAnnotations $defaultAnnotations ) "context" . ) }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
+spec:
+ backoffLimit: {{ .Values.passwordUpdateJob.backoffLimit }}
+ template:
+ metadata:
+ {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.passwordUpdateJob.podLabels .Values.commonLabels ) "context" . ) }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
+ app.kubernetes.io/part-of: postgresql
+ app.kubernetes.io/component: update-job
+ {{- if .Values.passwordUpdateJob.podAnnotations }}
+ annotations: {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.podAnnotations "context" $) | nindent 8 }}
+ {{- end }}
+ spec:
+ {{- include "postgresql.v1.imagePullSecrets" . | nindent 6 }}
+ restartPolicy: OnFailure
+ {{- if .Values.passwordUpdateJob.podSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.passwordUpdateJob.podSecurityContext "context" $) | nindent 8 }}
+ {{- end }}
+ automountServiceAccountToken: {{ .Values.passwordUpdateJob.automountServiceAccountToken }}
+ {{- if .Values.passwordUpdateJob.hostAliases }}
+ hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.hostAliases "context" $) | nindent 8 }}
+ {{- end }}
+ initContainers:
+ {{- if .Values.passwordUpdateJob.initContainers }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.initContainers "context" $) | nindent 8 }}
+ {{- end }}
+ containers:
+ - name: update-credentials
+ image: {{ template "postgresql.v1.image" . }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ {{- if .Values.passwordUpdateJob.command }}
+ command: {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.command "context" $) | nindent 12 }}
+ {{- else }}
+ command:
+ - /bin/bash
+ - -ec
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.args }}
+ args: {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.args "context" $) | nindent 12 }}
+ {{- else }}
+ args:
+ - |
+ {{- $customUser := include "postgresql.v1.username" . }}
+ {{- $customDatabase := include "postgresql.v1.database" . | default "postgres" }}
+ {{- if .Values.auth.usePasswordFiles }}
+ # We need to load all the secret env vars to the system
+ for file in $(find /bitnami/postgresql/secrets -type f); do
+ env_var_name="$(basename $file)"
+ echo "Exporting $env_var_name"
+ export $env_var_name="$(< $file)"
+ done
+ {{- end }}
+
+ . /opt/bitnami/scripts/postgresql-env.sh
+ . /opt/bitnami/scripts/libpostgresql.sh
+ . /opt/bitnami/scripts/liblog.sh
+
+ primary_host={{ include "postgresql.v1.primary.fullname" . }}-0.{{ include "postgresql.v1.primary.svc.headless" . }}
+ info "Starting password update job"
+ {{- if .Values.auth.enablePostgresUser }}
+ if [[ -f /job-status/postgres-password-changed ]]; then
+ info "Postgres password already updated. Skipping"
+ else
+ info "Updating postgres password"
+ echo "ALTER USER postgres WITH PASSWORD '$POSTGRESQL_NEW_POSTGRES_PASSWORD';" | postgresql_remote_execute $primary_host {{ .Values.containerPorts.postgresql }} "" postgres $POSTGRESQL_PREVIOUS_POSTGRES_PASSWORD
+ touch /job-status/postgres-password-changed
+ info "Postgres password successfully updated"
+ fi
+ {{- end }}
+ {{- if and (not (empty $customUser)) (ne $customUser "postgres") }}
+ if [[ -f /job-status/password-changed ]]; then
+ info "User password already updated. Skipping"
+ else
+ info "Updating user password"
+ echo "ALTER USER {{ $customUser }} WITH PASSWORD '$POSTGRESQL_NEW_PASSWORD';" | postgresql_remote_execute $primary_host {{ .Values.containerPorts.postgresql }} "{{ $customDatabase }}" $POSTGRESQL_USER $POSTGRESQL_PREVIOUS_PASSWORD
+ touch /job-status/password-changed
+ info "User password successfully updated"
+ fi
+ {{- end }}
+ {{- if or (eq .Values.architecture "replication") .Values.primary.standby.enabled }}
+ if [[ -f /job-status/replication-password-changed ]]; then
+ info "Replication password already updated. Skipping"
+ else
+ info "Updating replication password"
+ echo "ALTER USER $POSTGRESQL_REPLICATION_USER WITH PASSWORD '$POSTGRESQL_NEW_REPLICATION_PASSWORD';" | postgresql_remote_execute $primary_host {{ .Values.containerPorts.postgresql }} "{{ $customDatabase }}" $POSTGRESQL_REPLICATION_USER $POSTGRESQL_PREVIOUS_REPLICATION_PASSWORD
+ touch /job-status/replication-password-changed
+ info "Replication password successfully updated"
+ fi
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.extraCommands }}
+ info "Running extra commmands"
+ {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.extraCommands "context" $) | nindent 14 }}
+ {{- end }}
+ info "Password update job finished successfully"
+ {{- end }}
+ env:
+ - name: BITNAMI_DEBUG
+ value: {{ ternary "true" "false" .Values.image.debug | quote }}
+ {{- if not .Values.auth.usePasswordFiles }}
+ - name: POSTGRESQL_PREVIOUS_POSTGRES_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "postgresql.v1.update-job.previousSecretName" . }}
+ key: {{ include "postgresql.v1.adminPasswordKey" . }}
+ - name: POSTGRESQL_NEW_POSTGRES_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "postgresql.v1.update-job.newSecretName" . }}
+ key: {{ include "postgresql.v1.adminPasswordKey" . }}
+ {{- end }}
+ {{- if include "common.fips.enabled" . }}
+ - name: OPENSSL_FIPS
+ value: {{ include "common.fips.config" (dict "tech" "openssl" "fips" .Values.passwordUpdateJob.fips "global" .Values.global) | quote }}
+ {{- end }}
+ {{- if not (empty .Values.auth.username) }}
+ - name: POSTGRESQL_USER
+ value: {{ .Values.auth.username | quote }}
+ {{- if not .Values.auth.usePasswordFiles }}
+ - name: POSTGRESQL_PREVIOUS_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "postgresql.v1.update-job.previousSecretName" . }}
+ key: {{ include "postgresql.v1.userPasswordKey" . }}
+ - name: POSTGRESQL_NEW_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "postgresql.v1.update-job.newSecretName" . }}
+ key: {{ include "postgresql.v1.userPasswordKey" . }}
+ {{- end }}
+ {{- end }}
+ {{- if eq .Values.architecture "replication" }}
+ - name: POSTGRESQL_REPLICATION_USER
+ value: {{ .Values.auth.replicationUsername | quote }}
+ {{- if not .Values.auth.usePasswordFiles }}
+ - name: POSTGRESQL_PREVIOUS_REPLICATION_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "postgresql.v1.update-job.previousSecretName" . }}
+ key: {{ include "postgresql.v1.replicationPasswordKey" . }}
+ - name: POSTGRESQL_NEW_REPLICATION_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "postgresql.v1.update-job.newSecretName" . }}
+ key: {{ include "postgresql.v1.replicationPasswordKey" . }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.extraEnvVars }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.extraEnvVars "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if or .Values.passwordUpdateJob.extraEnvVarsCM .Values.passwordUpdateJob.extraEnvVarsSecret }}
+ envFrom:
+ {{- if .Values.passwordUpdateJob.extraEnvVarsCM }}
+ - configMapRef:
+ name: {{ .Values.passwordUpdateJob.extraEnvVarsCM }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.extraEnvVarsSecret }}
+ - secretRef:
+ name: {{ .Values.passwordUpdateJob.extraEnvVarsSecret }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.containerSecurityContext.enabled }}
+ securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.passwordUpdateJob.containerSecurityContext "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.customLivenessProbe }}
+ livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.customLivenessProbe "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.customReadinessProbe }}
+ readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.customReadinessProbe "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.customStartupProbe }}
+ startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.customStartupProbe "context" $) | nindent 12 }}
+ {{- end }}
+ volumeMounts:
+ - name: empty-dir
+ mountPath: /job-status
+ subPath: job-dir
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: postgresql-previous-credentials
+ mountPath: /bitnami/postgresql/secrets/previous
+ - name: postgresql-new-credentials
+ mountPath: /bitnami/postgresql/secrets/new
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.extraVolumeMounts }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.extraVolumeMounts "context" $) | nindent 12 }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.resources }}
+ resources: {{- toYaml .Values.passwordUpdateJob.resources | nindent 12 }}
+ {{- else if ne .Values.passwordUpdateJob.resourcesPreset "none" }}
+ resources: {{- include "common.resources.preset" (dict "type" .Values.passwordUpdateJob.resourcesPreset) | nindent 12 }}
+ {{- end }}
+ volumes:
+ - name: empty-dir
+ emptyDir: {}
+ {{- if .Values.auth.usePasswordFiles }}
+ - name: postgresql-previous-credentials
+ secret:
+ secretName: {{ template "postgresql.v1.update-job.previousSecretName" . }}
+ items:
+ - key: {{ include "postgresql.v1.adminPasswordKey" . }}
+ path: POSTGRESQL_PREVIOUS_POSTGRES_PASSWORD
+ - key: {{ include "postgresql.v1.userPasswordKey" . }}
+ path: POSTGRESQL_PREVIOUS_PASSWORD
+ {{- if eq .Values.architecture "replication" }}
+ - key: {{ include "postgresql.v1.replicationPasswordKey" . }}
+ path: POSTGRESQL_PREVIOUS_REPLICATION_PASSWORD
+ {{- end }}
+ - name: postgresql-new-credentials
+ secret:
+ secretName: {{ template "postgresql.v1.update-job.newSecretName" . }}
+ items:
+ - key: {{ include "postgresql.v1.adminPasswordKey" . }}
+ path: POSTGRESQL_NEW_POSTGRES_PASSWORD
+ - key: {{ include "postgresql.v1.userPasswordKey" . }}
+ path: POSTGRESQL_NEW_PASSWORD
+ {{- if eq .Values.architecture "replication" }}
+ - key: {{ include "postgresql.v1.replicationPasswordKey" . }}
+ path: POSTGRESQL_NEW_REPLICATION_PASSWORD
+ {{- end }}
+ {{- end }}
+ {{- if .Values.passwordUpdateJob.extraVolumes }}
+ {{- include "common.tplvalues.render" (dict "value" .Values.passwordUpdateJob.extraVolumes "context" $) | nindent 8 }}
+ {{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/update-password/new-secret.yaml b/charts/semaphore/charts/postgresql/templates/update-password/new-secret.yaml
new file mode 100644
index 0000000..c02f281
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/update-password/new-secret.yaml
@@ -0,0 +1,32 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.passwordUpdateJob.enabled (include "postgresql.v1.createSecret" .) (not ( include "postgresql.v1.createPreviousSecret" . )) (not .Values.passwordUpdateJob.previousPasswords.existingSecret) }}
+{{- $customUser := include "postgresql.v1.username" . }}
+{{- $postgresPassword := (ternary (coalesce .Values.global.postgresql.auth.password .Values.auth.password .Values.global.postgresql.auth.postgresPassword .Values.auth.postgresPassword) (coalesce .Values.global.postgresql.auth.postgresPassword .Values.auth.postgresPassword) (or (empty $customUser) (eq $customUser "postgres"))) }}
+{{- $password := coalesce .Values.global.postgresql.auth.password .Values.auth.password }}
+{{- $replicationPassword := .Values.auth.replicationPassword }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ printf "%s-new-secret" (include "postgresql.v1.chart.fullname" .) | trunc 63 | trimSuffix "-" }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: postgresql
+ {{- $defaultAnnotations := dict "helm.sh/hook" "pre-upgrade" "helm.sh/hook-delete-policy" "hook-succeeded" }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonAnnotations $defaultAnnotations ) "context" . ) }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
+type: Opaque
+data:
+ {{- if .Values.auth.enablePostgresUser }}
+ postgres-password: {{ required "The new postgres password is required!" $postgresPassword | b64enc | quote }}
+ {{- end }}
+ {{- if and (not (empty $customUser)) (ne $customUser "postgres") }}
+ password: {{ required "The new user password is required!" $password | b64enc | quote }}
+ {{- end }}
+ {{- if or (eq .Values.architecture "replication") .Values.primary.standby.enabled }}
+ replication-password: {{ required "The new replication password is required!" $replicationPassword | b64enc | quote }}
+ {{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/templates/update-password/previous-secret.yaml b/charts/semaphore/charts/postgresql/templates/update-password/previous-secret.yaml
new file mode 100644
index 0000000..39087c4
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/templates/update-password/previous-secret.yaml
@@ -0,0 +1,32 @@
+{{- /*
+Copyright Broadcom, Inc. All Rights Reserved.
+SPDX-License-Identifier: APACHE-2.0
+*/}}
+
+{{- if and .Values.passwordUpdateJob.enabled (include "postgresql.v1.createPreviousSecret" .) }}
+{{- $customUser := include "postgresql.v1.username" . }}
+{{- $postgresPassword := .Values.passwordUpdateJob.previousPasswords.postgresPassword }}
+{{- $password := .Values.passwordUpdateJob.previousPasswords.password }}
+{{- $replicationPassword := .Values.passwordUpdateJob.previousPasswords.replicationPassword }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ printf "%s-previous-secret" (include "postgresql.v1.chart.fullname" .) | trunc 63 | trimSuffix "-" }}
+ namespace: {{ include "common.names.namespace" . | quote }}
+ labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
+ app.kubernetes.io/part-of: postgresql
+ {{- $defaultAnnotations := dict "helm.sh/hook" "pre-upgrade" "helm.sh/hook-delete-policy" "hook-succeeded" }}
+ {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonAnnotations $defaultAnnotations ) "context" . ) }}
+ annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
+type: Opaque
+data:
+ {{- if .Values.auth.enablePostgresUser }}
+ postgres-password: {{ required "The previous postgres password is required!" $postgresPassword | b64enc | quote }}
+ {{- end }}
+ {{- if and (not (empty $customUser)) (ne $customUser "postgres") }}
+ password: {{ required "The previous user password is required!" $password | b64enc | quote }}
+ {{- end }}
+ {{- if or (eq .Values.architecture "replication") .Values.primary.standby.enabled }}
+ replication-password: {{ required "The previous replication password is required!" $replicationPassword | b64enc | quote }}
+ {{- end }}
+{{- end }}
diff --git a/charts/semaphore/charts/postgresql/values.schema.json b/charts/semaphore/charts/postgresql/values.schema.json
new file mode 100644
index 0000000..fc41483
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/values.schema.json
@@ -0,0 +1,156 @@
+{
+ "$schema": "http://json-schema.org/schema#",
+ "type": "object",
+ "properties": {
+ "architecture": {
+ "type": "string",
+ "title": "PostgreSQL architecture",
+ "form": true,
+ "description": "Allowed values: `standalone` or `replication`"
+ },
+ "auth": {
+ "type": "object",
+ "title": "Authentication configuration",
+ "form": true,
+ "properties": {
+ "enablePostgresUser": {
+ "type": "boolean",
+ "title": "Enable \"postgres\" admin user",
+ "description": "Assign a password to the \"postgres\" admin user. Otherwise, remote access will be blocked for this user",
+ "form": true
+ },
+ "postgresPassword": {
+ "type": "string",
+ "title": "Password for the \"postgres\" admin user",
+ "description": "Defaults to a random 10-character alphanumeric string if not set",
+ "form": true
+ },
+ "database": {
+ "type": "string",
+ "title": "PostgreSQL custom database",
+ "description": "Name of the custom database to be created during the 1st initialization of PostgreSQL",
+ "form": true
+ },
+ "username": {
+ "type": "string",
+ "title": "PostgreSQL custom user",
+ "description": "Name of the custom user to be created during the 1st initialization of PostgreSQL. This user only has permissions on the PostgreSQL custom database",
+ "form": true
+ },
+ "password": {
+ "type": "string",
+ "title": "Password for the custom user to create",
+ "description": "Defaults to a random 10-character alphanumeric string if not set",
+ "form": true
+ },
+ "replicationUsername": {
+ "type": "string",
+ "title": "PostgreSQL replication user",
+ "description": "Name of user used to manage replication.",
+ "form": true,
+ "hidden": {
+ "value": "standalone",
+ "path": "architecture"
+ }
+ },
+ "replicationPassword": {
+ "type": "string",
+ "title": "Password for PostgreSQL replication user",
+ "description": "Defaults to a random 10-character alphanumeric string if not set",
+ "form": true,
+ "hidden": {
+ "value": "standalone",
+ "path": "architecture"
+ }
+ }
+ }
+ },
+ "persistence": {
+ "type": "object",
+ "properties": {
+ "size": {
+ "type": "string",
+ "title": "Persistent Volume Size",
+ "form": true,
+ "render": "slider",
+ "sliderMin": 1,
+ "sliderMax": 100,
+ "sliderUnit": "Gi"
+ }
+ }
+ },
+ "resources": {
+ "type": "object",
+ "title": "Required Resources",
+ "description": "Configure resource requests",
+ "form": true,
+ "properties": {
+ "requests": {
+ "type": "object",
+ "properties": {
+ "memory": {
+ "type": "string",
+ "form": true,
+ "render": "slider",
+ "title": "Memory Request",
+ "sliderMin": 10,
+ "sliderMax": 2048,
+ "sliderUnit": "Mi"
+ },
+ "cpu": {
+ "type": "string",
+ "form": true,
+ "render": "slider",
+ "title": "CPU Request",
+ "sliderMin": 10,
+ "sliderMax": 2000,
+ "sliderUnit": "m"
+ }
+ }
+ }
+ }
+ },
+ "replication": {
+ "type": "object",
+ "form": true,
+ "title": "Replication Details",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enable Replication",
+ "form": true
+ },
+ "readReplicas": {
+ "type": "integer",
+ "title": "read Replicas",
+ "form": true,
+ "hidden": {
+ "value": "standalone",
+ "path": "architecture"
+ }
+ }
+ }
+ },
+ "volumePermissions": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "form": true,
+ "title": "Enable Init Containers",
+ "description": "Change the owner of the persist volume mountpoint to RunAsUser:fsGroup"
+ }
+ }
+ },
+ "metrics": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Configure metrics exporter",
+ "form": true
+ }
+ }
+ }
+ }
+}
diff --git a/charts/semaphore/charts/postgresql/values.yaml b/charts/semaphore/charts/postgresql/values.yaml
new file mode 100644
index 0000000..043d0ea
--- /dev/null
+++ b/charts/semaphore/charts/postgresql/values.yaml
@@ -0,0 +1,1962 @@
+# Copyright Broadcom, Inc. All Rights Reserved.
+# SPDX-License-Identifier: APACHE-2.0
+
+## @section Global parameters
+## Please, note that this will override the parameters, including dependencies, configured to use the global value
+##
+global:
+ ## @param global.imageRegistry Global Docker image registry
+ ##
+ imageRegistry: ""
+ ## @param global.imagePullSecrets Global Docker registry secret names as an array
+ ## e.g.
+ ## imagePullSecrets:
+ ## - myRegistryKeySecretName
+ ##
+ imagePullSecrets: []
+ ## @param global.defaultStorageClass Global default StorageClass for Persistent Volume(s)
+## @param global.storageClass DEPRECATED: use global.defaultStorageClass instead
+ ##
+ defaultStorageClass: ""
+ storageClass: ""
+ ## Security parameters
+ ##
+ security:
+ ## @param global.security.allowInsecureImages Allows skipping image verification
+ allowInsecureImages: false
+ postgresql:
+ ## @param global.postgresql.fullnameOverride Full chart name (overrides `fullnameOverride`)
+ ## @param global.postgresql.auth.postgresPassword Password for the "postgres" admin user (overrides `auth.postgresPassword`)
+ ## @param global.postgresql.auth.username Name for a custom user to create (overrides `auth.username`)
+ ## @param global.postgresql.auth.password Password for the custom user to create (overrides `auth.password`)
+ ## @param global.postgresql.auth.database Name for a custom database to create (overrides `auth.database`)
+ ## @param global.postgresql.auth.existingSecret Name of existing secret to use for PostgreSQL credentials (overrides `auth.existingSecret`).
+ ## @param global.postgresql.auth.secretKeys.adminPasswordKey Name of key in existing secret to use for PostgreSQL credentials (overrides `auth.secretKeys.adminPasswordKey`). Only used when `global.postgresql.auth.existingSecret` is set.
+ ## @param global.postgresql.auth.secretKeys.userPasswordKey Name of key in existing secret to use for PostgreSQL credentials (overrides `auth.secretKeys.userPasswordKey`). Only used when `global.postgresql.auth.existingSecret` is set.
+ ## @param global.postgresql.auth.secretKeys.replicationPasswordKey Name of key in existing secret to use for PostgreSQL credentials (overrides `auth.secretKeys.replicationPasswordKey`). Only used when `global.postgresql.auth.existingSecret` is set.
+ ##
+ fullnameOverride: ""
+ auth:
+ postgresPassword: ""
+ username: ""
+ password: ""
+ database: ""
+ existingSecret: ""
+ secretKeys:
+ adminPasswordKey: ""
+ userPasswordKey: ""
+ replicationPasswordKey: ""
+ ## @param global.postgresql.service.ports.postgresql PostgreSQL service port (overrides `service.ports.postgresql`)
+ ##
+ service:
+ ports:
+ postgresql: ""
+ ## Compatibility adaptations for Kubernetes platforms
+ ##
+ compatibility:
+ ## Compatibility adaptations for Openshift
+ ##
+ openshift:
+ ## @param global.compatibility.openshift.adaptSecurityContext Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation)
+ ##
+ adaptSecurityContext: auto
+ ## @param global.defaultFips Default value for the FIPS configuration (allowed values: '', restricted, relaxed, off). Can be overriden by the 'fips' object
+ ## Configure FIPS mode: '', 'restricted', 'relaxed', 'off'
+ ##
+ defaultFips: restricted
+
+## @section Common parameters
+##
+
+## @param kubeVersion Override Kubernetes version
+##
+kubeVersion: ""
+## @param nameOverride String to partially override common.names.fullname template (will maintain the release name)
+##
+nameOverride: ""
+## @param fullnameOverride String to fully override common.names.fullname template
+##
+fullnameOverride: ""
+## @param namespaceOverride String to fully override common.names.namespace
+##
+namespaceOverride: ""
+## @param clusterDomain Kubernetes Cluster Domain
+##
+clusterDomain: cluster.local
+## @param extraDeploy Array of extra objects to deploy with the release (evaluated as a template)
+##
+extraDeploy: []
+## @param commonLabels Add labels to all the deployed resources
+##
+commonLabels: {}
+## @param commonAnnotations Add annotations to all the deployed resources
+##
+commonAnnotations: {}
+## @param secretAnnotations Add annotations to the secrets
+##
+secretAnnotations: {}
+## Enable diagnostic mode in the statefulset
+##
+diagnosticMode:
+ ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
+ ##
+ enabled: false
+ ## @param diagnosticMode.command Command to override all containers in the statefulset
+ ##
+ command:
+ - sleep
+ ## @param diagnosticMode.args Args to override all containers in the statefulset
+ ##
+ args:
+ - infinity
+## @section PostgreSQL common parameters
+##
+
+## Bitnami PostgreSQL image version
+## ref: https://hub.docker.com/r/bitnami/postgresql/tags/
+## @param image.registry [default: REGISTRY_NAME] PostgreSQL image registry
+## @param image.repository [default: REPOSITORY_NAME/postgresql] PostgreSQL image repository
+## @skip image.tag PostgreSQL image tag (immutable tags are recommended)
+## @param image.digest PostgreSQL image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
+## @param image.pullPolicy PostgreSQL image pull policy
+## @param image.pullSecrets Specify image pull secrets
+## @param image.debug Specify if debug values should be set
+##
+image:
+ registry: registry-1.docker.io
+ repository: bitnami/postgresql
+ tag: latest
+ digest: ""
+ ## Specify a imagePullPolicy
+ ## ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images
+ ##
+ pullPolicy: IfNotPresent
+ ## Optionally specify an array of imagePullSecrets.
+ ## Secrets must be manually created in the namespace.
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
+ ## Example:
+ ## pullSecrets:
+ ## - myRegistryKeySecretName
+ ##
+ pullSecrets: []
+ ## Set to true if you would like to see extra information on logs
+ ##
+ debug: false
+## Authentication parameters
+## ref: https://github.com/bitnami/containers/tree/main/bitnami/postgresql#setting-the-root-password-on-first-run
+## ref: https://github.com/bitnami/containers/tree/main/bitnami/postgresql#creating-a-database-on-first-run
+## ref: https://github.com/bitnami/containers/tree/main/bitnami/postgresql#creating-a-database-user-on-first-run
+##
+auth:
+ ## @param auth.enablePostgresUser Assign a password to the "postgres" admin user. Otherwise, remote access will be blocked for this user
+ ##
+ enablePostgresUser: true
+ ## @param auth.postgresPassword Password for the "postgres" admin user. Ignored if `auth.existingSecret` is provided
+ ##
+ postgresPassword: ""
+ ## @param auth.username Name for a custom user to create
+ ##
+ username: ""
+ ## @param auth.password Password for the custom user to create. Ignored if `auth.existingSecret` is provided
+ ##
+ password: ""
+ ## @param auth.database Name for a custom database to create
+ ##
+ database: ""
+ ## @param auth.replicationUsername Name of the replication user
+ ##
+ replicationUsername: repl_user
+ ## @param auth.replicationPassword Password for the replication user. Ignored if `auth.existingSecret` is provided
+ ##
+ replicationPassword: ""
+ ## @param auth.existingSecret Name of existing secret to use for PostgreSQL credentials. `auth.postgresPassword`, `auth.password`, and `auth.replicationPassword` will be ignored and picked up from this secret. The secret might also contains the key `ldap-password` if LDAP is enabled. `ldap.bind_password` will be ignored and picked from this secret in this case.
+ ##
+ existingSecret: ""
+ ## @param auth.secretKeys.adminPasswordKey Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set.
+ ## @param auth.secretKeys.userPasswordKey Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set.
+ ## @param auth.secretKeys.replicationPasswordKey Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set.
+ ##
+ secretKeys:
+ adminPasswordKey: postgres-password
+ userPasswordKey: password
+ replicationPasswordKey: replication-password
+ ## @param auth.usePasswordFiles Mount credentials as a files instead of using an environment variable
+ ##
+ usePasswordFiles: true
+## @param architecture PostgreSQL architecture (`standalone` or `replication`)
+##
+architecture: standalone
+## Replication configuration
+## Ignored if `architecture` is `standalone`
+##
+replication:
+ ## @param replication.synchronousCommit Set synchronous commit mode. Allowed values: `on`, `remote_apply`, `remote_write`, `local` and `off`
+ ## @param replication.numSynchronousReplicas Number of replicas that will have synchronous replication. Note: Cannot be greater than `readReplicas.replicaCount`.
+ ## ref: https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-SYNCHRONOUS-COMMIT
+ ##
+ synchronousCommit: "off"
+ numSynchronousReplicas: 0
+ ## @param replication.applicationName Cluster application name. Useful for advanced replication settings
+ ##
+ applicationName: my_application
+## @param containerPorts.postgresql PostgreSQL container port
+##
+containerPorts:
+ postgresql: 5432
+## Audit settings
+## https://github.com/bitnami/containers/tree/main/bitnami/postgresql#auditing
+## @param audit.logHostname Log client hostnames
+## @param audit.logConnections Add client log-in operations to the log file
+## @param audit.logDisconnections Add client log-outs operations to the log file
+## @param audit.pgAuditLog Add operations to log using the pgAudit extension
+## @param audit.pgAuditLogCatalog Log catalog using pgAudit
+## @param audit.clientMinMessages Message log level to share with the user
+## @param audit.logLinePrefix Template for log line prefix (default if not set)
+## @param audit.logTimezone Timezone for the log timestamps
+##
+audit:
+ logHostname: false
+ logConnections: false
+ logDisconnections: false
+ pgAuditLog: ""
+ pgAuditLogCatalog: "off"
+ clientMinMessages: error
+ logLinePrefix: ""
+ logTimezone: ""
+## LDAP configuration
+## @param ldap.enabled Enable LDAP support
+## @param ldap.server IP address or name of the LDAP server.
+## @param ldap.port Port number on the LDAP server to connect to
+## @param ldap.prefix String to prepend to the user name when forming the DN to bind
+## @param ldap.suffix String to append to the user name when forming the DN to bind
+## DEPRECATED ldap.baseDN It will removed in a future, please use 'ldap.basedn' instead
+## DEPRECATED ldap.bindDN It will removed in a future, please use 'ldap.binddn' instead
+## DEPRECATED ldap.bind_password It will removed in a future, please use 'ldap.bindpw' instead
+## @param ldap.basedn Root DN to begin the search for the user in
+## @param ldap.binddn DN of user to bind to LDAP
+## @param ldap.bindpw Password for the user to bind to LDAP
+## DEPRECATED ldap.search_attr It will removed in a future, please use 'ldap.searchAttribute' instead
+## DEPRECATED ldap.search_filter It will removed in a future, please use 'ldap.searchFilter' instead
+## @param ldap.searchAttribute Attribute to match against the user name in the search
+## @param ldap.searchFilter The search filter to use when doing search+bind authentication
+## @param ldap.scheme Set to `ldaps` to use LDAPS
+## DEPRECATED ldap.tls as string is deprecated, please use 'ldap.tls.enabled' instead
+## @param ldap.tls.enabled Se to true to enable TLS encryption
+##
+ldap:
+ enabled: false
+ server: ""
+ port: ""
+ prefix: ""
+ suffix: ""
+ basedn: ""
+ binddn: ""
+ bindpw: ""
+ searchAttribute: ""
+ searchFilter: ""
+ scheme: ""
+ tls:
+ enabled: false
+ ## @param ldap.uri LDAP URL beginning in the form `ldap[s]://host[:port]/basedn`. If provided, all the other LDAP parameters will be ignored.
+ ## Ref: https://www.postgresql.org/docs/current/auth-ldap.html
+ ##
+ uri: ""
+## @param postgresqlDataDir PostgreSQL data dir folder
+##
+postgresqlDataDir: /bitnami/postgresql/data
+## @param postgresqlSharedPreloadLibraries Shared preload libraries (comma-separated list)
+##
+postgresqlSharedPreloadLibraries: "pgaudit"
+## Start PostgreSQL pod(s) without limitations on shm memory.
+## By default docker and containerd (and possibly other container runtimes) limit `/dev/shm` to `64M`
+## ref: https://github.com/docker-library/postgres/issues/416
+## ref: https://github.com/containerd/containerd/issues/3654
+##
+shmVolume:
+ ## @param shmVolume.enabled Enable emptyDir volume for /dev/shm for PostgreSQL pod(s)
+ ##
+ enabled: true
+ ## @param shmVolume.sizeLimit Set this to enable a size limit on the shm tmpfs
+ ## Note: the size of the tmpfs counts against container's memory limit
+ ## e.g:
+ ## sizeLimit: 1Gi
+ ##
+ sizeLimit: ""
+## TLS configuration
+##
+tls:
+ ## @param tls.enabled Enable TLS traffic support
+ ##
+ enabled: false
+ ## @param tls.autoGenerated Generate automatically self-signed TLS certificates
+ ##
+ autoGenerated: false
+ ## @param tls.preferServerCiphers Whether to use the server's TLS cipher preferences rather than the client's
+ ##
+ preferServerCiphers: true
+ ## @param tls.certificatesSecret Name of an existing secret that contains the certificates
+ ##
+ certificatesSecret: ""
+ ## @param tls.certFilename Certificate filename
+ ##
+ certFilename: ""
+ ## @param tls.certKeyFilename Certificate key filename
+ ##
+ certKeyFilename: ""
+ ## @param tls.certCAFilename CA Certificate filename
+ ## If provided, PostgreSQL will authenticate TLS/SSL clients by requesting them a certificate
+ ## ref: https://www.postgresql.org/docs/9.6/auth-methods.html
+ ##
+ certCAFilename: ""
+ ## @param tls.crlFilename File containing a Certificate Revocation List
+ ##
+ crlFilename: ""
+## @section PostgreSQL Primary parameters
+##
+primary:
+ ## @param primary.name Name of the primary database (eg primary, master, leader, ...)
+ ##
+ name: primary
+ ## @param primary.configuration PostgreSQL Primary main configuration to be injected as ConfigMap
+ ## ref: https://www.postgresql.org/docs/current/static/runtime-config.html
+ ##
+ configuration: ""
+ ## @param primary.pgHbaConfiguration PostgreSQL Primary client authentication configuration
+ ## ref: https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html
+ ## e.g:#
+ ## pgHbaConfiguration: |-
+ ## local all all trust
+ ## host all all localhost trust
+ ## host mydatabase mysuser 192.168.0.0/24 md5
+ ##
+ pgHbaConfiguration: ""
+ ## @param primary.existingConfigmap Name of an existing ConfigMap with PostgreSQL Primary configuration
+ ## NOTE: `primary.configuration` and `primary.pgHbaConfiguration` will be ignored
+ ##
+ existingConfigmap: ""
+ ## @param primary.extendedConfiguration Extended PostgreSQL Primary configuration (appended to main or default configuration)
+ ## ref: https://github.com/bitnami/containers/tree/main/bitnami/postgresql#allow-settings-to-be-loaded-from-files-other-than-the-default-postgresqlconf
+ ##
+ extendedConfiguration: ""
+ ## @param primary.existingExtendedConfigmap Name of an existing ConfigMap with PostgreSQL Primary extended configuration
+ ## NOTE: `primary.extendedConfiguration` will be ignored
+ ##
+ existingExtendedConfigmap: ""
+ ## Initdb configuration
+ ## ref: https://github.com/bitnami/containers/tree/main/bitnami/postgresql#specifying-initdb-arguments
+ ##
+ initdb:
+ ## @param primary.initdb.args PostgreSQL initdb extra arguments
+ ##
+ args: ""
+ ## @param primary.initdb.postgresqlWalDir Specify a custom location for the PostgreSQL transaction log
+ ##
+ postgresqlWalDir: ""
+ ## @param primary.initdb.scripts Dictionary of initdb scripts
+ ## Specify dictionary of scripts to be run at first boot
+ ## e.g:
+ ## scripts:
+ ## my_init_script.sh: |
+ ## #!/bin/sh
+ ## echo "Do something."
+ ##
+ scripts: {}
+ ## @param primary.initdb.scriptsConfigMap ConfigMap with scripts to be run at first boot
+ ## NOTE: This will override `primary.initdb.scripts`
+ ##
+ scriptsConfigMap: ""
+ ## @param primary.initdb.scriptsSecret Secret with scripts to be run at first boot (in case it contains sensitive information)
+ ## NOTE: This can work along `primary.initdb.scripts` or `primary.initdb.scriptsConfigMap`
+ ##
+ scriptsSecret: ""
+ ## @param primary.initdb.user Specify the PostgreSQL username to execute the initdb scripts
+ ##
+ user: ""
+ ## @param primary.initdb.password Specify the PostgreSQL password to execute the initdb scripts
+ ##
+ password: ""
+ ## Pre-init configuration
+ ## ref: https://github.com/bitnami/containers/tree/main/bitnami/postgresql/#on-container-start
+ preInitDb:
+ ## @param primary.preInitDb.scripts Dictionary of pre-init scripts
+ ## Specify dictionary of shell scripts to be run before db boot
+ ## e.g:
+ ## scripts:
+ ## my_pre_init_script.sh: |
+ ## #!/bin/sh
+ ## echo "Do something."
+ scripts: {}
+ ## @param primary.preInitDb.scriptsConfigMap ConfigMap with pre-init scripts to be run
+ ## NOTE: This will override `primary.preInitDb.scripts`
+ scriptsConfigMap: ""
+ ## @param primary.preInitDb.scriptsSecret Secret with pre-init scripts to be run
+ ## NOTE: This can work along `primary.preInitDb.scripts` or `primary.preInitDb.scriptsConfigMap`
+ scriptsSecret: ""
+ ## Configure current cluster's primary server to be the standby server in other cluster.
+ ## This will allow cross cluster replication and provide cross cluster high availability.
+ ## You will need to configure pgHbaConfiguration if you want to enable this feature with local cluster replication enabled.
+ ## @param primary.standby.enabled Whether to enable current cluster's primary as standby server of another cluster or not
+ ## @param primary.standby.primaryHost The Host of replication primary in the other cluster
+ ## @param primary.standby.primaryPort The Port of replication primary in the other cluster
+ ##
+ standby:
+ enabled: false
+ primaryHost: ""
+ primaryPort: ""
+ ## @param primary.extraEnvVars Array with extra environment variables to add to PostgreSQL Primary nodes
+ ## e.g:
+ ## extraEnvVars:
+ ## - name: FOO
+ ## value: "bar"
+ ##
+ extraEnvVars: []
+ ## @param primary.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for PostgreSQL Primary nodes
+ ##
+ extraEnvVarsCM: ""
+ ## @param primary.extraEnvVarsSecret Name of existing Secret containing extra env vars for PostgreSQL Primary nodes
+ ##
+ extraEnvVarsSecret: ""
+ ## @param primary.command Override default container command (useful when using custom images)
+ ##
+ command: []
+ ## @param primary.args Override default container args (useful when using custom images)
+ ##
+ args: []
+ ## Configure extra options for PostgreSQL Primary containers' liveness, readiness and startup probes
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
+ ## @param primary.livenessProbe.enabled Enable livenessProbe on PostgreSQL Primary containers
+ ## @param primary.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
+ ## @param primary.livenessProbe.periodSeconds Period seconds for livenessProbe
+ ## @param primary.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
+ ## @param primary.livenessProbe.failureThreshold Failure threshold for livenessProbe
+ ## @param primary.livenessProbe.successThreshold Success threshold for livenessProbe
+ ##
+ livenessProbe:
+ enabled: true
+ initialDelaySeconds: 30
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+ ## @param primary.readinessProbe.enabled Enable readinessProbe on PostgreSQL Primary containers
+ ## @param primary.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
+ ## @param primary.readinessProbe.periodSeconds Period seconds for readinessProbe
+ ## @param primary.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
+ ## @param primary.readinessProbe.failureThreshold Failure threshold for readinessProbe
+ ## @param primary.readinessProbe.successThreshold Success threshold for readinessProbe
+ ##
+ readinessProbe:
+ enabled: true
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+ ## @param primary.startupProbe.enabled Enable startupProbe on PostgreSQL Primary containers
+ ## @param primary.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
+ ## @param primary.startupProbe.periodSeconds Period seconds for startupProbe
+ ## @param primary.startupProbe.timeoutSeconds Timeout seconds for startupProbe
+ ## @param primary.startupProbe.failureThreshold Failure threshold for startupProbe
+ ## @param primary.startupProbe.successThreshold Success threshold for startupProbe
+ ##
+ startupProbe:
+ enabled: false
+ initialDelaySeconds: 30
+ periodSeconds: 10
+ timeoutSeconds: 1
+ failureThreshold: 15
+ successThreshold: 1
+ ## @param primary.customLivenessProbe Custom livenessProbe that overrides the default one
+ ##
+ customLivenessProbe: {}
+ ## @param primary.customReadinessProbe Custom readinessProbe that overrides the default one
+ ##
+ customReadinessProbe: {}
+ ## @param primary.customStartupProbe Custom startupProbe that overrides the default one
+ ##
+ customStartupProbe: {}
+ ## @param primary.lifecycleHooks for the PostgreSQL Primary container to automate configuration before or after startup
+ ##
+ lifecycleHooks: {}
+ ## PostgreSQL Primary resource requests and limits
+ ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ ## @param primary.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if primary.resources is set (primary.resources is recommended for production).
+ ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
+ ##
+ resourcesPreset: "nano"
+ ## @param primary.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
+ ## Example:
+ ## resources:
+ ## requests:
+ ## cpu: 2
+ ## memory: 512Mi
+ ## limits:
+ ## cpu: 3
+ ## memory: 1024Mi
+ ##
+ resources: {}
+ ## @param primary.fips.openssl Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used
+ ##
+ fips:
+ openssl: ""
+ ## Pod Security Context
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ ## @param primary.podSecurityContext.enabled Enable security context
+ ## @param primary.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
+ ## @param primary.podSecurityContext.sysctls Set kernel settings using the sysctl interface
+ ## @param primary.podSecurityContext.supplementalGroups Set filesystem extra groups
+ ## @param primary.podSecurityContext.fsGroup Group ID for the pod
+ ##
+ podSecurityContext:
+ enabled: true
+ fsGroupChangePolicy: Always
+ sysctls: []
+ supplementalGroups: []
+ fsGroup: 1001
+ ## Container Security Context
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ ## @param primary.containerSecurityContext.enabled Enabled containers' Security Context
+ ## @param primary.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
+ ## @param primary.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
+ ## @param primary.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
+ ## @param primary.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
+ ## @param primary.containerSecurityContext.privileged Set container's Security Context privileged
+ ## @param primary.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
+ ## @param primary.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
+ ## @param primary.containerSecurityContext.capabilities.drop List of capabilities to be dropped
+ ## @param primary.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
+ ##
+ containerSecurityContext:
+ enabled: true
+ seLinuxOptions: {}
+ runAsUser: 1001
+ runAsGroup: 1001
+ runAsNonRoot: true
+ privileged: false
+ readOnlyRootFilesystem: true
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop: ["ALL"]
+ seccompProfile:
+ type: "RuntimeDefault"
+ ## @param primary.automountServiceAccountToken Mount Service Account token in pod
+ ##
+ automountServiceAccountToken: false
+ ## @param primary.hostAliases PostgreSQL primary pods host aliases
+ ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
+ ##
+ hostAliases: []
+ ## @param primary.hostNetwork Specify if host network should be enabled for PostgreSQL pod (postgresql primary)
+ ##
+ hostNetwork: false
+ ## @param primary.hostIPC Specify if host IPC should be enabled for PostgreSQL pod (postgresql primary)
+ ##
+ hostIPC: false
+ ## @param primary.labels Map of labels to add to the statefulset (postgresql primary)
+ ##
+ labels: {}
+ ## @param primary.annotations Annotations for PostgreSQL primary pods
+ ##
+ annotations: {}
+ ## @param primary.podLabels Map of labels to add to the pods (postgresql primary)
+ ##
+ podLabels: {}
+ ## @param primary.podAnnotations Map of annotations to add to the pods (postgresql primary)
+ ##
+ podAnnotations: {}
+ ## @param primary.podAffinityPreset PostgreSQL primary pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
+ ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
+ ##
+ podAffinityPreset: ""
+ ## @param primary.podAntiAffinityPreset PostgreSQL primary pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
+ ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
+ ##
+ podAntiAffinityPreset: soft
+ ## PostgreSQL Primary node affinity preset
+ ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
+ ##
+ nodeAffinityPreset:
+ ## @param primary.nodeAffinityPreset.type PostgreSQL primary node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
+ ##
+ type: ""
+ ## @param primary.nodeAffinityPreset.key PostgreSQL primary node label key to match Ignored if `primary.affinity` is set.
+ ## E.g.
+ ## key: "kubernetes.io/e2e-az-name"
+ ##
+ key: ""
+ ## @param primary.nodeAffinityPreset.values PostgreSQL primary node label values to match. Ignored if `primary.affinity` is set.
+ ## E.g.
+ ## values:
+ ## - e2e-az1
+ ## - e2e-az2
+ ##
+ values: []
+ ## @param primary.affinity Affinity for PostgreSQL primary pods assignment
+ ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
+ ## Note: primary.podAffinityPreset, primary.podAntiAffinityPreset, and primary.nodeAffinityPreset will be ignored when it's set
+ ##
+ affinity: {}
+ ## @param primary.nodeSelector Node labels for PostgreSQL primary pods assignment
+ ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
+ ##
+ nodeSelector: {}
+ ## @param primary.tolerations Tolerations for PostgreSQL primary pods assignment
+ ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+ ##
+ tolerations: []
+ ## @param primary.topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template
+ ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods
+ ##
+ topologySpreadConstraints: []
+ ## @param primary.priorityClassName Priority Class to use for each pod (postgresql primary)
+ ##
+ priorityClassName: ""
+ ## @param primary.schedulerName Use an alternate scheduler, e.g. "stork".
+ ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
+ ##
+ schedulerName: ""
+ ## @param primary.terminationGracePeriodSeconds Seconds PostgreSQL primary pod needs to terminate gracefully
+ ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
+ ##
+ terminationGracePeriodSeconds: ""
+ ## @param primary.updateStrategy.type PostgreSQL Primary statefulset strategy type
+ ## @param primary.updateStrategy.rollingUpdate PostgreSQL Primary statefulset rolling update configuration parameters
+ ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
+ ##
+ updateStrategy:
+ type: RollingUpdate
+ rollingUpdate: {}
+ ## @param primary.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the PostgreSQL Primary container(s)
+ ##
+ extraVolumeMounts: []
+ ## @param primary.extraVolumes Optionally specify extra list of additional volumes for the PostgreSQL Primary pod(s)
+ ##
+ extraVolumes: []
+ ## @param primary.sidecars Add additional sidecar containers to the PostgreSQL Primary pod(s)
+ ## For example:
+ ## sidecars:
+ ## - name: your-image-name
+ ## image: your-image
+ ## imagePullPolicy: Always
+ ## ports:
+ ## - name: portname
+ ## containerPort: 1234
+ ##
+ sidecars: []
+ ## @param primary.initContainers Add additional init containers to the PostgreSQL Primary pod(s)
+ ## Example
+ ##
+ ## initContainers:
+ ## - name: do-something
+ ## image: busybox
+ ## command: ['do', 'something']
+ ##
+ initContainers: []
+ ## Pod Disruption Budget configuration
+ ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb
+ ## @param primary.pdb.create Enable/disable a Pod Disruption Budget creation
+ ## @param primary.pdb.minAvailable Minimum number/percentage of pods that should remain scheduled
+ ## @param primary.pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `primary.pdb.minAvailable` and `primary.pdb.maxUnavailable` are empty.
+ ##
+ pdb:
+ create: true
+ minAvailable: ""
+ maxUnavailable: ""
+ ## @param primary.extraPodSpec Optionally specify extra PodSpec for the PostgreSQL Primary pod(s)
+ ##
+ extraPodSpec: {}
+ ## Network Policies
+ ## Ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
+ ##
+ networkPolicy:
+ ## @param primary.networkPolicy.enabled Specifies whether a NetworkPolicy should be created
+ ##
+ enabled: true
+ ## @param primary.networkPolicy.allowExternal Don't require server label for connections
+ ## The Policy model to apply. When set to false, only pods with the correct
+ ## server label will have network access to the ports server is listening
+ ## on. When true, server will accept connections from any source
+ ## (with the correct destination port).
+ ##
+ allowExternal: true
+ ## @param primary.networkPolicy.allowExternalEgress Allow the pod to access any range of port and all destinations.
+ ##
+ allowExternalEgress: true
+ ## @param primary.networkPolicy.extraIngress [array] Add extra ingress rules to the NetworkPolicy
+ ## e.g:
+ ## extraIngress:
+ ## - ports:
+ ## - port: 1234
+ ## from:
+ ## - podSelector:
+ ## - matchLabels:
+ ## - role: frontend
+ ## - podSelector:
+ ## - matchExpressions:
+ ## - key: role
+ ## operator: In
+ ## values:
+ ## - frontend
+ extraIngress: []
+ ## @param primary.networkPolicy.extraEgress [array] Add extra ingress rules to the NetworkPolicy
+ ## e.g:
+ ## extraEgress:
+ ## - ports:
+ ## - port: 1234
+ ## to:
+ ## - podSelector:
+ ## - matchLabels:
+ ## - role: frontend
+ ## - podSelector:
+ ## - matchExpressions:
+ ## - key: role
+ ## operator: In
+ ## values:
+ ## - frontend
+ ##
+ extraEgress: []
+ ## @param primary.networkPolicy.ingressNSMatchLabels [object] Labels to match to allow traffic from other namespaces
+ ## @param primary.networkPolicy.ingressNSPodMatchLabels [object] Pod labels to match to allow traffic from other namespaces
+ ##
+ ingressNSMatchLabels: {}
+ ingressNSPodMatchLabels: {}
+ ## PostgreSQL Primary service configuration
+ ##
+ service:
+ ## @param primary.service.type Kubernetes Service type
+ ##
+ type: ClusterIP
+ ## @param primary.service.ports.postgresql PostgreSQL service port
+ ##
+ ports:
+ postgresql: 5432
+ ## Node ports to expose
+ ## NOTE: choose port between <30000-32767>
+ ## @param primary.service.nodePorts.postgresql Node port for PostgreSQL
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
+ ##
+ nodePorts:
+ postgresql: ""
+ ## @param primary.service.clusterIP Static clusterIP or None for headless services
+ ## e.g:
+ ## clusterIP: None
+ ##
+ clusterIP: ""
+ ## @param primary.service.labels Map of labels to add to the primary service
+ ##
+ labels: {}
+ ## @param primary.service.annotations Annotations for PostgreSQL primary service
+ ##
+ annotations: {}
+ ## @param primary.service.loadBalancerClass Load balancer class if service type is `LoadBalancer`
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
+ ##
+ loadBalancerClass: ""
+ ## @param primary.service.loadBalancerIP Load balancer IP if service type is `LoadBalancer`
+ ## Set the LoadBalancer service type to internal only
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
+ ##
+ loadBalancerIP: ""
+ ## @param primary.service.externalTrafficPolicy Enable client source IP preservation
+ ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
+ ##
+ externalTrafficPolicy: Cluster
+ ## @param primary.service.loadBalancerSourceRanges Addresses that are allowed when service is LoadBalancer
+ ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
+ ##
+ ## loadBalancerSourceRanges:
+ ## - 10.10.10.0/24
+ ##
+ loadBalancerSourceRanges: []
+ ## @param primary.service.extraPorts Extra ports to expose in the PostgreSQL primary service
+ ##
+ extraPorts: []
+ ## @param primary.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"
+ ## If "ClientIP", consecutive client requests will be directed to the same Pod
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ ##
+ sessionAffinity: None
+ ## @param primary.service.sessionAffinityConfig Additional settings for the sessionAffinity. Ignored if `primary.service.sessionAffinity` is `None`
+ ## sessionAffinityConfig:
+ ## clientIP:
+ ## timeoutSeconds: 300
+ ##
+ sessionAffinityConfig: {}
+ ## Headless service properties
+ ##
+ headless:
+ ## @param primary.service.headless.annotations Additional custom annotations for headless PostgreSQL primary service
+ ##
+ annotations: {}
+ ## PostgreSQL Primary persistence configuration
+ ##
+ persistence:
+ ## @param primary.persistence.enabled Enable PostgreSQL Primary data persistence using PVC
+ ##
+ enabled: true
+ ## @param primary.persistence.volumeName Name to assign the volume
+ ##
+ volumeName: "data"
+ ## @param primary.persistence.existingClaim Name of an existing PVC to use
+ ##
+ existingClaim: ""
+ ## @param primary.persistence.mountPath The path the volume will be mounted at
+ ## Note: useful when using custom PostgreSQL images
+ ##
+ mountPath: /bitnami/postgresql
+ ## @param primary.persistence.subPath The subdirectory of the volume to mount to
+ ## Useful in dev environments and one PV for multiple services
+ ##
+ subPath: ""
+ ## @param primary.persistence.storageClass PVC Storage Class for PostgreSQL Primary data volume
+ ## If defined, storageClassName:
+ ## If set to "-", storageClassName: "", which disables dynamic provisioning
+ ## If undefined (the default) or set to null, no storageClassName spec is
+ ## set, choosing the default provisioner. (gp2 on AWS, standard on
+ ## GKE, AWS & OpenStack)
+ ##
+ storageClass: ""
+ ## @param primary.persistence.accessModes PVC Access Mode for PostgreSQL volume
+ ##
+ accessModes:
+ - ReadWriteOnce
+ ## @param primary.persistence.size PVC Storage Request for PostgreSQL volume
+ ##
+ size: 8Gi
+ ## @param primary.persistence.annotations Annotations for the PVC
+ ##
+ annotations: {}
+ ## @param primary.persistence.labels Labels for the PVC
+ ##
+ labels: {}
+ ## @param primary.persistence.selector Selector to match an existing Persistent Volume (this value is evaluated as a template)
+ ## selector:
+ ## matchLabels:
+ ## app: my-app
+ ##
+ selector: {}
+ ## @param primary.persistence.dataSource Custom PVC data source
+ ##
+ dataSource: {}
+ ## PostgreSQL Primary Persistent Volume Claim Retention Policy
+ ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
+ ##
+ persistentVolumeClaimRetentionPolicy:
+ ## @param primary.persistentVolumeClaimRetentionPolicy.enabled Enable Persistent volume retention policy for Primary Statefulset
+ ##
+ enabled: false
+ ## @param primary.persistentVolumeClaimRetentionPolicy.whenScaled Volume retention behavior when the replica count of the StatefulSet is reduced
+ ##
+ whenScaled: Retain
+ ## @param primary.persistentVolumeClaimRetentionPolicy.whenDeleted Volume retention behavior that applies when the StatefulSet is deleted
+ ##
+ whenDeleted: Retain
+## @section PostgreSQL read only replica parameters (only used when `architecture` is set to `replication`)
+##
+readReplicas:
+ ## @param readReplicas.name Name of the read replicas database (eg secondary, slave, ...)
+ ##
+ name: read
+ ## @param readReplicas.replicaCount Number of PostgreSQL read only replicas
+ ##
+ replicaCount: 1
+ ## @param readReplicas.extendedConfiguration Extended PostgreSQL read only replicas configuration (appended to main or default configuration)
+ ## ref: https://github.com/bitnami/containers/tree/main/bitnami/postgresql#allow-settings-to-be-loaded-from-files-other-than-the-default-postgresqlconf
+ ##
+ extendedConfiguration: ""
+ ## @param readReplicas.extraEnvVars Array with extra environment variables to add to PostgreSQL read only nodes
+ ## e.g:
+ ## extraEnvVars:
+ ## - name: FOO
+ ## value: "bar"
+ ##
+ extraEnvVars: []
+ ## @param readReplicas.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for PostgreSQL read only nodes
+ ##
+ extraEnvVarsCM: ""
+ ## @param readReplicas.extraEnvVarsSecret Name of existing Secret containing extra env vars for PostgreSQL read only nodes
+ ##
+ extraEnvVarsSecret: ""
+ ## @param readReplicas.command Override default container command (useful when using custom images)
+ ##
+ command: []
+ ## @param readReplicas.args Override default container args (useful when using custom images)
+ ##
+ args: []
+ ## Configure extra options for PostgreSQL read only containers' liveness, readiness and startup probes
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
+ ## @param readReplicas.livenessProbe.enabled Enable livenessProbe on PostgreSQL read only containers
+ ## @param readReplicas.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
+ ## @param readReplicas.livenessProbe.periodSeconds Period seconds for livenessProbe
+ ## @param readReplicas.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
+ ## @param readReplicas.livenessProbe.failureThreshold Failure threshold for livenessProbe
+ ## @param readReplicas.livenessProbe.successThreshold Success threshold for livenessProbe
+ ##
+ livenessProbe:
+ enabled: true
+ initialDelaySeconds: 30
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+ ## @param readReplicas.readinessProbe.enabled Enable readinessProbe on PostgreSQL read only containers
+ ## @param readReplicas.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
+ ## @param readReplicas.readinessProbe.periodSeconds Period seconds for readinessProbe
+ ## @param readReplicas.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
+ ## @param readReplicas.readinessProbe.failureThreshold Failure threshold for readinessProbe
+ ## @param readReplicas.readinessProbe.successThreshold Success threshold for readinessProbe
+ ##
+ readinessProbe:
+ enabled: true
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+ ## @param readReplicas.startupProbe.enabled Enable startupProbe on PostgreSQL read only containers
+ ## @param readReplicas.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
+ ## @param readReplicas.startupProbe.periodSeconds Period seconds for startupProbe
+ ## @param readReplicas.startupProbe.timeoutSeconds Timeout seconds for startupProbe
+ ## @param readReplicas.startupProbe.failureThreshold Failure threshold for startupProbe
+ ## @param readReplicas.startupProbe.successThreshold Success threshold for startupProbe
+ ##
+ startupProbe:
+ enabled: false
+ initialDelaySeconds: 30
+ periodSeconds: 10
+ timeoutSeconds: 1
+ failureThreshold: 15
+ successThreshold: 1
+ ## @param readReplicas.customLivenessProbe Custom livenessProbe that overrides the default one
+ ##
+ customLivenessProbe: {}
+ ## @param readReplicas.customReadinessProbe Custom readinessProbe that overrides the default one
+ ##
+ customReadinessProbe: {}
+ ## @param readReplicas.customStartupProbe Custom startupProbe that overrides the default one
+ ##
+ customStartupProbe: {}
+ ## @param readReplicas.lifecycleHooks for the PostgreSQL read only container to automate configuration before or after startup
+ ##
+ lifecycleHooks: {}
+ ## PostgreSQL read only resource requests and limits
+ ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ ## @param readReplicas.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if readReplicas.resources is set (readReplicas.resources is recommended for production).
+ ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
+ ##
+ resourcesPreset: "nano"
+ ## @param readReplicas.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
+ ## Example:
+ ## resources:
+ ## requests:
+ ## cpu: 2
+ ## memory: 512Mi
+ ## limits:
+ ## cpu: 3
+ ## memory: 1024Mi
+ ##
+ resources: {}
+ ## @param readReplicas.fips.openssl Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used
+ ##
+ fips:
+ openssl: ""
+ ## Pod Security Context
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ ## @param readReplicas.podSecurityContext.enabled Enable security context
+ ## @param readReplicas.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
+ ## @param readReplicas.podSecurityContext.sysctls Set kernel settings using the sysctl interface
+ ## @param readReplicas.podSecurityContext.supplementalGroups Set filesystem extra groups
+ ## @param readReplicas.podSecurityContext.fsGroup Group ID for the pod
+ ##
+ podSecurityContext:
+ enabled: true
+ fsGroupChangePolicy: Always
+ sysctls: []
+ supplementalGroups: []
+ fsGroup: 1001
+ ## Container Security Context
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ ## @param readReplicas.containerSecurityContext.enabled Enabled containers' Security Context
+ ## @param readReplicas.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
+ ## @param readReplicas.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
+ ## @param readReplicas.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
+ ## @param readReplicas.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
+ ## @param readReplicas.containerSecurityContext.privileged Set container's Security Context privileged
+ ## @param readReplicas.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
+ ## @param readReplicas.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
+ ## @param readReplicas.containerSecurityContext.capabilities.drop List of capabilities to be dropped
+ ## @param readReplicas.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
+ ##
+ containerSecurityContext:
+ enabled: true
+ seLinuxOptions: {}
+ runAsUser: 1001
+ runAsGroup: 1001
+ runAsNonRoot: true
+ privileged: false
+ readOnlyRootFilesystem: true
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop: ["ALL"]
+ seccompProfile:
+ type: "RuntimeDefault"
+ ## @param readReplicas.automountServiceAccountToken Mount Service Account token in pod
+ ##
+ automountServiceAccountToken: false
+ ## @param readReplicas.hostAliases PostgreSQL read only pods host aliases
+ ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
+ ##
+ hostAliases: []
+ ## @param readReplicas.hostNetwork Specify if host network should be enabled for PostgreSQL pod (PostgreSQL read only)
+ ##
+ hostNetwork: false
+ ## @param readReplicas.hostIPC Specify if host IPC should be enabled for PostgreSQL pod (postgresql primary)
+ ##
+ hostIPC: false
+ ## @param readReplicas.labels Map of labels to add to the statefulset (PostgreSQL read only)
+ ##
+ labels: {}
+ ## @param readReplicas.annotations Annotations for PostgreSQL read only pods
+ ##
+ annotations: {}
+ ## @param readReplicas.podLabels Map of labels to add to the pods (PostgreSQL read only)
+ ##
+ podLabels: {}
+ ## @param readReplicas.podAnnotations Map of annotations to add to the pods (PostgreSQL read only)
+ ##
+ podAnnotations: {}
+ ## @param readReplicas.podAffinityPreset PostgreSQL read only pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
+ ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
+ ##
+ podAffinityPreset: ""
+ ## @param readReplicas.podAntiAffinityPreset PostgreSQL read only pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
+ ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
+ ##
+ podAntiAffinityPreset: soft
+ ## PostgreSQL read only node affinity preset
+ ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
+ ##
+ nodeAffinityPreset:
+ ## @param readReplicas.nodeAffinityPreset.type PostgreSQL read only node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
+ ##
+ type: ""
+ ## @param readReplicas.nodeAffinityPreset.key PostgreSQL read only node label key to match Ignored if `primary.affinity` is set.
+ ## E.g.
+ ## key: "kubernetes.io/e2e-az-name"
+ ##
+ key: ""
+ ## @param readReplicas.nodeAffinityPreset.values PostgreSQL read only node label values to match. Ignored if `primary.affinity` is set.
+ ## E.g.
+ ## values:
+ ## - e2e-az1
+ ## - e2e-az2
+ ##
+ values: []
+ ## @param readReplicas.affinity Affinity for PostgreSQL read only pods assignment
+ ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
+ ## Note: primary.podAffinityPreset, primary.podAntiAffinityPreset, and primary.nodeAffinityPreset will be ignored when it's set
+ ##
+ affinity: {}
+ ## @param readReplicas.nodeSelector Node labels for PostgreSQL read only pods assignment
+ ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
+ ##
+ nodeSelector: {}
+ ## @param readReplicas.tolerations Tolerations for PostgreSQL read only pods assignment
+ ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+ ##
+ tolerations: []
+ ## @param readReplicas.topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template
+ ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods
+ ##
+ topologySpreadConstraints: []
+ ## @param readReplicas.priorityClassName Priority Class to use for each pod (PostgreSQL read only)
+ ##
+ priorityClassName: ""
+ ## @param readReplicas.schedulerName Use an alternate scheduler, e.g. "stork".
+ ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
+ ##
+ schedulerName: ""
+ ## @param readReplicas.terminationGracePeriodSeconds Seconds PostgreSQL read only pod needs to terminate gracefully
+ ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
+ ##
+ terminationGracePeriodSeconds: ""
+ ## @param readReplicas.updateStrategy.type PostgreSQL read only statefulset strategy type
+ ## @param readReplicas.updateStrategy.rollingUpdate PostgreSQL read only statefulset rolling update configuration parameters
+ ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
+ ##
+ updateStrategy:
+ type: RollingUpdate
+ rollingUpdate: {}
+ ## @param readReplicas.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the PostgreSQL read only container(s)
+ ##
+ extraVolumeMounts: []
+ ## @param readReplicas.extraVolumes Optionally specify extra list of additional volumes for the PostgreSQL read only pod(s)
+ ##
+ extraVolumes: []
+ ## @param readReplicas.sidecars Add additional sidecar containers to the PostgreSQL read only pod(s)
+ ## For example:
+ ## sidecars:
+ ## - name: your-image-name
+ ## image: your-image
+ ## imagePullPolicy: Always
+ ## ports:
+ ## - name: portname
+ ## containerPort: 1234
+ ##
+ sidecars: []
+ ## @param readReplicas.initContainers Add additional init containers to the PostgreSQL read only pod(s)
+ ## Example
+ ##
+ ## initContainers:
+ ## - name: do-something
+ ## image: busybox
+ ## command: ['do', 'something']
+ ##
+ initContainers: []
+ ## Pod Disruption Budget configuration
+ ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb
+ ## @param readReplicas.pdb.create Enable/disable a Pod Disruption Budget creation
+ ## @param readReplicas.pdb.minAvailable Minimum number/percentage of pods that should remain scheduled
+ ## @param readReplicas.pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `readReplicas.pdb.minAvailable` and `readReplicas.pdb.maxUnavailable` are empty.
+ ##
+ pdb:
+ create: true
+ minAvailable: ""
+ maxUnavailable: ""
+ ## @param readReplicas.extraPodSpec Optionally specify extra PodSpec for the PostgreSQL read only pod(s)
+ ##
+ extraPodSpec: {}
+ ## Network Policies
+ ## Ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
+ ##
+ networkPolicy:
+ ## @param readReplicas.networkPolicy.enabled Specifies whether a NetworkPolicy should be created
+ ##
+ enabled: true
+ ## @param readReplicas.networkPolicy.allowExternal Don't require server label for connections
+ ## The Policy model to apply. When set to false, only pods with the correct
+ ## server label will have network access to the ports server is listening
+ ## on. When true, server will accept connections from any source
+ ## (with the correct destination port).
+ ##
+ allowExternal: true
+ ## @param readReplicas.networkPolicy.allowExternalEgress Allow the pod to access any range of port and all destinations.
+ ##
+ allowExternalEgress: true
+ ## @param readReplicas.networkPolicy.extraIngress [array] Add extra ingress rules to the NetworkPolicy
+ ## e.g:
+ ## extraIngress:
+ ## - ports:
+ ## - port: 1234
+ ## from:
+ ## - podSelector:
+ ## - matchLabels:
+ ## - role: frontend
+ ## - podSelector:
+ ## - matchExpressions:
+ ## - key: role
+ ## operator: In
+ ## values:
+ ## - frontend
+ extraIngress: []
+ ## @param readReplicas.networkPolicy.extraEgress [array] Add extra ingress rules to the NetworkPolicy
+ ## e.g:
+ ## extraEgress:
+ ## - ports:
+ ## - port: 1234
+ ## to:
+ ## - podSelector:
+ ## - matchLabels:
+ ## - role: frontend
+ ## - podSelector:
+ ## - matchExpressions:
+ ## - key: role
+ ## operator: In
+ ## values:
+ ## - frontend
+ ##
+ extraEgress: []
+ ## @param readReplicas.networkPolicy.ingressNSMatchLabels [object] Labels to match to allow traffic from other namespaces
+ ## @param readReplicas.networkPolicy.ingressNSPodMatchLabels [object] Pod labels to match to allow traffic from other namespaces
+ ##
+ ingressNSMatchLabels: {}
+ ingressNSPodMatchLabels: {}
+ ## PostgreSQL read only service configuration
+ ##
+ service:
+ ## @param readReplicas.service.type Kubernetes Service type
+ ##
+ type: ClusterIP
+ ## @param readReplicas.service.ports.postgresql PostgreSQL service port
+ ##
+ ports:
+ postgresql: 5432
+ ## Node ports to expose
+ ## NOTE: choose port between <30000-32767>
+ ## @param readReplicas.service.nodePorts.postgresql Node port for PostgreSQL
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
+ ##
+ nodePorts:
+ postgresql: ""
+ ## @param readReplicas.service.clusterIP Static clusterIP or None for headless services
+ ## e.g:
+ ## clusterIP: None
+ ##
+ clusterIP: ""
+ ## @param readReplicas.service.labels Map of labels to add to the read service
+ ##
+ labels: {}
+ ## @param readReplicas.service.annotations Annotations for PostgreSQL read only service
+ ##
+ annotations: {}
+ ## @param readReplicas.service.loadBalancerClass Load balancer class if service type is `LoadBalancer`
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class
+ ##
+ loadBalancerClass: ""
+ ## @param readReplicas.service.loadBalancerIP Load balancer IP if service type is `LoadBalancer`
+ ## Set the LoadBalancer service type to internal only
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
+ ##
+ loadBalancerIP: ""
+ ## @param readReplicas.service.externalTrafficPolicy Enable client source IP preservation
+ ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
+ ##
+ externalTrafficPolicy: Cluster
+ ## @param readReplicas.service.loadBalancerSourceRanges Addresses that are allowed when service is LoadBalancer
+ ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
+ ##
+ ## loadBalancerSourceRanges:
+ ## - 10.10.10.0/24
+ ##
+ loadBalancerSourceRanges: []
+ ## @param readReplicas.service.extraPorts Extra ports to expose in the PostgreSQL read only service
+ ##
+ extraPorts: []
+ ## @param readReplicas.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"
+ ## If "ClientIP", consecutive client requests will be directed to the same Pod
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ ##
+ sessionAffinity: None
+ ## @param readReplicas.service.sessionAffinityConfig Additional settings for the sessionAffinity. Ignored if `readReplicas.service.sessionAffinity` is `None`
+ ## sessionAffinityConfig:
+ ## clientIP:
+ ## timeoutSeconds: 300
+ ##
+ sessionAffinityConfig: {}
+ ## Headless service properties
+ ##
+ headless:
+ ## @param readReplicas.service.headless.annotations Additional custom annotations for headless PostgreSQL read only service
+ ##
+ annotations: {}
+ ## PostgreSQL read only persistence configuration
+ ##
+ persistence:
+ ## @param readReplicas.persistence.enabled Enable PostgreSQL read only data persistence using PVC
+ ##
+ enabled: true
+ ## @param readReplicas.persistence.existingClaim Name of an existing PVC to use
+ ##
+ existingClaim: ""
+ ## @param readReplicas.persistence.mountPath The path the volume will be mounted at
+ ## Note: useful when using custom PostgreSQL images
+ ##
+ mountPath: /bitnami/postgresql
+ ## @param readReplicas.persistence.subPath The subdirectory of the volume to mount to
+ ## Useful in dev environments and one PV for multiple services
+ ##
+ subPath: ""
+ ## @param readReplicas.persistence.storageClass PVC Storage Class for PostgreSQL read only data volume
+ ## If defined, storageClassName:
+ ## If set to "-", storageClassName: "", which disables dynamic provisioning
+ ## If undefined (the default) or set to null, no storageClassName spec is
+ ## set, choosing the default provisioner. (gp2 on AWS, standard on
+ ## GKE, AWS & OpenStack)
+ ##
+ storageClass: ""
+ ## @param readReplicas.persistence.accessModes PVC Access Mode for PostgreSQL volume
+ ##
+ accessModes:
+ - ReadWriteOnce
+ ## @param readReplicas.persistence.size PVC Storage Request for PostgreSQL volume
+ ##
+ size: 8Gi
+ ## @param readReplicas.persistence.annotations Annotations for the PVC
+ ##
+ annotations: {}
+ ## @param readReplicas.persistence.labels Labels for the PVC
+ ##
+ labels: {}
+ ## @param readReplicas.persistence.selector Selector to match an existing Persistent Volume (this value is evaluated as a template)
+ ## selector:
+ ## matchLabels:
+ ## app: my-app
+ ##
+ selector: {}
+ ## @param readReplicas.persistence.dataSource Custom PVC data source
+ ##
+ dataSource: {}
+ ## PostgreSQL Read only Persistent Volume Claim Retention Policy
+ ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
+ ##
+ persistentVolumeClaimRetentionPolicy:
+ ## @param readReplicas.persistentVolumeClaimRetentionPolicy.enabled Enable Persistent volume retention policy for read only Statefulset
+ ##
+ enabled: false
+ ## @param readReplicas.persistentVolumeClaimRetentionPolicy.whenScaled Volume retention behavior when the replica count of the StatefulSet is reduced
+ ##
+ whenScaled: Retain
+ ## @param readReplicas.persistentVolumeClaimRetentionPolicy.whenDeleted Volume retention behavior that applies when the StatefulSet is deleted
+ ##
+ whenDeleted: Retain
+## @section Backup parameters
+## This section implements a trivial logical dump cronjob of the database.
+## This only comes with the consistency guarantees of the dump program.
+## This is not a snapshot based roll forward/backward recovery backup.
+## ref: https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
+backup:
+ ## @param backup.enabled Enable the logical dump of the database "regularly"
+ enabled: false
+ cronjob:
+ ## @param backup.cronjob.schedule Set the cronjob parameter schedule
+ schedule: "@daily"
+ ## @param backup.cronjob.timeZone Set the cronjob parameter timeZone
+ timeZone: ""
+ ## @param backup.cronjob.concurrencyPolicy Set the cronjob parameter concurrencyPolicy
+ concurrencyPolicy: Allow
+ ## @param backup.cronjob.failedJobsHistoryLimit Set the cronjob parameter failedJobsHistoryLimit
+ failedJobsHistoryLimit: 1
+ ## @param backup.cronjob.successfulJobsHistoryLimit Set the cronjob parameter successfulJobsHistoryLimit
+ successfulJobsHistoryLimit: 3
+ ## @param backup.cronjob.startingDeadlineSeconds Set the cronjob parameter startingDeadlineSeconds
+ startingDeadlineSeconds: ""
+ ## @param backup.cronjob.ttlSecondsAfterFinished Set the cronjob parameter ttlSecondsAfterFinished
+ ttlSecondsAfterFinished: ""
+ ## @param backup.cronjob.restartPolicy Set the cronjob parameter restartPolicy
+ restartPolicy: OnFailure
+ ## @param backup.cronjob.podSecurityContext.enabled Enable PodSecurityContext for CronJob/Backup
+ ## @param backup.cronjob.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
+ ## @param backup.cronjob.podSecurityContext.sysctls Set kernel settings using the sysctl interface
+ ## @param backup.cronjob.podSecurityContext.supplementalGroups Set filesystem extra groups
+ ## @param backup.cronjob.podSecurityContext.fsGroup Group ID for the CronJob
+ podSecurityContext:
+ enabled: true
+ fsGroupChangePolicy: Always
+ sysctls: []
+ supplementalGroups: []
+ fsGroup: 1001
+ ## backup container's Security Context
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
+ ## @param backup.cronjob.containerSecurityContext.enabled Enabled containers' Security Context
+ ## @param backup.cronjob.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
+ ## @param backup.cronjob.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
+ ## @param backup.cronjob.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
+ ## @param backup.cronjob.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
+ ## @param backup.cronjob.containerSecurityContext.privileged Set container's Security Context privileged
+ ## @param backup.cronjob.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
+ ## @param backup.cronjob.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
+ ## @param backup.cronjob.containerSecurityContext.capabilities.drop List of capabilities to be dropped
+ ## @param backup.cronjob.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
+ containerSecurityContext:
+ enabled: true
+ seLinuxOptions: {}
+ runAsUser: 1001
+ runAsGroup: 1001
+ runAsNonRoot: true
+ privileged: false
+ readOnlyRootFilesystem: true
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop: ["ALL"]
+ seccompProfile:
+ type: "RuntimeDefault"
+ ## @param backup.cronjob.command Set backup container's command to run
+ command:
+ - /bin/bash
+ - -c
+ - PGPASSWORD="${PGPASSWORD:-$(< "$PGPASSWORD_FILE")}" pg_dumpall --clean --if-exists --load-via-partition-root --quote-all-identifiers --no-password --file="${PGDUMP_DIR}/pg_dumpall-$(date '+%Y-%m-%d-%H-%M').pgdump"
+ ## @param backup.cronjob.labels Set the cronjob labels
+ labels: {}
+ ## @param backup.cronjob.annotations Set the cronjob annotations
+ annotations: {}
+ ## @param backup.cronjob.nodeSelector Node labels for PostgreSQL backup CronJob pod assignment
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/
+ ##
+ nodeSelector: {}
+ ## @param backup.cronjob.tolerations Tolerations for PostgreSQL backup CronJob pods assignment
+ ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+ ##
+ tolerations: []
+ ## backup cronjob container resource requests and limits
+ ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ ## @param backup.cronjob.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if backup.cronjob.resources is set (backup.cronjob.resources is recommended for production).
+ ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
+ ##
+ resourcesPreset: "nano"
+ ## @param backup.cronjob.resources Set container requests and limits for different resources like CPU or memory
+ ## Example:
+ resources: {}
+ ## @param backup.cronjob.fips.openssl Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used
+ ##
+ fips:
+ openssl: ""
+ ## resources:
+ ## requests:
+ ## cpu: 1
+ ## memory: 512Mi
+ ## limits:
+ ## cpu: 2
+ ## memory: 1024Mi
+ networkPolicy:
+ ## @param backup.cronjob.networkPolicy.enabled Specifies whether a NetworkPolicy should be created
+ ##
+ enabled: true
+ storage:
+ ## @param backup.cronjob.storage.enabled Enable using a `PersistentVolumeClaim` as backup data volume
+ ##
+ enabled: true
+ ## @param backup.cronjob.storage.existingClaim Provide an existing `PersistentVolumeClaim` (only when `architecture=standalone`)
+ ## If defined, PVC must be created manually before volume will be bound
+ ##
+ existingClaim: ""
+ ## @param backup.cronjob.storage.resourcePolicy Setting it to "keep" to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deleted
+ ##
+ resourcePolicy: ""
+ ## @param backup.cronjob.storage.storageClass PVC Storage Class for the backup data volume
+ ## If defined, storageClassName:
+ ## If set to "-", storageClassName: "", which disables dynamic provisioning
+ ## If undefined (the default) or set to null, no storageClassName spec is
+ ## set, choosing the default provisioner.
+ ##
+ storageClass: ""
+ ## @param backup.cronjob.storage.accessModes PV Access Mode
+ ##
+ accessModes:
+ - ReadWriteOnce
+ ## @param backup.cronjob.storage.size PVC Storage Request for the backup data volume
+ ##
+ size: 8Gi
+ ## @param backup.cronjob.storage.annotations PVC annotations
+ ##
+ annotations: {}
+ ## @param backup.cronjob.storage.mountPath Path to mount the volume at
+ ##
+ mountPath: /backup/pgdump
+ ## @param backup.cronjob.storage.subPath Subdirectory of the volume to mount at
+ ## and one PV for multiple services.
+ ##
+ subPath: ""
+ ## Fine tuning for volumeClaimTemplates
+ ##
+ volumeClaimTemplates:
+ ## @param backup.cronjob.storage.volumeClaimTemplates.selector A label query over volumes to consider for binding (e.g. when using local volumes)
+ ## A label query over volumes to consider for binding (e.g. when using local volumes)
+ ## See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#labelselector-v1-meta for more details
+ ##
+ selector: {}
+ ## @param backup.cronjob.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the backup container
+ ##
+ extraVolumeMounts: []
+ ## @param backup.cronjob.extraVolumes Optionally specify extra list of additional volumes for the backup container
+ ##
+ extraVolumes: []
+
+## @section Password update job
+##
+passwordUpdateJob:
+ ## @param passwordUpdateJob.enabled Enable password update job
+ ##
+ enabled: false
+ ## @param passwordUpdateJob.backoffLimit set backoff limit of the job
+ ##
+ backoffLimit: 10
+ ## @param passwordUpdateJob.command Override default container command on mysql Primary container(s) (useful when using custom images)
+ ##
+ command: []
+ ## @param passwordUpdateJob.args Override default container args on mysql Primary container(s) (useful when using custom images)
+ ##
+ args: []
+ ## @param passwordUpdateJob.extraCommands Extra commands to pass to the generation job
+ ##
+ extraCommands: ""
+ ## @param passwordUpdateJob.previousPasswords.postgresPassword Previous postgres password (set if the password secret was already changed)
+ ## @param passwordUpdateJob.previousPasswords.password Previous password (set if the password secret was already changed)
+ ## @param passwordUpdateJob.previousPasswords.replicationPassword Previous replication password (set if the password secret was already changed)
+ ## @param passwordUpdateJob.previousPasswords.existingSecret Name of a secret containing the previous passwords (set if the password secret was already changed)
+ previousPasswords:
+ postgresPassword: ""
+ password: ""
+ replicationPassword: ""
+ existingSecret: ""
+ ## Configure Container Security Context
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
+ ## @param passwordUpdateJob.containerSecurityContext.enabled Enabled containers' Security Context
+ ## @param passwordUpdateJob.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
+ ## @param passwordUpdateJob.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
+ ## @param passwordUpdateJob.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
+ ## @param passwordUpdateJob.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
+ ## @param passwordUpdateJob.containerSecurityContext.privileged Set container's Security Context privileged
+ ## @param passwordUpdateJob.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
+ ## @param passwordUpdateJob.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
+ ## @param passwordUpdateJob.containerSecurityContext.capabilities.drop List of capabilities to be dropped
+ ## @param passwordUpdateJob.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
+ ##
+ containerSecurityContext:
+ enabled: true
+ seLinuxOptions: {}
+ runAsUser: 1001
+ runAsGroup: 1001
+ runAsNonRoot: true
+ privileged: false
+ readOnlyRootFilesystem: true
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop: ["ALL"]
+ seccompProfile:
+ type: "RuntimeDefault"
+ ## Configure Pods Security Context
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
+ ## @param passwordUpdateJob.podSecurityContext.enabled Enabled credential init job pods' Security Context
+ ## @param passwordUpdateJob.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
+ ## @param passwordUpdateJob.podSecurityContext.sysctls Set kernel settings using the sysctl interface
+ ## @param passwordUpdateJob.podSecurityContext.supplementalGroups Set filesystem extra groups
+ ## @param passwordUpdateJob.podSecurityContext.fsGroup Set credential init job pod's Security Context fsGroup
+ ##
+ podSecurityContext:
+ enabled: true
+ fsGroupChangePolicy: Always
+ sysctls: []
+ supplementalGroups: []
+ fsGroup: 1001
+ ## @param passwordUpdateJob.extraEnvVars Array containing extra env vars to configure the credential init job
+ ## For example:
+ ## extraEnvVars:
+ ## - name: GF_DEFAULT_INSTANCE_NAME
+ ## value: my-instance
+ ##
+ extraEnvVars: []
+ ## @param passwordUpdateJob.extraEnvVarsCM ConfigMap containing extra env vars to configure the credential init job
+ ##
+ extraEnvVarsCM: ""
+ ## @param passwordUpdateJob.extraEnvVarsSecret Secret containing extra env vars to configure the credential init job (in case of sensitive data)
+ ##
+ extraEnvVarsSecret: ""
+ ## @param passwordUpdateJob.extraVolumes Optionally specify extra list of additional volumes for the credential init job
+ ##
+ extraVolumes: []
+ ## @param passwordUpdateJob.extraVolumeMounts Array of extra volume mounts to be added to the jwt Container (evaluated as template). Normally used with `extraVolumes`.
+ ##
+ extraVolumeMounts: []
+ ## @param passwordUpdateJob.initContainers Add additional init containers for the mysql Primary pod(s)
+ ##
+ initContainers: []
+ ## Container resource requests and limits
+ ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ ## @param passwordUpdateJob.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if passwordUpdateJob.resources is set (passwordUpdateJob.resources is recommended for production).
+ ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
+ ##
+ resourcesPreset: "micro"
+ ## @param passwordUpdateJob.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
+ ## Example:
+ ## resources:
+ ## requests:
+ ## cpu: 2
+ ## memory: 512Mi
+ ## limits:
+ ## cpu: 3
+ ## memory: 1024Mi
+ ##
+ resources: {}
+ ## @param passwordUpdateJob.fips.openssl Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used
+ ##
+ fips:
+ openssl: ""
+ ## @param passwordUpdateJob.customLivenessProbe Custom livenessProbe that overrides the default one
+ ##
+ customLivenessProbe: {}
+ ## @param passwordUpdateJob.customReadinessProbe Custom readinessProbe that overrides the default one
+ ##
+ customReadinessProbe: {}
+ ## @param passwordUpdateJob.customStartupProbe Custom startupProbe that overrides the default one
+ ##
+ customStartupProbe: {}
+ ## @param passwordUpdateJob.automountServiceAccountToken Mount Service Account token in pod
+ ##
+ automountServiceAccountToken: false
+ ## @param passwordUpdateJob.hostAliases Add deployment host aliases
+ ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
+ ##
+ hostAliases: []
+ ## @param passwordUpdateJob.annotations [object] Add annotations to the job
+ ##
+ annotations: {}
+ ## @param passwordUpdateJob.podLabels Additional pod labels
+ ## Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
+ ##
+ podLabels: {}
+ ## @param passwordUpdateJob.podAnnotations Additional pod annotations
+ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ ##
+ podAnnotations: {}
+
+## @section Volume Permissions parameters
+##
+
+## Init containers parameters:
+## volumePermissions: Change the owner and group of the persistent volume(s) mountpoint(s) to 'runAsUser:fsGroup' on each node
+##
+volumePermissions:
+ ## @param volumePermissions.enabled Enable init container that changes the owner and group of the persistent volume
+ ##
+ enabled: false
+ ## @param volumePermissions.image.registry [default: REGISTRY_NAME] Init container volume-permissions image registry
+ ## @param volumePermissions.image.repository [default: REPOSITORY_NAME/os-shell] Init container volume-permissions image repository
+ ## @skip volumePermissions.image.tag Init container volume-permissions image tag (immutable tags are recommended)
+ ## @param volumePermissions.image.digest Init container volume-permissions image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
+ ## @param volumePermissions.image.pullPolicy Init container volume-permissions image pull policy
+ ## @param volumePermissions.image.pullSecrets Init container volume-permissions image pull secrets
+ ##
+ image:
+ registry: registry-1.docker.io
+ repository: bitnami/os-shell
+ tag: latest
+ digest: ""
+ pullPolicy: IfNotPresent
+ ## Optionally specify an array of imagePullSecrets.
+ ## Secrets must be manually created in the namespace.
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
+ ## Example:
+ ## pullSecrets:
+ ## - myRegistryKeySecretName
+ ##
+ pullSecrets: []
+ ## Init container resource requests and limits
+ ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ ## @param volumePermissions.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if volumePermissions.resources is set (volumePermissions.resources is recommended for production).
+ ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
+ ##
+ resourcesPreset: "nano"
+ ## @param volumePermissions.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
+ ## Example:
+ ## resources:
+ ## requests:
+ ## cpu: 2
+ ## memory: 512Mi
+ ## limits:
+ ## cpu: 3
+ ## memory: 1024Mi
+ ##
+ resources: {}
+ ## @param volumePermissions.fips.openssl Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used
+ ##
+ fips:
+ openssl: ""
+ ## Init container' Security Context
+ ## Note: the chown of the data folder is done to containerSecurityContext.runAsUser
+ ## and not the below volumePermissions.containerSecurityContext.runAsUser
+ ## @param volumePermissions.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
+ ## @param volumePermissions.containerSecurityContext.runAsUser User ID for the init container
+ ## @param volumePermissions.containerSecurityContext.runAsGroup Group ID for the init container
+ ## @param volumePermissions.containerSecurityContext.runAsNonRoot runAsNonRoot for the init container
+ ## @param volumePermissions.containerSecurityContext.seccompProfile.type seccompProfile.type for the init container
+ ##
+ containerSecurityContext:
+ seLinuxOptions: {}
+ runAsUser: 0
+ runAsGroup: 0
+ runAsNonRoot: false
+ seccompProfile:
+ type: RuntimeDefault
+## @section Other Parameters
+##
+
+## @param serviceBindings.enabled Create secret for service binding (Experimental)
+## Ref: https://servicebinding.io/service-provider/
+##
+serviceBindings:
+ enabled: false
+## Service account for PostgreSQL to use.
+## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
+##
+serviceAccount:
+ ## @param serviceAccount.create Enable creation of ServiceAccount for PostgreSQL pod
+ ##
+ create: true
+ ## @param serviceAccount.name The name of the ServiceAccount to use.
+ ## If not set and create is true, a name is generated using the common.names.fullname template
+ ##
+ name: ""
+ ## @param serviceAccount.automountServiceAccountToken Allows auto mount of ServiceAccountToken on the serviceAccount created
+ ## Can be set to false if pods using this serviceAccount do not need to use K8s API
+ ##
+ automountServiceAccountToken: false
+ ## @param serviceAccount.annotations Additional custom annotations for the ServiceAccount
+ ##
+ annotations: {}
+## Creates role for ServiceAccount
+## @param rbac.create Create Role and RoleBinding (required for PSP to work)
+##
+rbac:
+ create: false
+ ## @param rbac.rules Custom RBAC rules to set
+ ## e.g:
+ ## rules:
+ ## - apiGroups:
+ ## - ""
+ ## resources:
+ ## - pods
+ ## verbs:
+ ## - get
+ ## - list
+ ##
+ rules: []
+## Pod Security Policy
+## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
+## @param psp.create Whether to create a PodSecurityPolicy. WARNING: PodSecurityPolicy is deprecated in Kubernetes v1.21 or later, unavailable in v1.25 or later
+##
+psp:
+ create: false
+## @section Metrics Parameters
+##
+metrics:
+ ## @param metrics.enabled Start a prometheus exporter
+ ##
+ enabled: false
+ ## @param metrics.image.registry [default: REGISTRY_NAME] PostgreSQL Prometheus Exporter image registry
+ ## @param metrics.image.repository [default: REPOSITORY_NAME/postgres-exporter] PostgreSQL Prometheus Exporter image repository
+ ## @skip metrics.image.tag PostgreSQL Prometheus Exporter image tag (immutable tags are recommended)
+ ## @param metrics.image.digest PostgreSQL image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
+ ## @param metrics.image.pullPolicy PostgreSQL Prometheus Exporter image pull policy
+ ## @param metrics.image.pullSecrets Specify image pull secrets
+ ##
+ image:
+ registry: registry-1.docker.io
+ repository: bitnami/postgres-exporter
+ tag: latest
+ digest: ""
+ pullPolicy: IfNotPresent
+ ## Optionally specify an array of imagePullSecrets.
+ ## Secrets must be manually created in the namespace.
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
+ ## Example:
+ ## pullSecrets:
+ ## - myRegistryKeySecretName
+ ##
+ pullSecrets: []
+ ## @param metrics.collectors Control enabled collectors
+ ## ref: https://github.com/prometheus-community/postgres_exporter#flags
+ ## Example:
+ ## collectors:
+ ## wal: false
+ collectors: {}
+ ## @param metrics.customMetrics Define additional custom metrics
+ ## ref: https://github.com/prometheus-community/postgres_exporter#adding-new-metrics-via-a-config-file-deprecated
+ ## customMetrics:
+ ## pg_database:
+ ## query: "SELECT d.datname AS name, CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') THEN pg_catalog.pg_database_size(d.datname) ELSE 0 END AS size_bytes FROM pg_catalog.pg_database d where datname not in ('template0', 'template1', 'postgres')"
+ ## metrics:
+ ## - name:
+ ## usage: "LABEL"
+ ## description: "Name of the database"
+ ## - size_bytes:
+ ## usage: "GAUGE"
+ ## description: "Size of the database in bytes"
+ ##
+ customMetrics: {}
+ ## @param metrics.extraEnvVars Extra environment variables to add to PostgreSQL Prometheus exporter
+ ## see: https://github.com/prometheus-community/postgres_exporter#environment-variables
+ ## For example:
+ ## extraEnvVars:
+ ## - name: PG_EXPORTER_DISABLE_DEFAULT_METRICS
+ ## value: "true"
+ ##
+ extraEnvVars: []
+ ## PostgreSQL Prometheus exporter containers' Security Context
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
+ ## @param metrics.containerSecurityContext.enabled Enabled containers' Security Context
+ ## @param metrics.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
+ ## @param metrics.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
+ ## @param metrics.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
+ ## @param metrics.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
+ ## @param metrics.containerSecurityContext.privileged Set container's Security Context privileged
+ ## @param metrics.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
+ ## @param metrics.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
+ ## @param metrics.containerSecurityContext.capabilities.drop List of capabilities to be dropped
+ ## @param metrics.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
+ ##
+ containerSecurityContext:
+ enabled: true
+ seLinuxOptions: {}
+ runAsUser: 1001
+ runAsGroup: 1001
+ runAsNonRoot: true
+ privileged: false
+ readOnlyRootFilesystem: true
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop: ["ALL"]
+ seccompProfile:
+ type: "RuntimeDefault"
+ ## Configure extra options for PostgreSQL Prometheus exporter containers' liveness, readiness and startup probes
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
+ ## @param metrics.livenessProbe.enabled Enable livenessProbe on PostgreSQL Prometheus exporter containers
+ ## @param metrics.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
+ ## @param metrics.livenessProbe.periodSeconds Period seconds for livenessProbe
+ ## @param metrics.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
+ ## @param metrics.livenessProbe.failureThreshold Failure threshold for livenessProbe
+ ## @param metrics.livenessProbe.successThreshold Success threshold for livenessProbe
+ ##
+ livenessProbe:
+ enabled: true
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+ ## @param metrics.readinessProbe.enabled Enable readinessProbe on PostgreSQL Prometheus exporter containers
+ ## @param metrics.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
+ ## @param metrics.readinessProbe.periodSeconds Period seconds for readinessProbe
+ ## @param metrics.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
+ ## @param metrics.readinessProbe.failureThreshold Failure threshold for readinessProbe
+ ## @param metrics.readinessProbe.successThreshold Success threshold for readinessProbe
+ ##
+ readinessProbe:
+ enabled: true
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+ ## @param metrics.startupProbe.enabled Enable startupProbe on PostgreSQL Prometheus exporter containers
+ ## @param metrics.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
+ ## @param metrics.startupProbe.periodSeconds Period seconds for startupProbe
+ ## @param metrics.startupProbe.timeoutSeconds Timeout seconds for startupProbe
+ ## @param metrics.startupProbe.failureThreshold Failure threshold for startupProbe
+ ## @param metrics.startupProbe.successThreshold Success threshold for startupProbe
+ ##
+ startupProbe:
+ enabled: false
+ initialDelaySeconds: 10
+ periodSeconds: 10
+ timeoutSeconds: 1
+ failureThreshold: 15
+ successThreshold: 1
+ ## @param metrics.customLivenessProbe Custom livenessProbe that overrides the default one
+ ##
+ customLivenessProbe: {}
+ ## @param metrics.customReadinessProbe Custom readinessProbe that overrides the default one
+ ##
+ customReadinessProbe: {}
+ ## @param metrics.customStartupProbe Custom startupProbe that overrides the default one
+ ##
+ customStartupProbe: {}
+ ## @param metrics.containerPorts.metrics PostgreSQL Prometheus exporter metrics container port
+ ##
+ containerPorts:
+ metrics: 9187
+ ## PostgreSQL Prometheus exporter resource requests and limits
+ ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ ## @param metrics.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if metrics.resources is set (metrics.resources is recommended for production).
+ ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
+ ##
+ resourcesPreset: "nano"
+ ## @param metrics.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
+ ## Example:
+ ## resources:
+ ## requests:
+ ## cpu: 2
+ ## memory: 512Mi
+ ## limits:
+ ## cpu: 3
+ ## memory: 1024Mi
+ ##
+ resources: {}
+ ## @param metrics.fips.openssl Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used
+ ## @param metrics.fips.golang Configure Golang FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used
+ ##
+ fips:
+ openssl: ""
+ golang: relaxed
+ ## Service configuration
+ ##
+ service:
+ ## @param metrics.service.ports.metrics PostgreSQL Prometheus Exporter service port
+ ##
+ ports:
+ metrics: 9187
+ ## @param metrics.service.clusterIP Static clusterIP or None for headless services
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
+ ##
+ clusterIP: ""
+ ## @param metrics.service.sessionAffinity Control where client requests go, to the same pod or round-robin. Allowed values: `ClientIP` or `None`
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/
+ ##
+ sessionAffinity: None
+ ## @param metrics.service.annotations [object] Annotations for Prometheus to auto-discover the metrics endpoint
+ ##
+ annotations:
+ prometheus.io/scrape: "true"
+ prometheus.io/port: "{{ .Values.metrics.service.ports.metrics }}"
+ ## Prometheus Operator ServiceMonitor configuration
+ ##
+ serviceMonitor:
+ ## @param metrics.serviceMonitor.enabled Create ServiceMonitor Resource for scraping metrics using Prometheus Operator
+ ##
+ enabled: false
+ ## @param metrics.serviceMonitor.namespace Namespace for the ServiceMonitor Resource (defaults to the Release Namespace)
+ ##
+ namespace: ""
+ ## @param metrics.serviceMonitor.interval Interval at which metrics should be scraped.
+ ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
+ ##
+ interval: ""
+ ## @param metrics.serviceMonitor.scrapeTimeout Timeout after which the scrape is ended
+ ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
+ ##
+ scrapeTimeout: ""
+ ## @param metrics.serviceMonitor.labels Additional labels that can be used so ServiceMonitor will be discovered by Prometheus
+ ##
+ labels: {}
+ ## @param metrics.serviceMonitor.selector Prometheus instance selector labels
+ ## ref: https://github.com/bitnami/charts/tree/main/bitnami/prometheus-operator#prometheus-configuration
+ ##
+ selector: {}
+ ## @param metrics.serviceMonitor.relabelings RelabelConfigs to apply to samples before scraping
+ ##
+ relabelings: []
+ ## @param metrics.serviceMonitor.metricRelabelings MetricRelabelConfigs to apply to samples before ingestion
+ ##
+ metricRelabelings: []
+ ## @param metrics.serviceMonitor.honorLabels Specify honorLabels parameter to add the scrape endpoint
+ ##
+ honorLabels: false
+ ## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus.
+ ##
+ jobLabel: ""
+ ## Custom PrometheusRule to be defined
+ ## The value is evaluated as a template, so, for example, the value can depend on .Release or .Chart
+ ## ref: https://github.com/coreos/prometheus-operator#customresourcedefinitions
+ ##
+ prometheusRule:
+ ## @param metrics.prometheusRule.enabled Create a PrometheusRule for Prometheus Operator
+ ##
+ enabled: false
+ ## @param metrics.prometheusRule.namespace Namespace for the PrometheusRule Resource (defaults to the Release Namespace)
+ ##
+ namespace: ""
+ ## @param metrics.prometheusRule.labels Additional labels that can be used so PrometheusRule will be discovered by Prometheus
+ ##
+ labels: {}
+ ## @param metrics.prometheusRule.rules PrometheusRule definitions
+ ## Make sure to constraint the rules to the current postgresql service.
+ ## rules:
+ ## - alert: HugeReplicationLag
+ ## expr: pg_replication_lag{service="{{ printf "%s-metrics" (include "postgresql.v1.chart.fullname" .) }}"} / 3600 > 1
+ ## for: 1m
+ ## labels:
+ ## severity: critical
+ ## annotations:
+ ## description: replication for {{ include "postgresql.v1.chart.fullname" . }} PostgreSQL is lagging by {{ "{{ $value }}" }} hour(s).
+ ## summary: PostgreSQL replication is lagging by {{ "{{ $value }}" }} hour(s).
+ ##
+ rules: []
diff --git a/charts/semaphore/ci/default-values.yaml b/charts/semaphore/ci/default-values.yaml
new file mode 100644
index 0000000..107e019
--- /dev/null
+++ b/charts/semaphore/ci/default-values.yaml
@@ -0,0 +1,5 @@
+---
+ingress:
+ enabled: true
+
+...
diff --git a/charts/semaphore/source.yaml b/charts/semaphore/source.yaml
new file mode 100644
index 0000000..7bbed11
--- /dev/null
+++ b/charts/semaphore/source.yaml
@@ -0,0 +1,6 @@
+---
+registry: docker.io
+image: semaphoreui/semaphore
+prerelease: false
+
+...
diff --git a/charts/semaphore/templates/_helpers.tpl b/charts/semaphore/templates/_helpers.tpl
new file mode 100644
index 0000000..5704c09
--- /dev/null
+++ b/charts/semaphore/templates/_helpers.tpl
@@ -0,0 +1,77 @@
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "semaphoreui.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "semaphoreui.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "semaphoreui.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create basic labels
+*/}}
+{{- define "semaphoreui.labels" -}}
+helm.sh/chart: "{{ include "semaphoreui.chart" . }}"
+app.kubernetes.io/name: "{{ include "semaphoreui.name" . }}"
+app.kubernetes.io/instance: "{{ .Release.Name }}"
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
+{{- with .Values.labels }}
+{{ toYaml . }}
+{{- end }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "semaphoreui.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+ {{ default (include "semaphoreui.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+ {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "semaphoreui.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "semaphoreui.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Database options
+*/}}
+{{- define "semaphoreui.databaseOptions" -}}
+{{- $options := .Values.database.options | default dict }}
+{{- if and (eq .Values.database.type "postgres") (not (hasKey $options "sslmode")) }}
+{{- $options = merge (dict "sslmode" "disable") $options }}
+{{- end }}
+{{- toYaml $options }}
+{{- end }}
diff --git a/charts/semaphore/templates/configmap.yaml b/charts/semaphore/templates/configmap.yaml
new file mode 100644
index 0000000..6d8efe2
--- /dev/null
+++ b/charts/semaphore/templates/configmap.yaml
@@ -0,0 +1,60 @@
+apiVersion: v1
+kind: ConfigMap
+
+metadata:
+ name: {{ include "semaphoreui.fullname" . }}-config
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+{{- if .Values.labels }}
+ {{- toYaml .Values.labels | nindent 4 }}
+{{- end }}
+{{- if .Values.annotations }}
+ annotations:
+ {{- toYaml .Values.annotations | nindent 4 }}
+{{- end }}
+
+data:
+ config.json: |
+ {
+ {{- $first := true }}
+
+ {{- if .Values.ldap.enable }}
+ "ldap_mappings": {
+ "dn": "{{ .Values.ldap.mappings.dn }}",
+ "mail": "{{ .Values.ldap.mappings.mail }}",
+ "uid": "{{ .Values.ldap.mappings.uid }}",
+ "cn": "{{ .Values.ldap.mappings.cn }}"
+ }
+ {{- $first = false }}
+ {{- end }}
+
+ {{- if .Values.oidc.enable }}
+ {{- if not $first }},{{ end }}
+ {{- $providers := dict }}
+ {{- range $provider, $values := .Values.oidc.providers }}
+ {{- $config := dict }}
+ {{- range $val := keys $values }}
+ {{- $_ := set $config ($val | snakecase) (get $values $val) }}
+ {{- end }}
+ {{- $_ := set $providers $provider $config }}
+ {{- end }}
+ "oidc_providers": {{ $providers | toJson }}
+ {{- $first = false }}
+ {{- end }}
+
+ {{- if .Values.config.forwarded_env_vars }}
+ {{- if not $first }},{{ end }}
+ "forwarded_env_vars": [
+ {{- range $index, $val := .Values.config.forwarded_env_vars }}
+ {{- if $index }}, {{ end }}"{{ $val }}"
+ {{- end }}]
+ {{- end }}
+ }
+
+ {{- if .Values.general.additionalPythonPackages }}
+ requirements.txt: |
+ {{- range .Values.general.additionalPythonPackages }}
+ {{ . }}
+ {{- end }}
+ {{- end }}
diff --git a/charts/semaphore/templates/deployment.yaml b/charts/semaphore/templates/deployment.yaml
new file mode 100644
index 0000000..d330050
--- /dev/null
+++ b/charts/semaphore/templates/deployment.yaml
@@ -0,0 +1,646 @@
+apiVersion: apps/v1
+kind: Deployment
+
+metadata:
+ name: {{ include "semaphoreui.fullname" . }}
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+{{- with .Values.annotation }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+{{- end }}
+
+spec:
+ replicas: {{ .Values.replicaCount }}
+ {{- if .Values.updateStrategy }}
+
+ strategy:
+ {{ toYaml .Values.updateStrategy | nindent 4 }}
+ {{- end }}
+
+ selector:
+ matchLabels:
+ {{- include "semaphoreui.selectorLabels" . | nindent 6 }}
+
+ template:
+ metadata:
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 8 }}
+ annotations:
+ checksum/config: {{ (include (print $.Template.BasePath "/configmap.yaml") . | fromYaml).data | toYaml | sha256sum }}
+ {{- if and (not .Values.admin.existingSecret) (.Values.admin.create) }}
+ checksum/secret-admin: {{ (include (print $.Template.BasePath "/secret-admin.yaml") . | fromYaml).data | toYaml | sha256sum }}
+ {{- end }}
+ {{- if and (not .Values.database.existingSecret) (ne .Values.database.type "bolt") }}
+ checksum/secret-database: {{ (include (print $.Template.BasePath "/secret-database.yaml") . | fromYaml).data | toYaml | sha256sum }}
+ {{- end }}
+ {{- if and (not .Values.email.existingSecret) (.Values.email.alert) }}
+ checksum/secret-email: {{ (include (print $.Template.BasePath "/secret-email.yaml") . | fromYaml).data | toYaml | sha256sum }}
+ {{- end }}
+ {{- if not .Values.secrets.existingSecret }}
+ checksum/secret-general: {{ (include (print $.Template.BasePath "/secret-general.yaml") . | fromYaml).data | toYaml | sha256sum }}
+ {{- end }}
+ {{- if and (not .Values.ldap.existingSecret) (.Values.ldap.enable) }}
+ checksum/secret-ldap: {{ (include (print $.Template.BasePath "/secret-ldap.yaml") . | fromYaml).data | toYaml | sha256sum }}
+ {{- end }}
+ {{- if not .Values.runner.existingSecret }}
+ checksum/secret-runner: {{ (include (print $.Template.BasePath "/secret-runner.yaml") . | fromYaml).data | toYaml | sha256sum }}
+ {{- end }}
+ {{- if and (not .Values.slack.existingSecret) (.Values.slack.alert) }}
+ checksum/secret-slack: {{ (include (print $.Template.BasePath "/secret-slack.yaml") . | fromYaml).data | toYaml | sha256sum }}
+ {{- end }}
+ {{- if and (not .Values.telegram.existingSecret) (.Values.telegram.alert) }}
+ checksum/secret-telegram: {{ (include (print $.Template.BasePath "/secret-telegram.yaml") . | fromYaml).data | toYaml | sha256sum }}
+ {{- end }}
+{{- if .Values.annotations }}
+ {{- toYaml .Values.annotations | nindent 8 }}
+{{- end }}
+
+ spec:
+ {{- if .Values.dnsConfig }}
+ dnsConfig:
+ {{- toYaml .Values.dnsConfig | nindent 8 }}
+
+ {{- end }}
+ serviceAccountName: {{ include "semaphoreui.serviceAccountName" . }}
+ {{- if .Values.image.pullSecrets }}
+
+ imagePullSecrets:
+ {{- range .Values.image.pullSecrets }}
+ - name: {{ . }}
+ {{- end }}
+ {{- end }}
+ {{- with .Values.securityContext }}
+
+ securityContext:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- if or .Values.admin.create .Values.extraInitContainers .Values.customCertificates.enabled }}
+
+ initContainers:
+ {{- if .Values.customCertificates.enabled }}
+ - name: custom-ca-bundle
+ image: {{ .Values.image.repository }}:{{ .Values.image.tag | default (printf "v%s" .Chart.AppVersion) }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ {{- with .Values.podSecurityContext }}
+
+ securityContext:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
+
+ command:
+ - sh
+ - -c
+ - |
+ set -e
+ cp /etc/ssl/certs/ca-certificates.crt /work/ca-certificates.crt
+ printf '\n' >> /work/ca-certificates.crt
+ cat /custom-ca/{{ .Values.customCertificates.key }} >> /work/ca-certificates.crt
+
+ volumeMounts:
+ - name: custom-ca-src
+ mountPath: /custom-ca
+ readOnly: true
+ - name: custom-ca-bundle
+ mountPath: /work
+ {{- end }}
+ {{- if or .Values.admin.create }}
+ - name: admin
+ image: {{ .Values.image.repository }}:{{ .Values.image.tag | default (printf "v%s" .Chart.AppVersion) }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ {{- with .Values.podSecurityContext }}
+
+ securityContext:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
+
+ command:
+ - sh
+ - -c
+ - |
+ if ! semaphore user get --config=/etc/semaphore/config.json --login $(SEMAPHORE_ADMIN_USERNAME) >/dev/null; then
+ semaphore user add \
+ --config=/etc/semaphore/config.json \
+ --admin \
+ --name=$(SEMAPHORE_ADMIN_FULLNAME) \
+ --login=$(SEMAPHORE_ADMIN_USERNAME) \
+ --password=$(SEMAPHORE_ADMIN_PASSWORD) \
+ --email=$(SEMAPHORE_ADMIN_EMAIL)
+ else
+ echo "Admin already extists"
+ fi
+
+ env:
+ - name: SEMAPHORE_ADMIN_FULLNAME
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.admin.existingSecret | default (printf "%s-admin" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.admin.fullnameKey }}
+ - name: SEMAPHORE_ADMIN_USERNAME
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.admin.existingSecret | default (printf "%s-admin" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.admin.usernameKey }}
+ - name: SEMAPHORE_ADMIN_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.admin.existingSecret | default (printf "%s-admin" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.admin.passwordKey }}
+ - name: SEMAPHORE_ADMIN_EMAIL
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.admin.existingSecret | default (printf "%s-admin" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.admin.emailKey }}
+ - name: SEMAPHORE_PORT
+ value: {{ .Values.service.internalPort | quote }}
+ {{- if not (empty .Values.general.host) }}
+ - name: SEMAPHORE_WEB_ROOT
+ value: {{ .Values.general.host | quote }}
+ {{- end }}
+ - name: SEMAPHORE_GIT_CLIENT
+ value: {{ .Values.general.gitClient | quote }}
+ - name: SEMAPHORE_TMP_PATH
+ value: {{ .Values.general.tmpPath | quote }}
+ - name: SEMAPHORE_SSH_PATH
+ value: {{ .Values.general.sshConfigPath | quote }}
+ - name: SEMAPHORE_MAX_PARALLEL_TASKS
+ value: {{ .Values.general.maxParallelTasks | quote }}
+ - name: SEMAPHORE_PASSWORD_LOGIN_DISABLED
+ value: {{ .Values.general.passwordLoginDisable | quote }}
+ - name: SEMAPHORE_NON_ADMIN_CAN_CREATE_PROJECT
+ value: {{ .Values.general.nonAdminCanCreateProject | quote }}
+ - name: SEMAPHORE_USE_REMOTE_RUNNER
+ value: {{ .Values.general.useRemoteRunner | quote }}
+ - name: SEMAPHORE_DB_DIALECT
+ value: {{ .Values.database.type | quote }}
+ {{- if eq .Values.database.type "bolt" }}
+ - name: SEMAPHORE_DB_HOST
+ value: {{ .Values.database.path | quote }}
+ {{- else }}
+ - name: SEMAPHORE_DB_HOST
+ value: {{ .Values.database.host | quote }}
+ - name: SEMAPHORE_DB_PORT
+ value: {{ .Values.database.port | quote }}
+ - name: SEMAPHORE_DB
+ value: {{ .Values.database.name | quote }}
+ {{- if .Values.database.usernameFromSecret }}
+ - name: SEMAPHORE_DB_USER
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.database.existingSecret | default (printf "%s-database" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.database.usernameKey }}
+ {{- else }}
+ - name: SEMAPHORE_DB_USER
+ value: {{ .Values.database.username | quote }}
+ {{- end }}
+ - name: SEMAPHORE_DB_PASS
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.database.existingSecret | default (printf "%s-database" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.database.passwordKey }}
+ {{- end }}
+ {{- if .Values.database.options }}
+ - name: SEMAPHORE_DB_OPTIONS
+ value: {{ .Values.database.options | toJson | quote }}
+ {{- end }}
+ - name: SEMAPHORE_LDAP_ENABLE
+ value: {{ .Values.ldap.enable | quote }}
+ {{- if .Values.ldap.enable }}
+ - name: SEMAPHORE_LDAP_SERVER
+ value: {{ .Values.ldap.server | quote }}
+ - name: SEMAPHORE_LDAP_NEEDTLS
+ value: {{ .Values.ldap.needtls | quote }}
+ - name: SEMAPHORE_LDAP_SEARCH_DN
+ value: {{ .Values.ldap.searchdn | quote }}
+ - name: SEMAPHORE_LDAP_SEARCH_FILTER
+ value: {{ .Values.ldap.filter | quote }}
+ - name: SEMAPHORE_LDAP_BIND_DN
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.ldap.existingSecret | default (printf "%s-ldap" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.ldap.binddnKey }}
+ - name: SEMAPHORE_LDAP_BIND_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.ldap.existingSecret | default (printf "%s-ldap" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.ldap.passwordKey }}
+ {{- end }}
+ - name: SEMAPHORE_EMAIL_ALERT
+ value: {{ .Values.email.alert | quote }}
+ {{- if .Values.email.alert }}
+ - name: SEMAPHORE_EMAIL_SENDER
+ value: {{ .Values.email.sender | quote }}
+ - name: SEMAPHORE_EMAIL_HOST
+ value: {{ .Values.email.host | quote }}
+ - name: SEMAPHORE_EMAIL_PORT
+ value: {{ .Values.email.port | quote }}
+ - name: SEMAPHORE_EMAIL_SECURE
+ value: {{ .Values.email.secure | quote }}
+ - name: SEMAPHORE_EMAIL_USERNAME
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.email.existingSecret | default (printf "%s-email" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.email.usernameKey }}
+ - name: SEMAPHORE_EMAIL_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.email.existingSecret | default (printf "%s-email" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.email.passwordKey }}
+ {{- end }}
+ - name: SEMAPHORE_TELEGRAM_ALERT
+ value: {{ .Values.telegram.alert | quote }}
+ {{- if .Values.telegram.alert }}
+ - name: SEMAPHORE_TELEGRAM_CHAT
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.telegram.existingSecret | default (printf "%s-telegram" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.telegram.chatKey }}
+ - name: SEMAPHORE_TELEGRAM_TOKEN
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.telegram.existingSecret | default (printf "%s-telegram" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.telegram.tokenKey }}
+ {{- end }}
+ - name: SEMAPHORE_SLACK_ALERT
+ value: {{ .Values.slack.alert | quote }}
+ {{- if .Values.slack.alert }}
+ - name: SEMAPHORE_SLACK_URL
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.slack.existingSecret | default (printf "%s-slack" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.slack.urlKey }}
+ {{- end }}
+ - name: SEMAPHORE_RUNNER_REGISTRATION_TOKEN
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.runner.existingSecret | default (printf "%s-runner" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.runner.tokenKey }}
+ - name: SEMAPHORE_COOKIE_HASH
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.secrets.existingSecret | default (printf "%s-general" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.secrets.cookieHashKey }}
+ - name: SEMAPHORE_COOKIE_ENCRYPTION
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.secrets.existingSecret | default (printf "%s-general" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.secrets.cookieEncryptionKey }}
+ - name: SEMAPHORE_ACCESS_KEY_ENCRYPTION
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.secrets.existingSecret | default (printf "%s-general" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.secrets.accesskeyEncryptionKey }}
+ {{- if .Values.customCertificates.enabled }}
+ - name: SSL_CERT_FILE
+ value: {{ .Values.customCertificates.mountPath | quote }}
+ - name: REQUESTS_CA_BUNDLE
+ value: {{ .Values.customCertificates.mountPath | quote }}
+ - name: GIT_SSL_CAINFO
+ value: {{ .Values.customCertificates.mountPath | quote }}
+ {{- end }}
+ {{- if or .Values.extraEnvSecrets .Values.extraEnvVariables }}
+ {{- range $key, $value := .Values.extraEnvSecrets }}
+ - name: {{ $key }}
+ valueFrom:
+ secretKeyRef:
+ name: {{ required "Must specify secret!" $value.secret }}
+ key: {{ required "Must specify key!" $value.key }}
+ {{- end }}
+ {{- range $key, $value := .Values.extraEnvVariables }}
+ - name: {{ $key }}
+ value: "{{ $value }}"
+ {{- end }}
+ {{- end }}
+ {{- if or .Values.envFromSecrets .Values.envFromConfigMaps }}
+
+ envFrom:
+ {{- range $name := .Values.envFromSecrets }}
+ - secretRef:
+ name: {{ $name }}
+ {{- end }}
+ {{- range $name := .Values.envFromConfigMaps }}
+ - configMapRef:
+ name: {{ $name }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.resources }}
+
+ resources:
+ {{- toYaml .Values.resources | nindent 12 }}
+ {{- end }}
+
+ volumeMounts:
+ - name: config
+ mountPath: /etc/semaphore/config.json
+ subPath: config.json
+ {{- if .Values.customCertificates.enabled }}
+ - name: custom-ca-bundle
+ mountPath: {{ .Values.customCertificates.mountPath | quote }}
+ subPath: ca-certificates.crt
+ readOnly: true
+ {{- end }}
+ - name: workdir
+ mountPath: {{ .Values.general.tmpPath }}
+ {{- if eq .Values.database.type "bolt" }}
+ - name: boltdb
+ mountPath: {{ .Values.database.path | dir }}
+ {{- end }}
+ {{- if .Values.general.additionalPythonPackages }}
+ - name: config
+ mountPath: /etc/semaphore/requirements.txt
+ subPath: requirements.txt
+ {{- end }}
+ {{- if .Values.extraVolumeMounts }}
+ {{- toYaml .Values.extraVolumeMounts | nindent 12 }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.extraInitContainers }}
+ {{- toYaml .Values.extraInitContainers | nindent 8 }}
+ {{- end }}
+ {{- end }}
+
+ containers:
+ - name: {{ .Chart.Name }}
+ image: {{ .Values.image.repository }}:{{ .Values.image.tag | default (printf "v%s" .Chart.AppVersion) }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ {{- with .Values.podSecurityContext }}
+
+ securityContext:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
+
+ env:
+ - name: SEMAPHORE_PORT
+ value: {{ .Values.service.internalPort | quote }}
+ {{- if not (empty .Values.general.host) }}
+ - name: SEMAPHORE_WEB_ROOT
+ value: {{ .Values.general.host | quote }}
+ {{- end }}
+ - name: SEMAPHORE_GIT_CLIENT
+ value: {{ .Values.general.gitClient | quote }}
+ - name: SEMAPHORE_TMP_PATH
+ value: {{ .Values.general.tmpPath | quote }}
+ - name: SEMAPHORE_MAX_PARALLEL_TASKS
+ value: {{ .Values.general.maxParallelTasks | quote }}
+ - name: SEMAPHORE_PASSWORD_LOGIN_DISABLED
+ value: {{ .Values.general.passwordLoginDisable | quote }}
+ - name: SEMAPHORE_NON_ADMIN_CAN_CREATE_PROJECT
+ value: {{ .Values.general.nonAdminCanCreateProject | quote }}
+ - name: SEMAPHORE_USE_REMOTE_RUNNER
+ value: {{ .Values.general.useRemoteRunner | quote }}
+ - name: SEMAPHORE_DB_DIALECT
+ value: {{ .Values.database.type | quote }}
+ {{- if eq .Values.database.type "bolt" }}
+ - name: SEMAPHORE_DB_HOST
+ value: {{ .Values.database.path | quote }}
+ {{- else }}
+ - name: SEMAPHORE_DB_HOST
+ value: {{ .Values.database.host | quote }}
+ - name: SEMAPHORE_DB_PORT
+ value: {{ .Values.database.port | quote }}
+ - name: SEMAPHORE_DB
+ value: {{ .Values.database.name | quote }}
+ {{- if .Values.database.usernameFromSecret }}
+ - name: SEMAPHORE_DB_USER
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.database.existingSecret | default (printf "%s-database" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.database.usernameKey }}
+ {{- else }}
+ - name: SEMAPHORE_DB_USER
+ value: {{ .Values.database.username | quote }}
+ {{- end }}
+ - name: SEMAPHORE_DB_PASS
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.database.existingSecret | default (printf "%s-database" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.database.passwordKey }}
+ {{- end }}
+ {{- with include "semaphoreui.databaseOptions" . | fromYaml }}
+ {{- if . }}
+ - name: SEMAPHORE_DB_OPTIONS
+ value: {{ . | toJson | quote }}
+ {{- end }}
+ {{- end }}
+ - name: SEMAPHORE_LDAP_ENABLE
+ value: {{ .Values.ldap.enable | quote }}
+ {{- if .Values.ldap.enable }}
+ - name: SEMAPHORE_LDAP_SERVER
+ value: {{ .Values.ldap.server | quote }}
+ - name: SEMAPHORE_LDAP_NEEDTLS
+ value: {{ .Values.ldap.needtls | quote }}
+ - name: SEMAPHORE_LDAP_SEARCH_DN
+ value: {{ .Values.ldap.searchdn | quote }}
+ - name: SEMAPHORE_LDAP_SEARCH_FILTER
+ value: {{ .Values.ldap.filter | quote }}
+ - name: SEMAPHORE_LDAP_BIND_DN
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.ldap.existingSecret | default (printf "%s-ldap" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.ldap.binddnKey }}
+ - name: SEMAPHORE_LDAP_BIND_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.ldap.existingSecret | default (printf "%s-ldap" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.ldap.passwordKey }}
+ {{- end }}
+ - name: SEMAPHORE_EMAIL_ALERT
+ value: {{ .Values.email.alert | quote }}
+ {{- if .Values.email.alert }}
+ - name: SEMAPHORE_EMAIL_SENDER
+ value: {{ .Values.email.sender | quote }}
+ - name: SEMAPHORE_EMAIL_HOST
+ value: {{ .Values.email.host | quote }}
+ - name: SEMAPHORE_EMAIL_PORT
+ value: {{ .Values.email.port | quote }}
+ - name: SEMAPHORE_EMAIL_SECURE
+ value: {{ .Values.email.secure | quote }}
+ - name: SEMAPHORE_EMAIL_USERNAME
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.email.existingSecret | default (printf "%s-email" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.email.usernameKey }}
+ - name: SEMAPHORE_EMAIL_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.email.existingSecret | default (printf "%s-email" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.email.passwordKey }}
+ {{- end }}
+ - name: SEMAPHORE_TELEGRAM_ALERT
+ value: {{ .Values.telegram.alert | quote }}
+ {{- if .Values.telegram.alert }}
+ - name: SEMAPHORE_TELEGRAM_CHAT
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.telegram.existingSecret | default (printf "%s-telegram" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.telegram.chatKey }}
+ - name: SEMAPHORE_TELEGRAM_TOKEN
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.telegram.existingSecret | default (printf "%s-telegram" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.telegram.tokenKey }}
+ {{- end }}
+ - name: SEMAPHORE_SLACK_ALERT
+ value: {{ .Values.slack.alert | quote }}
+ {{- if .Values.slack.alert }}
+ - name: SEMAPHORE_SLACK_URL
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.slack.existingSecret | default (printf "%s-slack" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.slack.urlKey }}
+ {{- end }}
+ - name: SEMAPHORE_RUNNER_REGISTRATION_TOKEN
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.runner.existingSecret | default (printf "%s-runner" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.runner.tokenKey }}
+ - name: SEMAPHORE_COOKIE_HASH
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.secrets.existingSecret | default (printf "%s-general" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.secrets.cookieHashKey }}
+ - name: SEMAPHORE_COOKIE_ENCRYPTION
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.secrets.existingSecret | default (printf "%s-general" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.secrets.cookieEncryptionKey }}
+ - name: SEMAPHORE_ACCESS_KEY_ENCRYPTION
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Values.secrets.existingSecret | default (printf "%s-general" (include "semaphoreui.fullname" .)) }}
+ key: {{ .Values.secrets.accesskeyEncryptionKey }}
+ {{- if .Values.customCertificates.enabled }}
+ - name: SSL_CERT_FILE
+ value: {{ .Values.customCertificates.mountPath | quote }}
+ - name: REQUESTS_CA_BUNDLE
+ value: {{ .Values.customCertificates.mountPath | quote }}
+ - name: GIT_SSL_CAINFO
+ value: {{ .Values.customCertificates.mountPath | quote }}
+ {{- end }}
+ {{- if or .Values.extraEnvSecrets .Values.extraEnvVariables }}
+ {{- range $key, $value := .Values.extraEnvSecrets }}
+ - name: {{ $key }}
+ valueFrom:
+ secretKeyRef:
+ name: {{ required "Must specify secret!" $value.secret }}
+ key: {{ required "Must specify key!" $value.key }}
+ {{- end }}
+ {{- range $key, $value := .Values.extraEnvVariables }}
+ - name: {{ $key }}
+ value: "{{ $value }}"
+ {{- end }}
+ {{- end }}
+ {{- if or .Values.envFromSecrets .Values.envFromConfigMaps }}
+
+ envFrom:
+ {{- range $name := .Values.envFromSecrets }}
+ - secretRef:
+ name: {{ $name }}
+ {{- end }}
+ {{- range $name := .Values.envFromConfigMaps }}
+ - configMapRef:
+ name: {{ $name }}
+ {{- end }}
+ {{- end }}
+
+ ports:
+ - name: http
+ containerPort: {{ .Values.service.internalPort }}
+ protocol: TCP
+
+ livenessProbe:
+ httpGet:
+ path: /
+ port: http
+
+ readinessProbe:
+ httpGet:
+ path: /
+ port: http
+ {{- if .Values.resources }}
+
+ resources:
+ {{- toYaml .Values.resources | nindent 12 }}
+ {{- end }}
+
+ volumeMounts:
+ - name: config
+ mountPath: /etc/semaphore/config.json
+ subPath: config.json
+ {{- if .Values.customCertificates.enabled }}
+ - name: custom-ca-bundle
+ mountPath: {{ .Values.customCertificates.mountPath | quote }}
+ subPath: ca-certificates.crt
+ readOnly: true
+ {{- end }}
+ - name: workdir
+ mountPath: {{ .Values.general.tmpPath }}
+ {{- if eq .Values.database.type "bolt" }}
+ - name: boltdb
+ mountPath: {{ .Values.database.path | dir }}
+ {{- end }}
+ {{- if .Values.general.additionalPythonPackages }}
+ - name: config
+ mountPath: /etc/semaphore/requirements.txt
+ subPath: requirements.txt
+ {{- end }}
+ {{- if .Values.extraVolumeMounts }}
+ {{- toYaml .Values.extraVolumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.extraSidecarContainers }}
+ {{- toYaml .Values.extraSidecarContainers | nindent 8 }}
+ {{- end }}
+ {{- if .Values.nodeSelector }}
+
+ nodeSelector:
+ {{ toYaml .Values.nodeSelector | nindent 8 }}
+ {{- end }}
+ {{- with .Values.affinity }}
+
+ affinity:
+ {{ toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+
+ tolerations:
+ {{ toYaml . | nindent 8 }}
+ {{- end }}
+
+ volumes:
+ - name: config
+ configMap:
+ name: {{ include "semaphoreui.fullname" . }}-config
+ {{- if .Values.customCertificates.enabled }}
+ - name: custom-ca-src
+ {{- if .Values.customCertificates.existingSecret }}
+ secret:
+ secretName: {{ .Values.customCertificates.existingSecret }}
+ {{- else if .Values.customCertificates.existingConfigMap }}
+ configMap:
+ name: {{ .Values.customCertificates.existingConfigMap }}
+ {{- else }}
+ {{- required "customCertificates.existingSecret or customCertificates.existingConfigMap is required when customCertificates.enabled=true" "" }}
+ {{- end }}
+ - name: custom-ca-bundle
+ emptyDir: {}
+ {{- end }}
+ - name: workdir
+ {{- if .Values.persistence.enabled }}
+ persistentVolumeClaim:
+ claimName: {{ .Values.persistence.existingClaim | default (printf "%s-workdir" (include "semaphoreui.fullname" .)) }}
+ {{- else }}
+ emptyDir: {}
+ {{- end }}
+ {{- if eq .Values.database.type "bolt" }}
+ - name: boltdb
+ {{- if .Values.database.persistence.enabled }}
+ persistentVolumeClaim:
+ claimName: {{ .Values.database.persistence.existingClaim | default (printf "%s-boltdb" (include "semaphoreui.fullname" .)) }}
+ {{- else }}
+ emptyDir: {}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.extraVolumes }}
+ {{- toYaml .Values.extraVolumes | nindent 8 }}
+ {{- end }}
diff --git a/charts/semaphore/templates/ingress.yaml b/charts/semaphore/templates/ingress.yaml
new file mode 100644
index 0000000..f6996ec
--- /dev/null
+++ b/charts/semaphore/templates/ingress.yaml
@@ -0,0 +1,50 @@
+{{- if .Values.ingress.enabled -}}
+{{- $serviceName := print (include "semaphoreui.fullname" .) }}
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+
+metadata:
+ name: {{ include "semaphoreui.fullname" . }}
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+{{- if .Values.ingress.labels }}
+ {{- toYaml .Values.ingress.labels | nindent 4 }}
+{{- end }}
+{{- if .Values.ingress.annotations }}
+ annotations:
+ {{- toYaml .Values.ingress.annotations | nindent 4 }}
+{{- end }}
+
+spec:
+ {{- if .Values.ingress.className }}
+ ingressClassName: {{ .Values.ingress.className }}
+ {{- end }}
+ {{- if .Values.ingress.tls }}
+ tls:
+ {{- range .Values.ingress.tls }}
+ - secretName: {{ .secretName }}
+ {{- if .hosts }}
+ hosts:
+ {{- range .hosts }}
+ - {{ . | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ rules:
+ {{- range .Values.ingress.hosts }}
+ - host: {{ .host }}
+ http:
+ paths:
+ {{- range .paths }}
+ - path: {{ .path }}
+ pathType: {{ .pathType }}
+ backend:
+ service:
+ name: {{ $serviceName }}
+ port:
+ name: http
+ {{- end }}
+ {{- end }}
+{{- end }}
diff --git a/charts/semaphore/templates/pvc.yaml b/charts/semaphore/templates/pvc.yaml
new file mode 100644
index 0000000..268dbbc
--- /dev/null
+++ b/charts/semaphore/templates/pvc.yaml
@@ -0,0 +1,64 @@
+{{- if and (not .Values.database.persistence.existingClaim) (.Values.database.persistence.enabled) (eq .Values.database.type "bolt") }}
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+
+metadata:
+ name: {{ include "semaphoreui.fullname" . }}-boltdb
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+{{- if .Values.labels }}
+ {{- toYaml .Values.labels | nindent 4 }}
+{{- end }}
+{{- if .Values.annotations }}
+ annotations:
+ {{- toYaml .Values.annotations | nindent 4 }}
+{{- end }}
+
+spec:
+ {{- if not (empty .Values.database.persistence.storageClass) }}
+ storageClassName: {{ .Values.database.persistence.storageClass }}
+
+ {{- end }}
+ accessModes:
+ {{- range .Values.database.persistence.accessModes }}
+ - {{ . | quote }}
+ {{- end }}
+
+ resources:
+ requests:
+ storage: {{ .Values.database.persistence.size | quote }}
+{{- end }}
+{{- if and (not .Values.persistence.existingClaim) (.Values.persistence.enabled) }}
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+
+metadata:
+ name: {{ include "semaphoreui.fullname" . }}-workdir
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+{{- if .Values.labels }}
+ {{- toYaml .Values.labels | nindent 4 }}
+{{- end }}
+{{- if .Values.annotations }}
+ annotations:
+ {{- toYaml .Values.annotations | nindent 4 }}
+{{- end }}
+
+spec:
+ {{- if not (empty .Values.persistence.storageClass) }}
+ storageClassName: {{ .Values.persistence.storageClass }}
+
+ {{- end }}
+ accessModes:
+ {{- range .Values.persistence.accessModes }}
+ - {{ . | quote }}
+ {{- end }}
+
+ resources:
+ requests:
+ storage: {{ .Values.persistence.size | quote }}
+{{- end }}
diff --git a/charts/semaphore/templates/secret-admin.yaml b/charts/semaphore/templates/secret-admin.yaml
new file mode 100644
index 0000000..39c7582
--- /dev/null
+++ b/charts/semaphore/templates/secret-admin.yaml
@@ -0,0 +1,29 @@
+{{- if and (not .Values.admin.existingSecret) (.Values.admin.create) }}
+---
+apiVersion: v1
+kind: Secret
+
+metadata:
+ name: {{ include "semaphoreui.fullname" . }}-admin
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+{{- if .Values.labels }}
+ {{- toYaml .Values.labels | nindent 4 }}
+{{- end }}
+{{- if .Values.annotations }}
+ annotations:
+ {{- toYaml .Values.annotations | nindent 4 }}
+{{- end }}
+
+type: Opaque
+data:
+ {{- $adminSecretName := printf "%s-admin" (include "semaphoreui.fullname" .) }}
+ {{- $adminSecretObj := (lookup "v1" "Secret" .Release.Namespace $adminSecretName) | default dict }}
+ {{- $adminSecretData := (get $adminSecretObj "data") | default dict }}
+ {{- $adminPassword := (get $adminSecretData .Values.admin.passwordKey) | default (randAlphaNum 32) }}
+ {{ .Values.admin.fullnameKey }}: {{ .Values.admin.fullname | b64enc }}
+ {{ .Values.admin.usernameKey }}: {{ .Values.admin.username | b64enc }}
+ {{ .Values.admin.passwordKey }}: {{ .Values.admin.password | default ($adminPassword) | b64enc }}
+ {{ .Values.admin.emailKey }}: {{ .Values.admin.email | b64enc }}
+{{- end }}
diff --git a/charts/semaphore/templates/secret-database.yaml b/charts/semaphore/templates/secret-database.yaml
new file mode 100644
index 0000000..b1e823c
--- /dev/null
+++ b/charts/semaphore/templates/secret-database.yaml
@@ -0,0 +1,23 @@
+{{- if and (not .Values.database.existingSecret) (ne .Values.database.type "bolt") }}
+---
+apiVersion: v1
+kind: Secret
+
+metadata:
+ name: {{ include "semaphoreui.fullname" . }}-database
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+{{- if .Values.labels }}
+ {{- toYaml .Values.labels | nindent 4 }}
+{{- end }}
+{{- if .Values.annotations }}
+ annotations:
+ {{- toYaml .Values.annotations | nindent 4 }}
+{{- end }}
+
+type: Opaque
+data:
+ {{ .Values.database.usernameKey }}: {{ .Values.database.username | b64enc }}
+ {{ .Values.database.passwordKey }}: {{ .Values.database.password | b64enc }}
+{{- end }}
diff --git a/charts/semaphore/templates/secret-email.yaml b/charts/semaphore/templates/secret-email.yaml
new file mode 100644
index 0000000..acc2bc1
--- /dev/null
+++ b/charts/semaphore/templates/secret-email.yaml
@@ -0,0 +1,23 @@
+{{- if and (not .Values.email.existingSecret) (.Values.email.alert) }}
+---
+apiVersion: v1
+kind: Secret
+
+metadata:
+ name: {{ include "semaphoreui.fullname" . }}-email
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+{{- if .Values.labels }}
+ {{- toYaml .Values.labels | nindent 4 }}
+{{- end }}
+{{- if .Values.annotations }}
+ annotations:
+ {{- toYaml .Values.annotations | nindent 4 }}
+{{- end }}
+
+type: Opaque
+data:
+ {{ .Values.email.usernameKey }}: {{ .Values.email.username | b64enc }}
+ {{ .Values.email.passwordKey }}: {{ .Values.email.password | b64enc }}
+{{- end }}
diff --git a/charts/semaphore/templates/secret-general.yaml b/charts/semaphore/templates/secret-general.yaml
new file mode 100644
index 0000000..be61472
--- /dev/null
+++ b/charts/semaphore/templates/secret-general.yaml
@@ -0,0 +1,30 @@
+{{- if not .Values.secrets.existingSecret }}
+---
+apiVersion: v1
+kind: Secret
+
+metadata:
+ name: {{ include "semaphoreui.fullname" . }}-general
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+{{- if .Values.labels }}
+ {{- toYaml .Values.labels | nindent 4 }}
+{{- end }}
+{{- if .Values.annotations }}
+ annotations:
+ {{- toYaml .Values.annotations | nindent 4 }}
+{{- end }}
+
+type: Opaque
+data:
+ {{- $generalSecretName := printf "%s-general" (include "semaphoreui.fullname" .) }}
+ {{- $generalSecretObj := (lookup "v1" "Secret" .Release.Namespace $generalSecretName) | default dict }}
+ {{- $generalSecretData := (get $generalSecretObj "data") | default dict }}
+ {{- $cookieHash := (get $generalSecretData .Values.secrets.cookieHashKey) | default (randAlphaNum 32 | b64enc | b64enc) }}
+ {{ .Values.secrets.cookieHashKey }}: {{ .Values.secrets.cookieHash | default ($cookieHash) }}
+ {{- $cookieEncryptionKey := (get $generalSecretData .Values.secrets.cookieEncryptionKey) | default (randAlphaNum 32 | b64enc | b64enc) }}
+ {{ .Values.secrets.cookieEncryptionKey }}: {{ .Values.secrets.cookieEncryption | default ($cookieEncryptionKey) }}
+ {{- $accesskeyEncryptionKey := (get $generalSecretData .Values.secrets.accesskeyEncryptionKey) | default (randAlphaNum 32 | b64enc | b64enc) }}
+ {{ .Values.secrets.accesskeyEncryptionKey }}: {{ .Values.secrets.accesskeyEncryption | default ($accesskeyEncryptionKey) }}
+{{- end }}
diff --git a/charts/semaphore/templates/secret-ldap.yaml b/charts/semaphore/templates/secret-ldap.yaml
new file mode 100644
index 0000000..da0c7c5
--- /dev/null
+++ b/charts/semaphore/templates/secret-ldap.yaml
@@ -0,0 +1,23 @@
+{{- if and (not .Values.ldap.existingSecret) (.Values.ldap.enable) }}
+---
+apiVersion: v1
+kind: Secret
+
+metadata:
+ name: {{ include "semaphoreui.fullname" . }}-ldap
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+{{- if .Values.labels }}
+ {{- toYaml .Values.labels | nindent 4 }}
+{{- end }}
+{{- if .Values.annotations }}
+ annotations:
+ {{- toYaml .Values.annotations | nindent 4 }}
+{{- end }}
+
+type: Opaque
+data:
+ {{ .Values.ldap.binddnKey }}: {{ .Values.ldap.binddn | b64enc }}
+ {{ .Values.ldap.passwordKey }}: {{ .Values.ldap.password | b64enc }}
+{{- end }}
diff --git a/charts/semaphore/templates/secret-runner.yaml b/charts/semaphore/templates/secret-runner.yaml
new file mode 100644
index 0000000..022fc7a
--- /dev/null
+++ b/charts/semaphore/templates/secret-runner.yaml
@@ -0,0 +1,26 @@
+{{- if not .Values.runner.existingSecret }}
+---
+apiVersion: v1
+kind: Secret
+
+metadata:
+ name: {{ include "semaphoreui.fullname" . }}-runner
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+{{- if .Values.labels }}
+ {{- toYaml .Values.labels | nindent 4 }}
+{{- end }}
+{{- if .Values.annotations }}
+ annotations:
+ {{- toYaml .Values.annotations | nindent 4 }}
+{{- end }}
+
+type: Opaque
+data:
+ {{- $runnerSecretName := printf "%s-runner" (include "semaphoreui.fullname" .) }}
+ {{- $runnerSecretObj := (lookup "v1" "Secret" .Release.Namespace $runnerSecretName) | default dict }}
+ {{- $runnerSecretData := (get $runnerSecretObj "data") | default dict }}
+ {{- $token := (get $runnerSecretData .Values.runner.tokenKey) | default (randAlphaNum 32 | b64enc) }}
+ {{ .Values.runner.tokenKey }}: {{ .Values.runner.token | default ($token) }}
+{{- end }}
diff --git a/charts/semaphore/templates/secret-slack.yaml b/charts/semaphore/templates/secret-slack.yaml
new file mode 100644
index 0000000..6f7ff7d
--- /dev/null
+++ b/charts/semaphore/templates/secret-slack.yaml
@@ -0,0 +1,22 @@
+{{- if and (not .Values.slack.existingSecret) (.Values.slack.alert) }}
+---
+apiVersion: v1
+kind: Secret
+
+metadata:
+ name: {{ include "semaphoreui.fullname" . }}-slack
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+{{- if .Values.labels }}
+ {{- toYaml .Values.labels | nindent 4 }}
+{{- end }}
+{{- if .Values.annotations }}
+ annotations:
+ {{- toYaml .Values.annotations | nindent 4 }}
+{{- end }}
+
+type: Opaque
+data:
+ {{ .Values.slack.urlKey }}: {{ .Values.slack.url | b64enc }}
+{{- end }}
diff --git a/charts/semaphore/templates/secret-telegram.yaml b/charts/semaphore/templates/secret-telegram.yaml
new file mode 100644
index 0000000..7b31c66
--- /dev/null
+++ b/charts/semaphore/templates/secret-telegram.yaml
@@ -0,0 +1,23 @@
+{{- if and (not .Values.telegram.existingSecret) (.Values.telegram.alert) }}
+---
+apiVersion: v1
+kind: Secret
+
+metadata:
+ name: {{ include "semaphoreui.fullname" . }}-telegram
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+{{- if .Values.labels }}
+ {{- toYaml .Values.labels | nindent 4 }}
+{{- end }}
+{{- if .Values.annotations }}
+ annotations:
+ {{- toYaml .Values.annotations | nindent 4 }}
+{{- end }}
+
+type: Opaque
+data:
+ {{ .Values.telegram.chatKey }}: {{ .Values.telegram.chat | b64enc }}
+ {{ .Values.telegram.tokenKey }}: {{ .Values.telegram.token | b64enc }}
+{{- end }}
diff --git a/charts/semaphore/templates/service.yaml b/charts/semaphore/templates/service.yaml
new file mode 100644
index 0000000..820bbd3
--- /dev/null
+++ b/charts/semaphore/templates/service.yaml
@@ -0,0 +1,27 @@
+apiVersion: v1
+kind: Service
+
+metadata:
+ name: {{ template "semaphoreui.fullname" . }}
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+{{- if .Values.service.labels }}
+ {{- toYaml .Values.service.labels | nindent 4 }}
+{{- end }}
+{{- if .Values.service.annotations }}
+ annotations:
+ {{- toYaml .Values.service.annotations | nindent 4 }}
+{{- end }}
+
+spec:
+ type: {{ .Values.service.type }}
+
+ ports:
+ - name: http
+ port: {{ .Values.service.port }}
+ targetPort: http
+ protocol: TCP
+
+ selector:
+ {{- include "semaphoreui.selectorLabels" . | nindent 4 }}
diff --git a/charts/semaphore/templates/serviceaccount.yaml b/charts/semaphore/templates/serviceaccount.yaml
new file mode 100644
index 0000000..afc4d39
--- /dev/null
+++ b/charts/semaphore/templates/serviceaccount.yaml
@@ -0,0 +1,14 @@
+{{- if .Values.serviceAccount.create -}}
+apiVersion: v1
+kind: ServiceAccount
+
+metadata:
+ name: {{ template "semaphoreui.serviceAccountName" . }}
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+{{- with .Values.serviceAccount.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+{{- end }}
+{{- end -}}
diff --git a/charts/semaphore/templates/tests/test-connection.yaml b/charts/semaphore/templates/tests/test-connection.yaml
new file mode 100644
index 0000000..dcc3491
--- /dev/null
+++ b/charts/semaphore/templates/tests/test-connection.yaml
@@ -0,0 +1,21 @@
+apiVersion: v1
+kind: Pod
+
+metadata:
+ name: "{{ include "semaphoreui.fullname" . }}-test-connection"
+ labels:
+ {{- include "semaphoreui.labels" . | nindent 4 }}
+ annotations:
+ helm.sh/hook: "test-success"
+
+spec:
+ restartPolicy: Never
+
+ containers:
+ - name: wget
+ image: busybox
+ command:
+ - wget
+ args:
+ - --spider
+ - http://{{ include "semaphoreui.fullname" . }}:{{ .Values.service.port }}
diff --git a/charts/semaphore/values.schema.json b/charts/semaphore/values.schema.json
new file mode 100644
index 0000000..0c276c0
--- /dev/null
+++ b/charts/semaphore/values.schema.json
@@ -0,0 +1,193 @@
+{
+ "$schema": "https://json-schema.org/draft-07/schema#",
+ "type": "object",
+ "properties": {
+ "secrets": {
+ "type": "object",
+ "properties": {
+ "cookieHash": {
+ "type": ["string", "null"],
+ "description": "Cookie hash secret, generated if not present"
+ },
+ "cookieHashKey": {
+ "type": ["string", "null"],
+ "description": "Key used within secret for cookieHash"
+ },
+ "cookieEncryption": {
+ "type": ["string", "null"],
+ "description": "Cookie encryption secret, generated if not present"
+ },
+ "cookieEncryptionKey": {
+ "type": "string",
+ "description": "Key used within secret for cookieEncryption"
+ },
+ "accesskeyEncryption": {
+ "type": ["string", "null"],
+ "description": "Access key encryption secret, generated if not present"
+ },
+ "accesskeyEncryptionKey": {
+ "type": "string",
+ "description": "Key used within secret for accesskeyEncryption"
+ },
+ "existingSecret": {
+ "type": ["string", "null"],
+ "description": "Existing secret to use for secrets"
+ }
+ }
+ },
+ "general": {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": ["string", "null"],
+ "description": "Host to access Semaphore"
+ },
+ "gitClient": {
+ "type": "string",
+ "enum": ["cmd_git", "go_git"],
+ "description": "Use Git client implementation"
+ },
+ "tmpPath": {
+ "type": "string",
+ "description": "Working directory for Semaphore"
+ },
+ "maxParallelTasks": {
+ "type": "integer",
+ "description": "Maximum parallel tasks",
+ "minimum": 0
+ },
+ "passwordLoginDisable": {
+ "type": "boolean",
+ "description": "Disable password login"
+ },
+ "nonAdminCanCreateProject": {
+ "type": "boolean",
+ "description": "Allow non-admins to create projects"
+ },
+ "useRemoteRunner": {
+ "type": "boolean",
+ "description": "Enable usage of remote runners"
+ },
+ "sshConfigPath": {
+ "type": ["string", "null"],
+ "description": "Path to SSH config"
+ },
+ "additionalPythonPackages": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Additional Python packages"
+ }
+ }
+ },
+ "database": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["bolt", "mysql", "postgres"],
+ "description": "Type of database backend"
+ },
+ "usernameFromSecret": {
+ "type": "boolean",
+ "description": "Read username from secret"
+ },
+ "username": {
+ "type": "string",
+ "description": "Username for database"
+ },
+ "usernameKey": {
+ "type": "string",
+ "description": "Key used within secret for username"
+ },
+ "password": {
+ "type": ["string", "null"],
+ "description": "Password for database"
+ },
+ "passwordKey": {
+ "type": "string",
+ "description": "Key used within secret for password"
+ },
+ "existingSecret": {
+ "type": ["string", "null"],
+ "description": "Existing secret to use for credentials"
+ },
+ "host": {
+ "type": ["string", "null"],
+ "description": "Host for database connection"
+ },
+ "port": {
+ "type": ["integer", "null"],
+ "description": "Port for database connection"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the used database"
+ },
+ "options": {
+ "type": "object",
+ "description": "Options for database connection"
+ },
+ "path": {
+ "type": "string",
+ "description": "Path for the boltdb"
+ },
+ "persistence": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable persistence for boltdb"
+ },
+ "size": {
+ "type": "string",
+ "description": "Size for boltdb volume"
+ },
+ "storageClass": {
+ "type": ["string", "null"],
+ "description": "Storage class used for boltdb volume"
+ },
+ "accessModes": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": ["ReadWriteOnce", "ReadOnlyMany", "ReadWriteMany"]
+ },
+ "description": "Access modes used for boltdb volume"
+ },
+ "existingClaim": {
+ "type": ["string", "null"],
+ "description": "Name of an already existing claim"
+ }
+ }
+ }
+ }
+ },
+ "customCertificates": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enable appending custom CA bundle into ca-certificates.crt for outbound TLS"
+ },
+ "existingSecret": {
+ "type": ["string", "null"],
+ "description": "Existing secret containing the CA bundle"
+ },
+ "existingConfigMap": {
+ "type": ["string", "null"],
+ "description": "Existing configmap containing the CA bundle"
+ },
+ "key": {
+ "type": "string",
+ "description": "Key in secret/configmap that holds the CA bundle"
+ },
+ "mountPath": {
+ "type": "string",
+ "description": "Path where the combined CA bundle is mounted"
+ }
+ }
+ }
+ }
+}
diff --git a/charts/semaphore/values.yaml b/charts/semaphore/values.yaml
new file mode 100644
index 0000000..80321bc
--- /dev/null
+++ b/charts/semaphore/values.yaml
@@ -0,0 +1,499 @@
+---
+# -- Override the name
+nameOverride: ""
+
+# -- Override the fullname
+fullnameOverride: ""
+
+# -- Replicas for the deployment
+replicaCount: 1
+
+config:
+ # -- List of environment variables to forward into the application environment.
+ # Modify this list if additional environment variables need to be accessible.
+ forwarded_env_vars: []
+
+image:
+ # -- Image repository used by deployment
+ repository: semaphoreui/semaphore
+
+ # -- Optional tag for the repository, defaults to app version
+ tag: ""
+
+ # -- Image pull policy
+ pullPolicy: IfNotPresent
+
+ # -- Optional name of pull secret if using a private registry
+ pullSecrets: []
+
+serviceAccount:
+ # -- Create a new service account
+ create: true
+
+ # -- Optional name for an existing service account
+ name: ""
+
+ # -- Define annotations for the service account
+ annotations: {}
+
+# -- Defines dnsConfig for the deployment
+# dnsConfig:
+# nameservers: # List of IPs
+# - 1.1.1.1
+# searches: # Search domains
+# - ns1.svc.cluster.local
+# options: # Resolver options
+# - name: ndots
+# value: "2"
+
+# -- Update strategy for deployment
+updateStrategy:
+ type: Recreate
+
+# -- Define additional labels
+labels: {}
+
+# -- Define additional annotations
+annotations: {}
+
+# -- Security context for the deployment
+securityContext:
+ fsGroup: 1001
+
+# -- Security context for the pod
+podSecurityContext: {}
+
+# -- List of extra init containers
+extraInitContainers: []
+
+# -- List of extra sidecar containers
+extraSidecarContainers: []
+
+# -- List of extra volumes
+extraVolumes: []
+ # - name: extra
+ # emptyDir: {}
+
+# -- List of extra volume mounts
+extraVolumeMounts: []
+ # - name: extra
+ # mountPath: /usr/local/share
+ # readOnly: true
+
+service:
+ # -- Type of the service
+ type: ClusterIP
+
+ # -- (int) Port of the service
+ port: 3000
+
+ # -- (int) Internal port of the service
+ internalPort: 3000
+
+ # -- Additional annotations for the service
+ annotations: {}
+
+ # -- Additional labels for the service
+ labels: {}
+
+ingress:
+ # -- Enable ingress
+ enabled: false
+
+ # -- (string) Class name for the ingress resource
+ className:
+
+ # -- Host definition for ingress
+ hosts:
+ - host: example.local
+ paths:
+ - path: /
+ pathType: Prefix
+
+ # -- Optional TLS configuration for ingress
+ tls: []
+
+ # -- Additional annotations for the ingress
+ annotations: {}
+
+ # -- Additional labels for the ingress
+ labels: {}
+
+persistence:
+ # -- Enable persistence for workdir
+ enabled: true
+
+ # -- Size for boltdb volume
+ size: 10G
+
+ # -- Storage class used for workdir volume
+ storageClass:
+
+ # -- Access modes used for workdir volume
+ accessModes:
+ - ReadWriteOnce
+
+ # -- Name of an already existing claim
+ existingClaim:
+
+secrets:
+ # -- Cookie hash secret, generated if not present
+ cookieHash:
+
+ # -- Key used within secret for cookieHash
+ cookieHashKey: cookieHash
+
+ # -- Cookie encryption secret, generated if not present
+ cookieEncryption:
+
+ # -- Key used within secret for cookieEncryption
+ cookieEncryptionKey: cookieEncryption
+
+ # -- Access key encryption secret, generated if not present
+ accesskeyEncryption:
+
+ # -- Key used within secret for accesskeyEncryption
+ accesskeyEncryptionKey: accesskeyEncryption
+
+ # -- Existing secret to use for secrets
+ existingSecret:
+
+customCertificates:
+ # -- Enable appending custom CA bundle into ca-certificates.crt for outbound TLS (e.g. on-prem git)
+ enabled: false
+
+ # -- Existing secret containing the CA bundle (required if enabled and no configmap)
+ existingSecret:
+
+ # -- Existing configmap containing the CA bundle (required if enabled and no secret)
+ existingConfigMap:
+
+ # -- Key in secret/configmap that holds the CA bundle
+ key: ca.crt
+
+ # -- Path where the combined CA bundle is mounted (ca-certificates.crt)
+ mountPath: /etc/ssl/certs/ca-certificates.crt
+
+general:
+ # -- Host to access Semaphore
+ host:
+
+ # -- Use Git client implementation
+ gitClient: cmd_git
+
+ # -- Working directory for Semaphore
+ tmpPath: /tmp/semaphore
+
+ # -- Maximum parallel tasks
+ maxParallelTasks: 0
+
+ # -- Disable password login
+ passwordLoginDisable: false
+
+ # -- Allow non-admins to create projects
+ nonAdminCanCreateProject: false
+
+ # -- Enable usage of remote runners
+ useRemoteRunner: false
+
+ # -- Path to SSH config
+ sshConfigPath:
+
+ # -- Additional Python packages
+ additionalPythonPackages: []
+
+database:
+ # -- Type of database backend
+ type: bolt
+
+ # -- Read username from secret
+ usernameFromSecret: true
+
+ # -- Username for database
+ username: semaphore
+
+ # -- Key used within secret for username
+ usernameKey: username
+
+ # -- Password for database
+ password:
+
+ # -- Key used within secret for password
+ passwordKey: password
+
+ # -- Existing secret to use for credentials
+ existingSecret:
+
+ # -- Host for database connection
+ host:
+
+ # -- Port for database connection
+ port:
+
+ # -- Name of the used database
+ name: semaphore
+
+ # -- Options for database connection
+ options: {}
+
+ # -- Path for the boltdb
+ path: /var/lib/semaphore/database.boltdb
+
+ persistence:
+ # -- Enable persistence for boltdb
+ enabled: true
+
+ # -- Size for boltdb volume
+ size: 5G
+
+ # -- Storage class used for boltdb volume
+ storageClass:
+
+ # -- Access modes used for boltdb volume
+ accessModes:
+ - ReadWriteOnce
+
+ # -- Name of an already existing claim
+ existingClaim:
+
+ldap:
+ # -- Enable LDAP authentication
+ enable: false
+
+ # -- Address of LDAP server
+ server:
+
+ # -- Enable TLS connection to LDAP
+ needtls: false
+
+ # Search DN for LDAP
+ searchdn:
+
+ # -- Search filter for LDAP
+ filter:
+
+ # -- BindDN for LDAP authentication
+ binddn:
+
+ # -- Key used within secret for username
+ binddnKey: username
+
+ # -- Password for LDAP authentication
+ password:
+
+ # -- Key used within secret for username
+ passwordKey: password
+
+ # -- Existing secret to use for ldap
+ existingSecret:
+
+ # -- Mapping for LDAP attributes
+ mappings:
+ dn: dn
+ mail: mail
+ uid: uid
+ cn: cn
+
+oidc:
+ # -- Enable oidc authentication
+ enable: false
+
+ # -- Dictionary of oidc providers
+ providers: {}
+
+email:
+ # -- Enable email alerting
+ alert: false
+
+ # -- Sender for email alerting
+ sender:
+
+ # -- Host of the SMTP server
+ host:
+
+ # -- Port of the SMTP server
+ port:
+
+ # -- Enable a secure connection
+ secure: false
+
+ # -- Username for SMTP server
+ username:
+
+ # -- Key used within secret for username
+ usernameKey: username
+
+ # -- Password for SMTP server
+ password:
+
+ # -- Key used within secret for password
+ passwordKey: password
+
+ # -- Existing secret to use for email
+ existingSecret:
+
+telegram:
+ # -- Enable telegram alerting
+ alert: false
+
+ # -- Chat used for telegram
+ chat:
+
+ # -- Key used within secret for chat
+ chatKey: chat
+
+ # -- Token used for telegram
+ token:
+
+ # -- Key used within secret for token
+ tokenKey: token
+
+ # -- Existing secret to use for telegram
+ existingSecret:
+
+slack:
+ # -- Enable slack alerting
+ alert: false
+
+ # -- URL used for slack
+ url:
+
+ # -- Key used within secret for url
+ urlKey: url
+
+ # -- Existing secret to use for slack
+ existingSecret:
+
+runner:
+ # -- Runner registration token
+ token:
+
+ # -- Key used within secret for token
+ tokenKey: token
+
+ # -- Existing secret to use for runner
+ existingSecret:
+
+admin:
+ # -- Create an local admin user
+ create: false
+
+ # -- Fullname for local admin
+ fullname: Admin
+
+ # -- Key used within secret for fullname
+ fullnameKey: fullname
+
+ # -- Username for local admin
+ username: admin
+
+ # -- Key used within secret for username
+ usernameKey: username
+
+ # -- Password for local admin
+ password:
+
+ # -- Key used within secret for password
+ passwordKey: password
+
+ # -- Email for local admin
+ email: admin@localhost
+
+ # -- Key used within secret for email
+ emailKey: email
+
+ # -- Existing secret to use for admin
+ existingSecret:
+
+# -- Resources for the deployment
+resources:
+ limits: {}
+ requests:
+ cpu: 100m
+ memory: 64Mi
+
+# -- Node selector for the deployment
+nodeSelector: {}
+
+# -- Affinity for the deployment
+affinity: {}
+
+# -- Tolerations for the deployment
+tolerations: []
+
+# -- List of environment variables from existing secrets
+envFromSecrets: []
+
+# -- List of environment variables from existing configmaps
+envFromConfigMaps: []
+
+# -- Extra environment variables from mapping
+extraEnvVariables: {}
+
+# -- Extra environment variables from secrets
+extraEnvSecrets: {}
+
+mariadb:
+ # -- Enable mariadb dependency
+ enabled: false
+
+ # -- Override fullname of mariadb dependency
+ fullnameOverride: mariadb
+
+ # -- Architecture for mariadb
+ architecture: standalone
+
+ auth:
+ # -- Database created for semaphore
+ database: semaphore
+
+ # -- Username for semaphore database
+ username: semaphore
+
+ # -- Password for semaphore database
+ password:
+
+ serviceAccount:
+ # -- Create service account for mariadb
+ create: true
+
+ metrics:
+ # -- Enable metrics for mariadb
+ enabled: true
+
+ serviceMonitor:
+ # -- Enable service monitor for mariadb
+ enabled: false
+
+postgresql:
+ # -- Enable postgresql dependency
+ enabled: false
+
+ # -- Override fullname of postgresql dependency
+ fullnameOverride: postgresql
+
+ # -- Architecture for postgresql
+ architecture: standalone
+
+ auth:
+ # -- Database created for semaphore
+ database: semaphore
+
+ # -- Username for semaphore database
+ username: semaphore
+
+ # -- Password for semaphore database
+ password:
+
+ serviceAccount:
+ # -- Create service account for postgresql
+ create: true
+
+ metrics:
+ # -- Enable metrics for postgresql
+ enabled: true
+
+ serviceMonitor:
+ # -- Enable service monitor for postgresql
+ enabled: false
+...
diff --git a/manifests/semaphore/values.yaml b/manifests/semaphore/values.yaml
new file mode 100644
index 0000000..114d02a
--- /dev/null
+++ b/manifests/semaphore/values.yaml
@@ -0,0 +1,55 @@
+---
+# Minimal values for local/testing deployments of Semaphore
+# Use these values for a quick, PV-less install.
+
+replicaCount: 1
+
+image:
+ repository: semaphoreui/semaphore
+ pullPolicy: IfNotPresent
+
+service:
+ type: ClusterIP
+ port: 3000
+ internalPort: 3000
+
+ingress:
+ enabled: true
+ className: traefik
+ annotations:
+ traefik.ingress.kubernetes.io/router.entrypoints: websecure
+ traefik.ingress.kubernetes.io/router.tls: "true"
+ cert-manager.io/cluster-issuer: letsencrypt-prod
+ hosts:
+ - host: semaphore.local
+ paths:
+ - path: /
+ pathType: Prefix
+ tls:
+ - secretName: semaphore-tls
+ hosts:
+ - semaphore.local
+
+# Disable persistent volumes for easy local installs
+persistence:
+ enabled: false
+
+database:
+ type: bolt
+ persistence:
+ enabled: false
+
+general:
+ host: semaphore.local
+ useRemoteRunner: false
+ maxParallelTasks: 1
+
+admin:
+ create: true
+ fullname: Admin
+ username: admin
+ password: changeme
+ email: admin@localhost
+
+secrets:
+ existingSecret: ""