Skip to content

Commit

Permalink
[bitnami/appsmith] Add support for usePasswordFiles (#32078)
Browse files Browse the repository at this point in the history
* [bitnami/appsmith] Add support for `usePasswordFiles`

Signed-off-by: Miguel Ruiz <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <[email protected]>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <[email protected]>

---------

Signed-off-by: Miguel Ruiz <[email protected]>
Signed-off-by: Bitnami Containers <[email protected]>
Co-authored-by: Bitnami Containers <[email protected]>
  • Loading branch information
migruiz4 and bitnami-bot authored Feb 24, 2025
1 parent cb5df90 commit c4826b8
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 3 deletions.
9 changes: 7 additions & 2 deletions bitnami/appsmith/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Changelog

## 5.1.12 (2025-02-13)
## 5.2.0 (2025-02-20)

* [bitnami/appsmith] Release 5.1.12 ([#31915](https://github.com/bitnami/charts/pull/31915))
* [bitnami/appsmith] Add support for `usePasswordFiles` ([#32078](https://github.com/bitnami/charts/pull/32078))

## <small>5.1.12 (2025-02-13)</small>

* [bitnami/*] Use CDN url for the Bitnami Application Icons (#31881) ([d9bb11a](https://github.com/bitnami/charts/commit/d9bb11a9076b9bfdcc70ea022c25ef50e9713657)), closes [#31881](https://github.com/bitnami/charts/issues/31881)
* [bitnami/appsmith] Release 5.1.12 (#31915) ([30ffee6](https://github.com/bitnami/charts/commit/30ffee66df76f98c23d157dd3ba6ef441e0869a0)), closes [#31915](https://github.com/bitnami/charts/issues/31915)

## <small>5.1.11 (2025-02-07)</small>

Expand Down
2 changes: 1 addition & 1 deletion bitnami/appsmith/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ maintainers:
name: appsmith
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/appsmith
version: 5.1.12
version: 5.2.0
1 change: 1 addition & 0 deletions bitnami/appsmith/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ The [Bitnami appsmith](https://github.com/bitnami/containers/tree/main/bitnami/a
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` |
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
| `usePasswordFiles` | Mount credentials as files instead of using environment variables | `true` |
| `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"]` |
Expand Down
10 changes: 10 additions & 0 deletions bitnami/appsmith/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,25 @@ Return the MongoDB Secret Name
value: {{ include "appsmith.mongodb.hosts" . | quote }}
- name: APPSMITH_DATABASE_PORT_NUMBER
value: {{ include "appsmith.mongodb.port" . | quote }}
{{- if .Values.usePasswordFiles }}
- name: APPSMITH_DATABASE_PASSWORD_FILE
value: {{ printf "/opt/bitnami/appsmith/secrets/%s" (include "appsmith.mongodb.secretKey" .) }}
{{- else }}
- name: APPSMITH_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "appsmith.mongodb.secretName" . }}
key: {{ include "appsmith.mongodb.secretKey" . }}
{{- end }}
- name: APPSMITH_DATABASE_USER
value: {{ ternary (index .Values.mongodb.auth.usernames 0) .Values.externalDatabase.username .Values.mongodb.enabled | quote }}
- name: APPSMITH_DATABASE_NAME
value: {{ ternary (index .Values.mongodb.auth.databases 0) .Values.externalDatabase.database .Values.mongodb.enabled | quote }}
{{- if .Values.usePasswordFiles }}
volumeMounts:
- name: appsmith-secrets
mountPath: /opt/bitnami/appsmith/secrets
{{- end }}
{{- end -}}

{{- define "appsmith.waitForBackendInitContainer" -}}
Expand Down
34 changes: 34 additions & 0 deletions bitnami/appsmith/templates/backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ spec:
value: {{ .Values.backend.adminUser | quote }}
- name: APPSMITH_EMAIL
value: {{ .Values.backend.adminEmail | quote }}
{{- if .Values.usePasswordFiles }}
- name: APPSMITH_PASSWORD_FILE
value: {{ printf "/opt/bitnami/appsmith/secrets/%s" (include "appsmith.backend.password.secretKey" .) }}
- name: APPSMITH_ENCRYPTION_PASSWORD_FILE
value: {{ printf "/opt/bitnami/appsmith/secrets/%s" (include "appsmith.backend.encryptionPassword.secretKey" .) }}
- name: APPSMITH_ENCRYPTION_SALT_FILE
value: {{ printf "/opt/bitnami/appsmith/secrets/%s" (include "appsmith.backend.encryptionSalt.secretKey" .) }}
{{- else }}
- name: APPSMITH_PASSWORD
valueFrom:
secretKeyRef:
Expand All @@ -160,15 +168,21 @@ spec:
secretKeyRef:
name: {{ include "appsmith.backend.secretName" . }}
key: {{ include "appsmith.backend.encryptionSalt.secretKey" . }}
{{- end }}
- name: APPSMITH_DATABASE_HOST
value: {{ include "appsmith.mongodb.hosts" . | quote }}
- name: APPSMITH_DATABASE_PORT_NUMBER
value: {{ include "appsmith.mongodb.port" . | quote }}
{{- if .Values.usePasswordFiles }}
- name: APPSMITH_DATABASE_PASSWORD_FILE
value: {{ printf "/opt/bitnami/appsmith/secrets/%s" (include "appsmith.mongodb.secretKey" .) }}
{{- else }}
- name: APPSMITH_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "appsmith.mongodb.secretName" . }}
key: {{ include "appsmith.mongodb.secretKey" . }}
{{- end }}
- name: APPSMITH_DATABASE_USER
value: {{ ternary (index .Values.mongodb.auth.usernames 0) .Values.externalDatabase.username .Values.mongodb.enabled | quote }}
- name: APPSMITH_DATABASE_NAME
Expand All @@ -179,11 +193,16 @@ spec:
value: {{ include "appsmith.redis.host" . | quote }}
- name: APPSMITH_REDIS_PORT_NUMBER
value: {{ include "appsmith.redis.port" . | quote }}
{{- if .Values.usePasswordFiles }}
- name: APPSMITH_REDIS_PASSWORD_FILE
value: {{ printf "/opt/bitnami/appsmith/secrets/%s" (include "appsmith.redis.secretKey" .) }}
{{- else }}
- name: APPSMITH_REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "appsmith.redis.secretName" . }}
key: {{ include "appsmith.redis.secretKey" . }}
{{- end }}
- name: APPSMITH_RTS_PORT
value: {{ .Values.rts.containerPorts.http | quote }}
{{- if .Values.backend.persistence.gitDataPath }}
Expand Down Expand Up @@ -263,6 +282,10 @@ spec:
- name: empty-dir
mountPath: /tmp
subPath: tmp-dir
{{- if .Values.usePasswordFiles }}
- name: appsmith-secrets
mountPath: /opt/bitnami/appsmith/secrets
{{- end }}
- name: data
mountPath: {{ .Values.backend.persistence.mountPath }}
{{- if .Values.backend.persistence.subPath }}
Expand Down Expand Up @@ -356,6 +379,17 @@ spec:
- name: haproxy-conf
configMap:
name: {{ include "appsmith.redirect.fullname" . }}
{{- if .Values.usePasswordFiles }}
- name: appsmith-secrets
projected:
sources:
- secret:
name: {{ include "appsmith.backend.secretName" . }}
- secret:
name: {{ include "appsmith.mongodb.secretName" . }}
- secret:
name: {{ include "appsmith.redis.secretName" . }}
{{- end }}
- name: data
{{- if .Values.backend.persistence.enabled }}
persistentVolumeClaim:
Expand Down
20 changes: 20 additions & 0 deletions bitnami/appsmith/templates/rts/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,16 @@ spec:
value: {{ include "appsmith.mongodb.hosts" . | quote }}
- name: APPSMITH_DATABASE_PORT_NUMBER
value: {{ include "appsmith.mongodb.port" . | quote }}
{{- if .Values.usePasswordFiles }}
- name: APPSMITH_DATABASE_PASSWORD_FILE
value: {{ printf "/opt/bitnami/appsmith/secrets/%s" (include "appsmith.mongodb.secretKey" .) }}
{{- else }}
- name: APPSMITH_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "appsmith.mongodb.secretName" . }}
key: {{ include "appsmith.mongodb.secretKey" . }}
{{- end }}
- name: APPSMITH_DATABASE_USER
value: {{ ternary (index .Values.mongodb.auth.usernames 0) .Values.externalDatabase.username .Values.mongodb.enabled | quote }}
- name: APPSMITH_DATABASE_NAME
Expand Down Expand Up @@ -187,6 +192,10 @@ spec:
- name: empty-dir
mountPath: /tmp
subPath: tmp-dir
{{- if .Values.usePasswordFiles }}
- name: appsmith-secrets
mountPath: /opt/bitnami/appsmith/secrets
{{- end }}
{{- if .Values.rts.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.rts.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
Expand All @@ -196,6 +205,17 @@ spec:
volumes:
- name: empty-dir
emptyDir: {}
{{- if .Values.usePasswordFiles }}
- name: appsmith-secrets
projected:
sources:
- secret:
name: {{ include "appsmith.mongodb.secretName" . }}
items:
# Only copy database password
- key: {{ include "appsmith.mongodb.secretKey" . }}
path: {{ include "appsmith.mongodb.secretKey" . }}
{{- end }}
{{- if .Values.rts.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.rts.extraVolumes "context" $) | nindent 8 }}
{{- end }}
3 changes: 3 additions & 0 deletions bitnami/appsmith/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ clusterDomain: cluster.local
## @param extraDeploy Array of extra objects to deploy with the release
##
extraDeploy: []
## @param usePasswordFiles Mount credentials as files instead of using environment variables
##
usePasswordFiles: true
## Enable diagnostic mode in the deployment
##
diagnosticMode:
Expand Down

0 comments on commit c4826b8

Please sign in to comment.