From f82ce081fed5aaddc123caae618776df141bf691 Mon Sep 17 00:00:00 2001 From: Miguel Ruiz Date: Thu, 27 Mar 2025 13:59:14 +0100 Subject: [PATCH] [bitnami/gitea] Set `usePasswordFiles=true` by default (#32347) * [bitnami/gitea] Set `usePasswordFiles=true` by default Signed-off-by: Miguel Ruiz * Update CHANGELOG.md Signed-off-by: Bitnami Containers * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers * Implement fixes Signed-off-by: Miguel Ruiz * Update CHANGELOG.md Signed-off-by: Bitnami Containers * Update CHANGELOG.md Signed-off-by: Bitnami Containers * Remove 'and' Signed-off-by: Miguel Ruiz * Update CHANGELOG.md Signed-off-by: Bitnami Bot * Update CHANGELOG.md Signed-off-by: Bitnami Bot --------- Signed-off-by: Miguel Ruiz Signed-off-by: Bitnami Containers Signed-off-by: Bitnami Bot Co-authored-by: Bitnami Containers Co-authored-by: Bitnami Bot --- bitnami/gitea/CHANGELOG.md | 9 +++++-- bitnami/gitea/Chart.yaml | 2 +- bitnami/gitea/README.md | 19 ++++++++------- bitnami/gitea/templates/deployment.yaml | 32 +++++++++++++++++++++++++ bitnami/gitea/values.yaml | 3 +++ 5 files changed, 53 insertions(+), 12 deletions(-) diff --git a/bitnami/gitea/CHANGELOG.md b/bitnami/gitea/CHANGELOG.md index a22a62b3ff..8f7f8e7f84 100644 --- a/bitnami/gitea/CHANGELOG.md +++ b/bitnami/gitea/CHANGELOG.md @@ -1,8 +1,13 @@ # Changelog -## 3.1.14 (2025-03-24) +## 3.2.0 (2025-03-27) -* [bitnami/gitea] Release 3.1.14 ([#32586](https://github.com/bitnami/charts/pull/32586)) +* [bitnami/gitea] Set `usePasswordFiles=true` by default ([#32347](https://github.com/bitnami/charts/pull/32347)) + +## 3.1.14 (2025-03-24) + +* [bitnami/*] Add tanzuCategory annotation (#32409) ([a8fba5c](https://github.com/bitnami/charts/commit/a8fba5cb01f6f4464ca7f69c50b0fbe97d837a95)), closes [#32409](https://github.com/bitnami/charts/issues/32409) +* [bitnami/gitea] Release 3.1.14 (#32586) ([bdb0cd7](https://github.com/bitnami/charts/commit/bdb0cd798e223e1603551f5000c63c733d6d5966)), closes [#32586](https://github.com/bitnami/charts/issues/32586) ## 3.1.13 (2025-03-05) diff --git a/bitnami/gitea/Chart.yaml b/bitnami/gitea/Chart.yaml index 76d1cbcb3b..8951f107e3 100644 --- a/bitnami/gitea/Chart.yaml +++ b/bitnami/gitea/Chart.yaml @@ -38,4 +38,4 @@ maintainers: name: gitea sources: - https://github.com/bitnami/charts/tree/main/bitnami/gitea -version: 3.1.14 +version: 3.2.0 diff --git a/bitnami/gitea/README.md b/bitnami/gitea/README.md index af4e5837a5..13ecf8d0e7 100644 --- a/bitnami/gitea/README.md +++ b/bitnami/gitea/README.md @@ -152,15 +152,16 @@ helm install my-release --set persistence.existingClaim=PVC_NAME oci://REGISTRY_ ### Common parameters -| Name | Description | Value | -| ------------------- | --------------------------------------------------------------------------------------------------------- | ----- | -| `kubeVersion` | Force target Kubernetes version (using Helm capabilities if not set) | `""` | -| `nameOverride` | String to partially override gitea.fullname template (will maintain the release name) | `""` | -| `fullnameOverride` | String to fully override gitea.fullname template | `""` | -| `namespaceOverride` | String to fully override common.names.namespace | `""` | -| `commonAnnotations` | Common annotations to add to all Gitea resources (sub-charts are not considered). Evaluated as a template | `{}` | -| `commonLabels` | Common labels to add to all Gitea resources (sub-charts are not considered). Evaluated as a template | `{}` | -| `extraDeploy` | Array of extra objects to deploy with the release (evaluated as a template). | `[]` | +| Name | Description | Value | +| ------------------- | --------------------------------------------------------------------------------------------------------- | ------ | +| `kubeVersion` | Force target Kubernetes version (using Helm capabilities if not set) | `""` | +| `nameOverride` | String to partially override gitea.fullname template (will maintain the release name) | `""` | +| `fullnameOverride` | String to fully override gitea.fullname template | `""` | +| `namespaceOverride` | String to fully override common.names.namespace | `""` | +| `commonAnnotations` | Common annotations to add to all Gitea resources (sub-charts are not considered). Evaluated as a template | `{}` | +| `commonLabels` | Common labels to add to all Gitea resources (sub-charts are not considered). Evaluated as a template | `{}` | +| `extraDeploy` | Array of extra objects to deploy with the release (evaluated as a template). | `[]` | +| `usePasswordFiles` | Mount credentials as files instead of using environment variables | `true` | ### Gitea parameters diff --git a/bitnami/gitea/templates/deployment.yaml b/bitnami/gitea/templates/deployment.yaml index 94bca1c94e..cfdcfbbe8d 100644 --- a/bitnami/gitea/templates/deployment.yaml +++ b/bitnami/gitea/templates/deployment.yaml @@ -143,18 +143,28 @@ spec: value: {{ include "gitea.databaseName" . | quote }} - name: GITEA_DATABASE_USERNAME value: {{ include "gitea.databaseUser" . | quote }} + {{- if .Values.usePasswordFiles }} + - name: GITEA_DATABASE_PASSWORD_FILE + value: {{ printf "/opt/bitnami/gitea/secrets/%s" (include "gitea.databasePasswordKey" .) }} + {{- else }} - name: GITEA_DATABASE_PASSWORD valueFrom: secretKeyRef: name: {{ include "gitea.databaseSecretName" . }} key: {{ include "gitea.databasePasswordKey" . | quote }} + {{- end }} - name: GITEA_ADMIN_USER value: {{ .Values.adminUsername | quote }} + {{- if .Values.usePasswordFiles }} + - name: GITEA_ADMIN_PASSWORD_FILE + value: {{ printf "/opt/bitnami/gitea/secrets/%s" (include "gitea.secretKey" .) }} + {{- else }} - name: GITEA_ADMIN_PASSWORD valueFrom: secretKeyRef: name: {{ include "gitea.secretName" . }} key: {{ include "gitea.secretKey" . }} + {{- end }} - name: GITEA_ADMIN_EMAIL value: {{ .Values.adminEmail | quote }} - name: GITEA_APP_NAME @@ -178,12 +188,17 @@ spec: value: {{ .Values.smtpUser | quote }} {{- end }} {{- if or .Values.smtpPassword .Values.smtpExistingSecret }} + {{- if .Values.usePasswordFiles }} + - name: GITEA_SMTP_PASSWORD_FILE + value: "/opt/bitnami/gitea/secrets/smtp-password" + {{- else }} - name: GITEA_SMTP_PASSWORD valueFrom: secretKeyRef: name: {{ include "gitea.smtpSecretName" . }} key: smtp-password {{- end }} + {{- end }} - name: GITEA_ENABLE_OPENID_SIGNIN value: {{ .Values.openid.enableSignIn | quote }} - name: GITEA_ENABLE_OPENID_SIGNUP @@ -263,6 +278,10 @@ spec: - name: empty-dir mountPath: /tmp subPath: tmp-dir + {{- if .Values.usePasswordFiles }} + - name: gitea-secrets + mountPath: /opt/bitnami/gitea/secrets + {{- end }} {{- if .Values.extraVolumeMounts }} {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }} {{- end }} @@ -272,6 +291,19 @@ spec: volumes: - name: empty-dir emptyDir: {} + {{- if .Values.usePasswordFiles }} + - name: gitea-secrets + projected: + sources: + - secret: + name: {{ include "gitea.secretName" . }} + - secret: + name: {{ include "gitea.databaseSecretName" . }} + {{- if or .Values.smtpPassword .Values.smtpExistingSecret }} + - secret: + name: {{ include "gitea.smtpSecretName" . }} + {{- end }} + {{- end }} - name: gitea-data {{- if .Values.persistence.enabled }} persistentVolumeClaim: diff --git a/bitnami/gitea/values.yaml b/bitnami/gitea/values.yaml index 2127f6a351..0615c96a8e 100644 --- a/bitnami/gitea/values.yaml +++ b/bitnami/gitea/values.yaml @@ -59,6 +59,9 @@ commonLabels: {} ## @param extraDeploy Array of extra objects to deploy with the release (evaluated as a template). ## extraDeploy: [] +## @param usePasswordFiles Mount credentials as files instead of using environment variables +## +usePasswordFiles: true ## @section Gitea parameters ##