-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow using existing secret for backup and restore #199
Conversation
Can you apply the same functionality to the google and azure secrets as well for consistency? |
Also please make sure to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to have secret.create
(default true) and secret.name
(default empty) so that one can both specify a custom name for the secret. It's pretty common.
I wonder if it could be moved to an upper level so that we don't have to repeat it for all flavors.
I did look at that initially, but I'm not sure how exactly to handle that with Azure, since it has if statements depending on the auto-created secret. |
125eb98
to
0af6d06
Compare
key: ACCESS_SECRET_KEY | ||
{{- else if eq .scope.provider "azure" }} | ||
{{- if empty .scope.destinationPath }} | ||
destinationPath: "https://{{ required "You need to specify Azure storageAccount if destinationPath is not specified." .scope.azure.storageAccount }}.{{ .scope.azure.serviceName }}.core.windows.net/{{ .scope.azure.containerName }}{{ .scope.azure.path }}" | ||
{{- end }} | ||
azureCredentials: | ||
{{ $secretName := coalesce .scope.secret.name (printf "%s-backup-azure%s-creds" .chartFullname .secretSuffix) }} | ||
{{- if .scope.azure.connectionString }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need some guidance here. Since the credentials are not defined in the values anymore, how would you suggest to handle this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an idea, since I don't know how this is handled in the operator:
Are the if statements there actually required, or will the operator be fine when specific variables leading to empty secret values are defined?
Alright, I signed off the commit and implemented the suggested parent secret property for both recovery and backups. I'm still stumbled on the azure config, see my inline comment. |
Signed-off-by: Ben Scholzen (DASPRiD) <[email protected]>
0af6d06
to
c0e0fd9
Compare
This PR allows to specify S3 credentials through an existing secret instead of having to commit the secrets with custom helm chart values.
Closes #197