Skip to content
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

Add config value endpointCA for private S3 such as MinIO #230

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions charts/cluster/templates/_barman_object_store.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
endpointURL: {{ .scope.endpointURL }}
{{- end }}

{{- if or (.scope.endpointCA.create) (.scope.endpointCA.name) }}
endpointCA:
name: {{ .chartFullname }}-ca-bundle
key: ca-bundle.crt
{{- end }}

{{- if .scope.destinationPath }}
destinationPath: {{ .scope.destinationPath }}
{{- end }}
Expand Down
9 changes: 9 additions & 0 deletions charts/cluster/templates/ca-bundle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- if .Values.backups.endpointCA.create }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.backups.endpointCA.name | default (printf "%s-ca-bundle" (include "cluster.fullname" .)) | quote }}
data:
{{ .Values.backups.endpointCA.key | default "ca-bundle.crt" | quote }}: {{ .Values.backups.endpointCA.value }}

{{- end }}
34 changes: 34 additions & 0 deletions charts/cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@
"endpointURL": {
"type": "string"
},
"endpointCA": {
"type": "object",
"properties": {
"createSecret": {
"type": "boolean"
},
"name": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"google": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -338,6 +355,23 @@
"endpointURL": {
"type": "string"
},
"endpointCA": {
"type": "object",
"properties": {
"createSecret": {
"type": "boolean"
},
"name": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"google": {
"type": "object",
"properties": {
Expand Down
14 changes: 14 additions & 0 deletions charts/cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ recovery:
# S3: https://s3.<region>.amazonaws.com"
# Leave empty if using the default S3 endpoint
endpointURL: ""
# -- Specifies a CA bundle to validate a privately signed certificate.
endpointCA:
# -- Creates a secret with the given value if true, otherwise uses an existing secret.
create: false
name: ""
key: ""
value: ""
# -- Overrides the provider specific default path. Defaults to:
# S3: s3://<bucket><path>
# Azure: https://<storageAccount>.<serviceName>.core.windows.net/<clusterName><path>
Expand Down Expand Up @@ -184,6 +191,13 @@ backups:
# -- Overrides the provider specific default endpoint. Defaults to:
# S3: https://s3.<region>.amazonaws.com"
endpointURL: "" # Leave empty if using the default S3 endpoint
# -- Specifies a CA bundle to validate a privately signed certificate.
endpointCA:
# -- Creates a secret with the given value if true, otherwise uses an existing secret.
create: false
name: ""
key: ""
value: ""

# -- Overrides the provider specific default path. Defaults to:
# S3: s3://<bucket><path>
Expand Down
Loading