-
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: allow using existing secret for backup and restore
Signed-off-by: Ben Scholzen (DASPRiD) <[email protected]>
- Loading branch information
Showing
9 changed files
with
57 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
{{- 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: | ||
{{- if empty .Values.backups.secret.name }} | ||
name: {{ include "cluster.fullname" . }}-backup-azure-creds | ||
{{- else }} | ||
name: {{ .Values.backups.secret.name }} | ||
{{- end }} | ||
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,11 +1,15 @@ | ||
{{- 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: | ||
{{- if empty .Values.recovery.secret.name }} | ||
name: {{ include "cluster.fullname" . }}-backup-azure-recovery-creds | ||
{{- else }} | ||
name: {{ .Values.recovery.secret.name }} | ||
{{- end }} | ||
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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
{{- 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: | ||
{{- if empty .Values.backups.secret.name }} | ||
name: {{ include "cluster.fullname" . }}-backup-google-creds | ||
{{- else }} | ||
name: {{ .Values.backups.secret.name }} | ||
{{- end }} | ||
data: | ||
APPLICATION_CREDENTIALS: {{ .Values.backups.google.applicationCredentials | 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,12 @@ | ||
{{- if and (eq .Values.mode "recovery" ) (eq .Values.recovery.method "object_store") (eq .Values.recovery.provider "google") }} | ||
{{- 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: | ||
{{- if empty .Values.recovery.secret.name }} | ||
name: {{ include "cluster.fullname" . }}-backup-google-recovery-creds | ||
{{- else }} | ||
name: {{ .Values.recovery.secret.name }} | ||
{{- end }} | ||
data: | ||
APPLICATION_CREDENTIALS: {{ .Values.recovery.google.applicationCredentials | 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
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,13 @@ | ||
{{- 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: | ||
{{- if empty .Values.recovery.secret.name }} | ||
name: {{ include "cluster.fullname" . }}-backup-s3-recovery-creds | ||
{{- else }} | ||
name: {{ .Values.recovery.secret.name }} | ||
{{- end }} | ||
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