-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cluster): allow using existing secret for backup and restore (#239)
* Renamed barmanObjectStore secrets for consistency * feat(cluster): allow using existing secret for backup and restore Signed-off-by: Itay Grudev <[email protected]> Signed-off-by: Itay Grudev <[email protected]> Co-authored-by: Ben Scholzen (DASPRiD) <[email protected]> Co-authored-by: Cr4mble <[email protected]>
- Loading branch information
1 parent
7da043f
commit a123fb4
Showing
11 changed files
with
49 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{{- if and .Values.backups.enabled (eq .Values.backups.provider "azure") }} | ||
{{- if and .Values.backups.enabled (eq .Values.backups.provider "azure") .Values.backups.secret.create }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "cluster.fullname" . }}-backup-azure-creds | ||
name: {{ default (printf "%s-backup-azure-creds" (include "cluster.fullname" .)) .Values.backups.secret.name }} | ||
data: | ||
AZURE_CONNECTION_STRING: {{ .Values.backups.azure.connectionString | b64enc | quote }} | ||
AZURE_STORAGE_ACCOUNT: {{ .Values.backups.azure.storageAccount | b64enc | quote }} | ||
AZURE_STORAGE_KEY: {{ .Values.backups.azure.storageKey | b64enc | quote }} | ||
AZURE_STORAGE_SAS_TOKEN: {{ .Values.backups.azure.storageSasToken | b64enc | quote }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{{- if and .Values.backups.enabled (eq .Values.backups.provider "google") }} | ||
{{- if and .Values.backups.enabled (eq .Values.backups.provider "google") .Values.backups.secret.create }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "cluster.fullname" . }}-backup-google-creds | ||
name: {{ default (printf "%s-backup-google-creds" (include "cluster.fullname" .)) .Values.backups.secret.name }} | ||
data: | ||
APPLICATION_CREDENTIALS: {{ .Values.backups.google.applicationCredentials | b64enc | quote }} | ||
{{- end }} | ||
{{- end }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...emplates/backup-azure-recovery-creds.yaml → ...uster/templates/recovery-azure-creds.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{{- if and (eq .Values.mode "recovery" ) (eq .Values.recovery.method "object_store") (eq .Values.recovery.provider "azure") }} | ||
{{- if and (eq .Values.mode "recovery" ) (eq .Values.recovery.method "object_store") (eq .Values.recovery.provider "azure") .Values.recovery.secret.create }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "cluster.fullname" . }}-backup-azure-recovery-creds | ||
name: {{ default (printf "%s-recovery-azure-creds" (include "cluster.fullname" .)) .Values.recovery.secret.name }} | ||
data: | ||
AZURE_CONNECTION_STRING: {{ .Values.recovery.azure.connectionString | b64enc | quote }} | ||
AZURE_STORAGE_ACCOUNT: {{ .Values.recovery.azure.storageAccount | b64enc | quote }} | ||
AZURE_STORAGE_KEY: {{ .Values.recovery.azure.storageKey | b64enc | quote }} | ||
AZURE_STORAGE_SAS_TOKEN: {{ .Values.recovery.azure.storageSasToken | b64enc | quote }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{{- if and (eq .Values.mode "recovery" ) (eq .Values.recovery.method "object_store") (eq .Values.recovery.provider "google") .Values.recovery.secret.create }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ default (printf "%s-recovery-google-creds" (include "cluster.fullname" .)) .Values.recovery.secret.name }} | ||
data: | ||
APPLICATION_CREDENTIALS: {{ .Values.recovery.google.applicationCredentials | b64enc | quote }} | ||
{{- end }} |
6 changes: 3 additions & 3 deletions
6
...r/templates/backup-s3-recovery-creds.yaml → .../cluster/templates/recovery-s3-creds.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{{- if and (eq .Values.mode "recovery" ) (eq .Values.recovery.method "object_store") (eq .Values.recovery.provider "s3") }} | ||
{{- if and (eq .Values.mode "recovery" ) (eq .Values.recovery.method "object_store") (eq .Values.recovery.provider "s3") .Values.recovery.secret.create }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "cluster.fullname" . }}-backup-s3-recovery-creds | ||
name: {{ default (printf "%s-recovery-s3-creds" (include "cluster.fullname" .)) .Values.recovery.secret.name }} | ||
data: | ||
ACCESS_KEY_ID: {{ required ".Values.recovery.s3.accessKey is required, but not specified." .Values.recovery.s3.accessKey | b64enc | quote }} | ||
ACCESS_SECRET_KEY: {{ required ".Values.recovery.s3.secretKey is required, but not specified." .Values.recovery.s3.secretKey | b64enc | quote }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters