Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentat
| recovery.owner | string | `""` | Name of the owner of the database in the instance to be used by applications. Defaults to the value of the `database` key. |
| recovery.pgBaseBackup.database | string | `"app"` | Name of the database used by the application. Default: `app`. |
| recovery.pgBaseBackup.owner | string | `""` | Name of the owner of the database in the instance to be used by applications. Defaults to the value of the `database` key. |
| recovery.pgBaseBackup.secret | string | `""` | Name of the secret containing the initial credentials for the owner of the user database. If empty a new secret will be created from scratch |
| recovery.pgBaseBackup.secretName | string | `""` | Name of the secret containing the initial credentials for the owner of the user database. If empty a new secret will be created from scratch. The secret should include |
| recovery.pgBaseBackup.source.database | string | `"app"` | |
| recovery.pgBaseBackup.source.host | string | `""` | |
| recovery.pgBaseBackup.source.passwordSecret.create | bool | `false` | Whether to create a secret for the password |
Expand Down
4 changes: 2 additions & 2 deletions charts/cluster/templates/_bootstrap.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ bootstrap:
{{ with .Values.recovery.pgBaseBackup.owner }}
owner: {{ . }}
{{- end }}
{{ with .Values.recovery.pgBaseBackup.secret }}
{{ with .Values.recovery.pgBaseBackup.secretName }}
secret:
{{- toYaml . | nindent 6 }}
name: {{ . }}
{{- end }}

externalClusters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ recovery:
sslCertSecret:
name: source-cluster-replication
key: tls.crt
secretName: "mysecret"

cluster:
instances: 2
Expand Down
8 changes: 8 additions & 0 deletions charts/cluster/test/postgresql-pg_basebackup/02-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: mysecret
type: kubernetes.io/basic-auth
data:
username: YXBw
password: cGFzc3dvcmQ=
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ spec:
--values ./02-pg_basebackup-cluster.yaml \
--wait \
pg-basebackup ../../
- apply:
file: ./02-secret.yaml
- assert:
file: ./02-pg_basebackup-cluster-assert.yaml
catch:
Expand Down
2 changes: 1 addition & 1 deletion charts/cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@
"owner": {
"type": "string"
},
"secret": {
"secretName": {
"type": "string"
},
"source": {
Expand Down
4 changes: 2 additions & 2 deletions charts/cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ recovery:
pgBaseBackup:
# -- Name of the database used by the application. Default: `app`.
database: app
# -- Name of the secret containing the initial credentials for the owner of the user database. If empty a new secret will be created from scratch
secret: ""
# -- Name of the kubernetes.io/basic-auth secret containing the initial credentials for the owner of the user database. If empty a new secret will be created from scratch.
secretName: ""
# -- Name of the owner of the database in the instance to be used by applications. Defaults to the value of the `database` key.
owner: ""
source:
Expand Down
Loading