Skip to content

Commit

Permalink
Merge branch 'main' into disable_prometheus_rules
Browse files Browse the repository at this point in the history
  • Loading branch information
itay-grudev authored Mar 26, 2024
2 parents 787faed + ac0a34e commit 12f4369
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
version: v3.4.0

- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: 3.7

Expand Down
4 changes: 4 additions & 0 deletions charts/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentat
| backups.data.jobs | int | `2` | Number of data files to be archived or restored in parallel. |
| backups.destinationPath | string | `""` | Overrides the provider specific default path. Defaults to: S3: s3://<bucket><path> Azure: https://<storageAccount>.<serviceName>.core.windows.net/<clusterName><path> Google: gs://<bucket><path> |
| backups.enabled | bool | `false` | You need to configure backups manually, so backups are disabled by default. |
| backups.endpointCA | object | `{"create":false,"key":"","name":"","value":""}` | Specifies a CA bundle to validate a privately signed certificate. |
| backups.endpointCA.create | bool | `false` | Creates a secret with the given value if true, otherwise uses an existing secret. |
| backups.endpointURL | string | `""` | Overrides the provider specific default endpoint. Defaults to: S3: https://s3.<region>.amazonaws.com" |
| backups.google.applicationCredentials | string | `""` | |
| backups.google.bucket | string | `""` | |
Expand Down Expand Up @@ -191,6 +193,8 @@ refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentat
| recovery.backupName | string | `""` | Backup Recovery Method |
| recovery.clusterName | string | `""` | Object Store Recovery Method |
| recovery.destinationPath | string | `""` | Overrides the provider specific default path. Defaults to: S3: s3://<bucket><path> Azure: https://<storageAccount>.<serviceName>.core.windows.net/<clusterName><path> Google: gs://<bucket><path> |
| recovery.endpointCA | object | `{"create":false,"key":"","name":"","value":""}` | Specifies a CA bundle to validate a privately signed certificate. |
| recovery.endpointCA.create | bool | `false` | Creates a secret with the given value if true, otherwise uses an existing secret. |
| recovery.endpointURL | string | `""` | Overrides the provider specific default endpoint. Defaults to: S3: https://s3.<region>.amazonaws.com" Leave empty if using the default S3 endpoint |
| recovery.google.applicationCredentials | string | `""` | |
| recovery.google.bucket | string | `""` | |
Expand Down
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 @@ -54,6 +54,23 @@
"enabled": {
"type": "boolean"
},
"endpointCA": {
"type": "object",
"properties": {
"create": {
"type": "boolean"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"endpointURL": {
"type": "string"
},
Expand Down Expand Up @@ -338,6 +355,23 @@
"destinationPath": {
"type": "string"
},
"endpointCA": {
"type": "object",
"properties": {
"create": {
"type": "boolean"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"endpointURL": {
"type": "string"
},
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 @@ -187,6 +194,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

0 comments on commit 12f4369

Please sign in to comment.