From 2c3fff78780aaf650caa9a14ead1678b3bf478d3 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Sat, 2 Sep 2023 23:25:47 +0200 Subject: [PATCH 01/21] Change to Helm chart API v2 --- helm-chart/{requirements.lock => Chart.lock} | 2 +- helm-chart/Chart.yaml | 17 ++++++++++++++++- helm-chart/requirements.yaml | 15 --------------- 3 files changed, 17 insertions(+), 17 deletions(-) rename helm-chart/{requirements.lock => Chart.lock} (87%) delete mode 100644 helm-chart/requirements.yaml diff --git a/helm-chart/requirements.lock b/helm-chart/Chart.lock similarity index 87% rename from helm-chart/requirements.lock rename to helm-chart/Chart.lock index eb85bb9..662229c 100644 --- a/helm-chart/requirements.lock +++ b/helm-chart/Chart.lock @@ -9,4 +9,4 @@ dependencies: repository: https://charts.bitnami.com/bitnami version: 11.6.26 digest: sha256:9f700ddcd4c0ad2f0e36b82c423ad71635e23686869f4c9f886d2a1fdd824886 -generated: "2023-02-19T16:16:56.258862178+01:00" +generated: "2023-09-02T23:25:16.762556+02:00" diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml index 419365e..28ae75d 100644 --- a/helm-chart/Chart.yaml +++ b/helm-chart/Chart.yaml @@ -1,4 +1,4 @@ -apiVersion: v1 +apiVersion: v2 name: taiga appVersion: 6.0.0-latest version: 0.0.11 @@ -16,3 +16,18 @@ keywords: - python sources: - https://github.com/taigaio/taiga-docker +dependencies: +- name: rabbitmq + version: 11.9.3 + repository: https://charts.bitnami.com/bitnami + alias: async-rabbitmq + condition: rabbitmq.enabled +- name: rabbitmq + version: 11.9.3 + repository: https://charts.bitnami.com/bitnami + alias: events-rabbitmq + condition: rabbitmq.enabled +- name: postgresql + version: 11.6.26 + repository: https://charts.bitnami.com/bitnami + condition: postgresql.enabled diff --git a/helm-chart/requirements.yaml b/helm-chart/requirements.yaml deleted file mode 100644 index db127d8..0000000 --- a/helm-chart/requirements.yaml +++ /dev/null @@ -1,15 +0,0 @@ -dependencies: -- name: rabbitmq - version: 11.9.3 - repository: https://charts.bitnami.com/bitnami - alias: async-rabbitmq - condition: rabbitmq.enabled -- name: rabbitmq - version: 11.9.3 - repository: https://charts.bitnami.com/bitnami - alias: events-rabbitmq - condition: rabbitmq.enabled -- name: postgresql - version: 11.6.26 - repository: https://charts.bitnami.com/bitnami - condition: postgresql.enabled From 2cf947af141b0a89eb3db1849e16d18f04187858 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Sat, 2 Sep 2023 23:35:37 +0200 Subject: [PATCH 02/21] feat: Update helm chart dependencies --- helm-chart/Chart.lock | 10 +++++----- helm-chart/Chart.yaml | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/helm-chart/Chart.lock b/helm-chart/Chart.lock index 662229c..359a313 100644 --- a/helm-chart/Chart.lock +++ b/helm-chart/Chart.lock @@ -1,12 +1,12 @@ dependencies: - name: rabbitmq repository: https://charts.bitnami.com/bitnami - version: 11.9.3 + version: 12.1.3 - name: rabbitmq repository: https://charts.bitnami.com/bitnami - version: 11.9.3 + version: 12.1.3 - name: postgresql repository: https://charts.bitnami.com/bitnami - version: 11.6.26 -digest: sha256:9f700ddcd4c0ad2f0e36b82c423ad71635e23686869f4c9f886d2a1fdd824886 -generated: "2023-09-02T23:25:16.762556+02:00" + version: 12.10.0 +digest: sha256:7c0fecea0dd720939476b5fb35c83139496652448886c852e18a88af2e68c9ce +generated: "2023-09-02T23:35:24.214489+02:00" diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml index 28ae75d..d0881b8 100644 --- a/helm-chart/Chart.yaml +++ b/helm-chart/Chart.yaml @@ -18,16 +18,16 @@ sources: - https://github.com/taigaio/taiga-docker dependencies: - name: rabbitmq - version: 11.9.3 + version: ^12.1.2 repository: https://charts.bitnami.com/bitnami alias: async-rabbitmq condition: rabbitmq.enabled - name: rabbitmq - version: 11.9.3 + version: ^12.1.2 repository: https://charts.bitnami.com/bitnami alias: events-rabbitmq condition: rabbitmq.enabled - name: postgresql - version: 11.6.26 + version: ^12.10.0 repository: https://charts.bitnami.com/bitnami condition: postgresql.enabled From 180bf94b561b3a95096bb309cb82bf72ed0b96cf Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Sun, 3 Sep 2023 12:49:55 +0200 Subject: [PATCH 03/21] ci: Package Helm chart in CI --- .gitlab-ci.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..9d846b9 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,35 @@ +package-helm-chart: + stage: build + image: + name: dtzar/helm-kubectl:3.12.3 + before_script: + - > + echo ${CI_REGISTRY_PASSWORD} | + helm registry login + --username gitlab-ci-token + --password-stdin + ${CI_REGISTRY} + script: + - mkdir packages + - "CHART_VERSION=$(helm show chart helm-chart | grep '^version:' | sed 's/version: //')" + - | + if [[ -n "${CI_COMMIT_TAG}" ]] + then + VERSION=${CI_COMMIT_TAG} + else + VERSION=${CHART_VERSION}-pre-${CI_COMMIT_REF_SLUG} + fi + - > + helm package helm-chart + --destination packages + --dependency-update + --version="${VERSION}" + - | + echo $CI_REGISTRY_IMAGE + for chart in packages/*.tgz + do + helm push $chart "oci://${CI_REGISTRY_IMAGE}/helm" + done + # rules: + # - if: $CI_COMMIT_TAG + # - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH From 1496f8c414674a17b4075099ca1d15a49956eb79 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Sat, 23 Sep 2023 22:34:00 +0200 Subject: [PATCH 04/21] ci: Only run on default branch and on tags --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9d846b9..42791a9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,6 +30,6 @@ package-helm-chart: do helm push $chart "oci://${CI_REGISTRY_IMAGE}/helm" done - # rules: - # - if: $CI_COMMIT_TAG - # - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + rules: + - if: $CI_COMMIT_TAG + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH From 568188bccab9b90b61b031a525cbb0e78aa9aa35 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Thu, 5 Oct 2023 00:01:29 +0200 Subject: [PATCH 05/21] fix: Indent back.extraVars by 10 instead of 12 --- helm-chart/templates/back-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-chart/templates/back-deployment.yaml b/helm-chart/templates/back-deployment.yaml index a9f5cbd..cc69145 100644 --- a/helm-chart/templates/back-deployment.yaml +++ b/helm-chart/templates/back-deployment.yaml @@ -181,7 +181,7 @@ spec: value: "False" {{ end }} {{- if .Values.back.extraVars }} - {{- toYaml .Values.back.extraVars | nindent 12 }} + {{- toYaml .Values.back.extraVars | nindent 10 }} {{- end }} ports: - name: taiga-back From d3ebcbe814fb9991270803b39a871c566df58224 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Thu, 5 Oct 2023 00:07:47 +0200 Subject: [PATCH 06/21] fix: Correct indentation of values.async.extraVars --- helm-chart/templates/back-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-chart/templates/back-deployment.yaml b/helm-chart/templates/back-deployment.yaml index cc69145..b61bd08 100644 --- a/helm-chart/templates/back-deployment.yaml +++ b/helm-chart/templates/back-deployment.yaml @@ -359,7 +359,7 @@ spec: value: "False" {{ end }} {{- if .Values.async.extraVars }} - {{- toYaml .Values.async.extraVars | nindent 12 }} + {{- toYaml .Values.async.extraVars | nindent 10 }} {{- end }} volumeMounts: - name: taiga-static From 0d64159da8bdd366f434842ae83547f894dac1b7 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Thu, 5 Oct 2023 00:20:04 +0200 Subject: [PATCH 07/21] fix: Allow to configure the secretName of the Ingress for TLS --- helm-chart/templates/ingress.yaml | 2 +- helm-chart/values.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/helm-chart/templates/ingress.yaml b/helm-chart/templates/ingress.yaml index 574d762..30d7701 100644 --- a/helm-chart/templates/ingress.yaml +++ b/helm-chart/templates/ingress.yaml @@ -121,7 +121,7 @@ spec: {{- if .Values.ingress.tls }} - hosts: - {{ .Values.ingress.hostname }} - secretName: {{ printf "%s-tls" .Values.ingress.hostname }} + secretName: {{ .Values.ingress.secretName }} {{- end }} {{- if .Values.ingress.extraTls }} {{- toYaml .Values.ingress.extraTls | nindent 4 }} diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index aad59cb..b41fffb 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -817,6 +817,7 @@ ingress: ## You can use the ingress.secrets parameter to create this TLS secret or relay on cert-manager to create it ## tls: false + secretName: "" ## Ingress annotations done as key:value pairs ## For a full list of possible ingress annotations, From 68f116db6cfdec34b35cedbee282ec08633d538d Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Thu, 5 Oct 2023 00:01:29 +0200 Subject: [PATCH 08/21] fix: Indent back.extraVars by 10 instead of 12 --- helm-chart/templates/back-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-chart/templates/back-deployment.yaml b/helm-chart/templates/back-deployment.yaml index a9f5cbd..cc69145 100644 --- a/helm-chart/templates/back-deployment.yaml +++ b/helm-chart/templates/back-deployment.yaml @@ -181,7 +181,7 @@ spec: value: "False" {{ end }} {{- if .Values.back.extraVars }} - {{- toYaml .Values.back.extraVars | nindent 12 }} + {{- toYaml .Values.back.extraVars | nindent 10 }} {{- end }} ports: - name: taiga-back From f3ad38caf2b60321fb59d48e07bea30aad66cda1 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Thu, 5 Oct 2023 00:07:47 +0200 Subject: [PATCH 09/21] fix: Correct indentation of values.async.extraVars --- helm-chart/templates/back-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-chart/templates/back-deployment.yaml b/helm-chart/templates/back-deployment.yaml index cc69145..b61bd08 100644 --- a/helm-chart/templates/back-deployment.yaml +++ b/helm-chart/templates/back-deployment.yaml @@ -359,7 +359,7 @@ spec: value: "False" {{ end }} {{- if .Values.async.extraVars }} - {{- toYaml .Values.async.extraVars | nindent 12 }} + {{- toYaml .Values.async.extraVars | nindent 10 }} {{- end }} volumeMounts: - name: taiga-static From 6b9533a92b0d57b04bb3ab02215819e7a784f746 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Thu, 5 Oct 2023 00:20:04 +0200 Subject: [PATCH 10/21] fix: Allow to configure the secretName of the Ingress for TLS --- helm-chart/templates/ingress.yaml | 2 +- helm-chart/values.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/helm-chart/templates/ingress.yaml b/helm-chart/templates/ingress.yaml index 574d762..30d7701 100644 --- a/helm-chart/templates/ingress.yaml +++ b/helm-chart/templates/ingress.yaml @@ -121,7 +121,7 @@ spec: {{- if .Values.ingress.tls }} - hosts: - {{ .Values.ingress.hostname }} - secretName: {{ printf "%s-tls" .Values.ingress.hostname }} + secretName: {{ .Values.ingress.secretName }} {{- end }} {{- if .Values.ingress.extraTls }} {{- toYaml .Values.ingress.extraTls | nindent 4 }} diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index aad59cb..b41fffb 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -817,6 +817,7 @@ ingress: ## You can use the ingress.secrets parameter to create this TLS secret or relay on cert-manager to create it ## tls: false + secretName: "" ## Ingress annotations done as key:value pairs ## For a full list of possible ingress annotations, From 1425d0da46dedee6e24ec0b0fc34eb62285ac574 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Thu, 5 Oct 2023 22:38:11 +0200 Subject: [PATCH 11/21] docs: Capture TODO notes about values to check --- helm-chart/values.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index b41fffb..bba1361 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -10,8 +10,10 @@ ## Taiga secret key ## +# TODO: Set to null by default or use random value by default and store in secret secretKey: 9%pno@m688el28@2+^y4v^&6wluqk-g#j#d7$dsjtht)o30dn1 +# TODO: The email settings seem to be unused, compare smtp below ## Email settings ## email: @@ -79,11 +81,14 @@ trelloImporter: ## Create initial user with credentials admin/123123 ## ref: https://taigaio.github.io/taiga-doc/dist/setup-production.html ## +# TODO: set to false by default or create with a random password which is stored in a secret +# or allow to pass in the data for username and secret createInitialUser: true ## Create initial templates ## ref: https://taigaio.github.io/taiga-doc/dist/setup-production.html ## +# TODO: This values seems to be unused createInitialTemplates: false back: @@ -953,9 +958,11 @@ async-rabbitmq: ## Create a rabbitmq username auth: + # TODO: Remove default values for secrets username: taiga password: taiga - + + # TODO: Remove default values for secrets erlangCookie: h2SNqvsJRJAeSRUlkubZTlkRB0OJgYSu extraConfiguration: |- @@ -974,9 +981,11 @@ events-rabbitmq: ## Create a rabbitmq username auth: + # TODO: Remove default values for secrets username: taiga password: taiga - + + # TODO: Remove default values for secrets erlangCookie: h2SNqvsJRJAeSRUlkubZTlkRB0OJgYSu extraConfiguration: |- From 18eb8a4cf6eec0352a83912592074a2e0fdc7ec9 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Thu, 5 Oct 2023 22:39:23 +0200 Subject: [PATCH 12/21] fix: Correct database related values reference in async container --- helm-chart/templates/back-deployment.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helm-chart/templates/back-deployment.yaml b/helm-chart/templates/back-deployment.yaml index b61bd08..0174780 100644 --- a/helm-chart/templates/back-deployment.yaml +++ b/helm-chart/templates/back-deployment.yaml @@ -226,11 +226,11 @@ spec: - /taiga-back/docker/async_entrypoint.sh env: - name: POSTGRES_DB - value: "{{ .Values.postgresql.postgresqlDatabase }}" + value: "{{ .Values.postgresql.database }}" - name: POSTGRES_USER - value: "{{ .Values.postgresql.postgresqlUsername }}" + value: "{{ .Values.postgresql.username }}" - name: POSTGRES_PASSWORD - value: "{{ .Values.postgresql.postgresqlPassword }}" + value: "{{ .Values.postgresql.password }}" - name: POSTGRES_HOST value: "{{ template "taiga.fullname" . }}-postgresql" - name: TAIGA_SECRET_KEY From 7f43ddb0a6eda1d250850af2298991156e815cae Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Thu, 5 Oct 2023 22:40:44 +0200 Subject: [PATCH 13/21] feat: Allow to configure "postgresql.host" to use an external database --- helm-chart/templates/back-deployment.yaml | 5 +++-- helm-chart/templates/job-createinitialuser.yaml | 2 +- helm-chart/values.yaml | 11 +++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/helm-chart/templates/back-deployment.yaml b/helm-chart/templates/back-deployment.yaml index 0174780..a9998dc 100644 --- a/helm-chart/templates/back-deployment.yaml +++ b/helm-chart/templates/back-deployment.yaml @@ -46,7 +46,7 @@ spec: - name: POSTGRES_PASSWORD value: "{{ .Values.postgresql.auth.password }}" - name: POSTGRES_HOST - value: "{{ template "taiga.fullname" . }}-postgresql" + value: {{ default (printf "%s-postgresql" (include "taiga.fullname" .)) .Values.postgresql.host | quote }} - name: TAIGA_SECRET_KEY value: "{{ .Values.secretKey }}" {{ if .Values.ingress.enabled }} @@ -215,6 +215,7 @@ spec: mountPath: /taiga-back/static - name: taiga-media mountPath: /taiga-back/media + # https://www.caktusgroup.com/blog/2017/03/14/production-ready-dockerfile-your-python-django-app/ - name: {{ template "taiga.fullname" . }}-async image: {{ template "taiga.async.image" . }} @@ -232,7 +233,7 @@ spec: - name: POSTGRES_PASSWORD value: "{{ .Values.postgresql.password }}" - name: POSTGRES_HOST - value: "{{ template "taiga.fullname" . }}-postgresql" + value: {{ default (printf "%s-postgresql" (include "taiga.fullname" .)) .Values.postgresql.host | quote }} - name: TAIGA_SECRET_KEY value: "{{ .Values.secretKey }}" {{ if .Values.ingress.enabled }} diff --git a/helm-chart/templates/job-createinitialuser.yaml b/helm-chart/templates/job-createinitialuser.yaml index cbd2145..082ad37 100644 --- a/helm-chart/templates/job-createinitialuser.yaml +++ b/helm-chart/templates/job-createinitialuser.yaml @@ -27,7 +27,7 @@ spec: - name: POSTGRES_PASSWORD value: "{{ .Values.postgresql.auth.password }}" - name: POSTGRES_HOST - value: "{{ template "taiga.fullname" . }}-postgresql" + value: {{ default (printf "%s-postgresql" (include "taiga.fullname" .)) .Values.postgresql.host | quote }} - name: TAIGA_SECRET_KEY value: "{{ .Values.secretKey }}" restartPolicy: Never diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index bba1361..5f8b6da 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -861,7 +861,7 @@ ingress: ## - name: taiga.local-tls ## key: ## certificate: - + ## Pods Service Account ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ @@ -895,7 +895,10 @@ persistence: accessMode: ReadWriteOnce size: 5Gi -## PostgreSQL chart configuration +## PostgreSQL / PostgreSQL chart configuration +## +## This does configure either the bundled PostgreSQL instance or it does +## configure the postgresql access details if "enabled" is set to "false". ## ## https://github.com/helm/charts/blob/master/stable/postgresql/values.yaml ## @@ -906,6 +909,10 @@ postgresql: ## Whether to deploy a PostgreSQL server to satisfy the applications database requirements. To use an external database set this to false and configure the externalDatabase parameters enabled: true + ## The hostname of the PostgreSQL instance. Has to be set when not using the + ## bundled PostgreSQL instance. + host: null + ## 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 From 440c12238110385057bb358d924cffcbd7ce697b Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Thu, 5 Oct 2023 23:09:01 +0200 Subject: [PATCH 14/21] feat: Flag the media PVC with resource-policy keep --- helm-chart/templates/media-pvc.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helm-chart/templates/media-pvc.yaml b/helm-chart/templates/media-pvc.yaml index 5f74bf7..b4e3c59 100644 --- a/helm-chart/templates/media-pvc.yaml +++ b/helm-chart/templates/media-pvc.yaml @@ -5,6 +5,8 @@ apiVersion: v1 metadata: name: {{ template "taiga.fullname" . }}-media labels: {{- include "taiga.labels" . | nindent 4 }} + annotations: + "helm.sh/resource-policy": keep spec: accessModes: - {{ .Values.persistence.accessMode | quote }} From 618c101ddcd5139e6e31add18d1fae00804a2f19 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Thu, 5 Oct 2023 23:11:52 +0200 Subject: [PATCH 15/21] docs: Wrap long line in chart readme --- helm-chart/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helm-chart/README.md b/helm-chart/README.md index 603aa15..7cebacd 100644 --- a/helm-chart/README.md +++ b/helm-chart/README.md @@ -1 +1,3 @@ -Is mandatory to deploy taiga as taiga as chart name becase some names (related to rabbitmq, take a look to `settings/config.py`) cannot be parametrized in docker images. \ No newline at end of file +Is mandatory to deploy taiga as taiga as chart name becase some names (related +to rabbitmq, take a look to `settings/config.py`) cannot be parametrized in +docker images. From 69a763f7ffe132af00d10732a720f2c230912bc1 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Thu, 5 Oct 2023 23:17:53 +0200 Subject: [PATCH 16/21] docs: Add note regarding the PVCs into the readme --- helm-chart/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/helm-chart/README.md b/helm-chart/README.md index 7cebacd..11ecc3d 100644 --- a/helm-chart/README.md +++ b/helm-chart/README.md @@ -1,3 +1,19 @@ +# Taiga 6 Helm chart + + +## Known limitations + Is mandatory to deploy taiga as taiga as chart name becase some names (related to rabbitmq, take a look to `settings/config.py`) cannot be parametrized in docker images. + + +## Volume handling + +The chart does by default deploy two `PersistentVolumeClaim` (PVC) resources: + +- `tagia-media` - This holds the media files. These files are content of the + users, comparable to the content of the database. + +- `taiga-static` - This holds static files which are filled by utility + `collectstatic` of the Django framework. From fd0c937079d2ce9f5ab911bd3bc038158aac441c Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Fri, 6 Oct 2023 00:55:21 +0200 Subject: [PATCH 17/21] fix: Add "/static" into the ingress configuration This is required so that the Django Admin UI can work. There is still a catch, since "manage.py collectstatic" has to be run to populate the volume with the static files. --- helm-chart/templates/ingress.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/helm-chart/templates/ingress.yaml b/helm-chart/templates/ingress.yaml index 30d7701..8b340da 100644 --- a/helm-chart/templates/ingress.yaml +++ b/helm-chart/templates/ingress.yaml @@ -64,6 +64,13 @@ spec: port: name: taiga-protected pathType: ImplementationSpecific + - path: /static + backend: + service: + name: "{{ template "taiga.fullname" . }}-front" + port: + name: taiga-front + pathType: ImplementationSpecific {{- end }} {{- end }} {{- range .Values.ingress.extraHosts }} @@ -114,6 +121,13 @@ spec: port: name: taiga-protected pathType: ImplementationSpecific + - path: /static + backend: + service: + name: "{{ template "taiga.fullname" . }}-front" + port: + name: taiga-front + pathType: ImplementationSpecific {{- end }} {{- end }} {{- if or .Values.ingress.tls .Values.ingress.extraTls .Values.ingress.hosts }} From d76d604c8e0f637b002050b9e36ebb2ec0aee645 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Fri, 6 Oct 2023 01:29:40 +0200 Subject: [PATCH 18/21] fix: Correct the values for the database configuration in the async container --- helm-chart/templates/back-deployment.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helm-chart/templates/back-deployment.yaml b/helm-chart/templates/back-deployment.yaml index a9998dc..cf6a161 100644 --- a/helm-chart/templates/back-deployment.yaml +++ b/helm-chart/templates/back-deployment.yaml @@ -227,11 +227,11 @@ spec: - /taiga-back/docker/async_entrypoint.sh env: - name: POSTGRES_DB - value: "{{ .Values.postgresql.database }}" + value: "{{ .Values.postgresql.auth.database }}" - name: POSTGRES_USER - value: "{{ .Values.postgresql.username }}" + value: "{{ .Values.postgresql.auth.username }}" - name: POSTGRES_PASSWORD - value: "{{ .Values.postgresql.password }}" + value: "{{ .Values.postgresql.auth.password }}" - name: POSTGRES_HOST value: {{ default (printf "%s-postgresql" (include "taiga.fullname" .)) .Values.postgresql.host | quote }} - name: TAIGA_SECRET_KEY From 887211d356666c8e488fd3aab0e588e79fac8d2e Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Fri, 6 Oct 2023 01:31:21 +0200 Subject: [PATCH 19/21] feat: Also keep the static volume --- helm-chart/templates/static-pvc.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helm-chart/templates/static-pvc.yaml b/helm-chart/templates/static-pvc.yaml index a48e0d3..5dc5a24 100644 --- a/helm-chart/templates/static-pvc.yaml +++ b/helm-chart/templates/static-pvc.yaml @@ -5,6 +5,8 @@ apiVersion: v1 metadata: name: {{ template "taiga.fullname" . }}-static labels: {{- include "taiga.labels" . | nindent 4 }} + annotations: + "helm.sh/resource-policy": keep spec: accessModes: - {{ .Values.persistence.accessMode | quote }} From fdc96ea3e907f5a6899bab7ec578597064e02bef Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Sun, 2 Jun 2024 08:46:52 +0200 Subject: [PATCH 20/21] feat: Allow to configure existing PVCs for both volumes separately --- helm-chart/templates/back-deployment.yaml | 4 ++-- helm-chart/templates/media-pvc.yaml | 2 +- helm-chart/templates/static-pvc.yaml | 2 +- helm-chart/values.yaml | 11 +++++++---- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/helm-chart/templates/back-deployment.yaml b/helm-chart/templates/back-deployment.yaml index cf6a161..0db686a 100644 --- a/helm-chart/templates/back-deployment.yaml +++ b/helm-chart/templates/back-deployment.yaml @@ -411,14 +411,14 @@ spec: - name: taiga-static {{- if .Values.persistence.enabled }} persistentVolumeClaim: - claimName: {{ .Values.persistence.existingClaim | default (include "taiga.fullname" .) }}-static + claimName: {{ .Values.persistence.static.existingClaim | default (printf "%s-static" (include "taiga.fullname" .)) }} {{- else }} emptyDir: {} {{- end }} - name: taiga-media {{- if .Values.persistence.enabled }} persistentVolumeClaim: - claimName: {{ .Values.persistence.existingClaim | default (include "taiga.fullname" .) }}-media + claimName: {{ .Values.persistence.media.existingClaim | default (printf "%s-media" (include "taiga.fullname" .)) }} {{- else }} emptyDir: {} {{- end }} diff --git a/helm-chart/templates/media-pvc.yaml b/helm-chart/templates/media-pvc.yaml index b4e3c59..2ae5afd 100644 --- a/helm-chart/templates/media-pvc.yaml +++ b/helm-chart/templates/media-pvc.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} +{{- if and .Values.persistence.enabled (not .Values.persistence.media.existingClaim) }} --- kind: PersistentVolumeClaim apiVersion: v1 diff --git a/helm-chart/templates/static-pvc.yaml b/helm-chart/templates/static-pvc.yaml index 5dc5a24..1c58e7e 100644 --- a/helm-chart/templates/static-pvc.yaml +++ b/helm-chart/templates/static-pvc.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} +{{- if and .Values.persistence.enabled (not .Values.persistence.static.existingClaim) }} --- kind: PersistentVolumeClaim apiVersion: v1 diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index 5f8b6da..c4cb604 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -879,10 +879,13 @@ serviceAccount: ## persistence: enabled: true - ## A manually manage Persistent Volume Claim - ## Requires persistence.enable: true - ## If defined, PVC must be created manually before volume will be bound - # existingClaim: + + ## To use existing PVCs + static: + existingClaim: "" + + media: + existingClaim: "" ## taiga data Persistent Volume Storage Class ## If defined, storageClassName: From 9738595abcd0ab4881458b228e256ee4f8bafe95 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Sun, 2 Jun 2024 08:49:53 +0200 Subject: [PATCH 21/21] chore: Bump chart version to 0.0.12 --- helm-chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml index d0881b8..11bb28a 100644 --- a/helm-chart/Chart.yaml +++ b/helm-chart/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: taiga appVersion: 6.0.0-latest -version: 0.0.11 +version: 0.0.12 description: A flexible project management web application. engine: gotpl home: https://www.taiga.io/