Skip to content

Commit

Permalink
[bitnami/seaweedfs] Set usePasswordFiles=true by default (#32119)
Browse files Browse the repository at this point in the history
* [bitnami/seaweedfs] Set `usePasswordFiles=true` by default

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

* Fix metadata

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 b5b921b commit dbc5cb6
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 8 deletions.
8 changes: 6 additions & 2 deletions bitnami/seaweedfs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Changelog

## 4.6.2 (2025-02-20)
## 4.7.0 (2025-02-21)

* [bitnami/seaweedfs] Release 4.6.2 ([#32035](https://github.com/bitnami/charts/pull/32035))
* [bitnami/seaweedfs] Set `usePasswordFiles=true` by default ([#32119](https://github.com/bitnami/charts/pull/32119))

## <small>4.6.2 (2025-02-20)</small>

* [bitnami/seaweedfs] Release 4.6.2 (#32035) ([efa99db](https://github.com/bitnami/charts/commit/efa99db7094cc5f19ec968634b5a87850c40cb73)), closes [#32035](https://github.com/bitnami/charts/issues/32035)

## <small>4.6.1 (2025-02-12)</small>

Expand Down
2 changes: 1 addition & 1 deletion bitnami/seaweedfs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ name: seaweedfs
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/seawwedfs
- https://github.com/bitnami/containers/tree/main/bitnami/seaweedfs
version: 4.6.2
version: 4.7.0
1 change: 0 additions & 1 deletion bitnami/seaweedfs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1246,7 +1246,6 @@ enabled = false
| `mariadb.auth.database` | MariaDB custom database | `bitnami_seaweedfs` |
| `mariadb.auth.username` | MariaDB custom user name | `bn_seaweedfs` |
| `mariadb.auth.password` | MariaDB custom user password | `""` |
| `mariadb.auth.usePasswordFiles` | Mount credentials as a file instead of using an environment variable | `false` |
| `mariadb.initdbScripts` | Specify dictionary of scripts to be run at first boot | `{}` |
| `mariadb.primary.persistence.enabled` | Enable persistence on MariaDB using PVC(s) | `true` |
| `mariadb.primary.persistence.storageClass` | Persistent Volume storage class | `""` |
Expand Down
22 changes: 21 additions & 1 deletion bitnami/seaweedfs/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,12 @@ Returns an init-container that generates auth configuration for the Amazon S3 AP
args:
- -ec
- |
#!/bin/bash
{{- if .Values.usePasswordFiles }}
export ADMIN_ACCESS_KEY_ID="$(< $ADMIN_ACCESS_KEY_ID_FILE)"
export ADMIN_SECRET_ACCESS_KEY="$(< $ADMIN_SECRET_ACCESS_KEY_FILE)"
export READ_ACCESS_KEY_ID="$(< $READ_ACCESS_KEY_ID_FILE)"
export READ_SECRET_ACCESS_KEY="$(< $READ_SECRET_ACCESS_KEY_FILE)"
{{- end }}

cat > "/auth/config.json" <<EOF
{
Expand Down Expand Up @@ -494,6 +499,16 @@ Returns an init-container that generates auth configuration for the Amazon S3 AP
}
EOF
env:
{{- if .Values.usePasswordFiles }}
- name: ADMIN_ACCESS_KEY_ID_FILE
value: "/opt/bitnami/seaweed/secrets/admin_access_key_id"
- name: ADMIN_SECRET_ACCESS_KEY_FILE
value: "/opt/bitnami/seaweed/secrets/admin_secret_access_key"
- name: READ_ACCESS_KEY_ID_FILE
value: "/opt/bitnami/seaweed/secrets/read_access_key_id"
- name: READ_SECRET_ACCESS_KEY_FILE
value: "/opt/bitnami/seaweed/secrets/read_secret_access_key"
{{- else }}
- name: ADMIN_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
Expand All @@ -514,10 +529,15 @@ Returns an init-container that generates auth configuration for the Amazon S3 AP
secretKeyRef:
name: {{ printf "%s-auth" (include "seaweedfs.s3.fullname" .) }}
key: read_secret_access_key
{{- end }}
volumeMounts:
- name: empty-dir
mountPath: /auth
subPath: auth-dir
{{- if .Values.usePasswordFiles }}
- name: seaweed-secrets
mountPath: /opt/bitnami/seaweed/secrets
{{- end}}
{{- end -}}

{{/*
Expand Down
7 changes: 6 additions & 1 deletion bitnami/seaweedfs/templates/s3/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
app.kubernetes.io/component: s3
spec:
{{- include "seaweedfs.imagePullSecrets" . | nindent 6 }}
serviceAccountName: {{ template "seaweedfs.serviceAccountName" . }}
serviceAccountName: {{ template "seaweedfs.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.s3.automountServiceAccountToken }}
{{- if .Values.s3.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.s3.hostAliases "context" $) | nindent 8 }}
Expand Down Expand Up @@ -230,6 +230,11 @@ spec:
volumes:
- name: empty-dir
emptyDir: {}
{{- if .Values.usePasswordFiles }}
- name: seaweed-secrets
secret:
secretName: {{ printf "%s-auth" (include "seaweedfs.s3.fullname" .) }}
{{- end }}
{{- if and .Values.s3.auth.enabled .Values.s3.auth.existingSecret }}
- name: auth
secret:
Expand Down
2 changes: 0 additions & 2 deletions bitnami/seaweedfs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3826,7 +3826,6 @@ mariadb:
## @param mariadb.auth.database MariaDB custom database
## @param mariadb.auth.username MariaDB custom user name
## @param mariadb.auth.password MariaDB custom user password
## @param mariadb.auth.usePasswordFiles Mount credentials as a file instead of using an environment variable
## ref: https://github.com/bitnami/containers/tree/main/bitnami/mariadb#setting-the-root-password-on-first-run
## https://github.com/bitnami/containers/blob/main/bitnami/mariadb/README.md#creating-a-database-on-first-run
## https://github.com/bitnami/containers/blob/main/bitnami/mariadb/README.md#creating-a-database-user-on-first-run
Expand All @@ -3836,7 +3835,6 @@ mariadb:
database: bitnami_seaweedfs
username: bn_seaweedfs
password: ""
usePasswordFiles: false
## @param mariadb.initdbScripts [object] Specify dictionary of scripts to be run at first boot
##
initdbScripts:
Expand Down

0 comments on commit dbc5cb6

Please sign in to comment.