Skip to content

Commit

Permalink
Implemented @gpothier's recommendations
Browse files Browse the repository at this point in the history
Signed-off-by: Itay Grudev <[email protected]>
  • Loading branch information
itay-grudev committed May 24, 2024
1 parent 5a516ea commit 45b561e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions charts/cluster/templates/_barman_object_store.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- define "cluster.barmanObjectStoreConfig" -}}

{{- if .scope.endpointURL }}
endpointURL: {{ .scope.endpointURL }}
endpointURL: {{ .scope.endpointURL | quote }}
{{- end }}

{{- if or (.scope.endpointCA.create) (.scope.endpointCA.name) }}
Expand All @@ -18,8 +18,8 @@
{{- if empty .scope.endpointURL }}
endpointURL: "https://s3.{{ required "You need to specify S3 region if endpointURL is not specified." .scope.s3.region }}.amazonaws.com"
{{- end }}
{{- if empty .scope.destinationPath -}}
{{ " destinationPath: \"s3://" }}{{ required "You need to specify S3 bucket if destinationPath is not specified." .scope.s3.bucket }}{{ .scope.s3.path }}"
{{- if empty .scope.destinationPath }}
destinationPath: "s3://{{ required "You need to specify S3 bucket if destinationPath is not specified." .scope.s3.bucket }}{{ .scope.s3.path }}"
{{- end }}
{{- $secretName := coalesce .scope.secret.name (printf "%s-%s-s3-creds" .chartFullname .secretSuffix) -}}
s3Credentials:
Expand All @@ -30,10 +30,10 @@
name: {{ $secretName }}
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 }}"
{{- 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 }}
{{- $secretName := coalesce .scope.secret.name (printf "%s-%s-azure-creds" .chartFullname .secretSuffix) -}}
{{- $secretName := coalesce .scope.secret.name (printf "%s-%s-azure-creds" .chartFullname .secretSuffix) }}
azureCredentials:
{{- if .scope.azure.connectionString }}
connectionString:
Expand All @@ -54,10 +54,10 @@
{{- end }}
{{- end }}
{{- else if eq .scope.provider "google" }}
{{- if empty .scope.destinationPath -}}
{{ " destinationPath: \"gs://" }}{{ required "You need to specify Google storage bucket if destinationPath is not specified." .scope.google.bucket }}{{ .scope.google.path }}"
{{- if empty .scope.destinationPath }}
destinationPath: "gs://{{ required "You need to specify Google storage bucket if destinationPath is not specified." .scope.google.bucket }}{{ .scope.google.path }}"
{{- end }}
{{- $secretName := coalesce .scope.secret.name (printf "%s-%s-google-creds" .chartFullname .secretSuffix) -}}
{{- $secretName := coalesce .scope.secret.name (printf "%s-%s-google-creds" .chartFullname .secretSuffix) }}
googleCredentials:
gkeEnvironment: {{ .scope.google.gkeEnvironment }}
applicationCredentials:
Expand Down

0 comments on commit 45b561e

Please sign in to comment.