Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
42 changes: 22 additions & 20 deletions docs/public/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,17 @@ This sections describes all possible deploy parameters per Helm Chart per compon

The general parameters used for the configurations are specified below.

| Parameter | Type | Mandatory | Default value | Description |
|-----------------------|--------|-----------|---------------|----------------------------------------------------------------------------------------|
| postgresUser | string | no | postgres | Specifies the name of the database superuser. |
| postgresPassword | string | yes | p@ssWOrD1 | Specifies the password for the database superuser. |
| replicatorPassword | string | no | replicator | Specifies the password for the database replicator. |
| serviceAccount.create | bool | no | true | Specifies whether a service account needs to be created. |
| serviceAccount.name | string | no | postgres-sa | Specifies name of the Service Account under which Postgres Operator will work. |
| runTestsOnly | bool | no | false | Indicates whether to run Integration Tests (skipping deploy step) only or not. |
| affinity | json | no | n/a | Defines affinity scheduling rules for all components. Can be overridden per component. |
| podLabels | yaml | no | n/a | Specifies custom pod labels for all the components. Can be overridden per component. |
| Parameter | Type | Mandatory | Default value | Description |
|----------------------------|--------|-----------|---------------|----------------------------------------------------------------------------------------|
| pvc.metadata.annotations | map[string]string | no | n/a | Global annotations applied to all PVCs created by the operator. Use `argocd.argoproj.io/sync-options: Prune=false` to protect all PVCs from ArgoCD pruning. Storage-specific annotations override global ones. |
| postgresUser | string | no | postgres | Specifies the name of the database superuser. |
| postgresPassword | string | yes | p@ssWOrD1 | Specifies the password for the database superuser. |
| replicatorPassword | string | no | replicator | Specifies the password for the database replicator. |
| serviceAccount.create | bool | no | true | Specifies whether a service account needs to be created. |
| serviceAccount.name | string | no | postgres-sa | Specifies name of the Service Account under which Postgres Operator will work. |
| runTestsOnly | bool | no | false | Indicates whether to run Integration Tests (skipping deploy step) only or not. |
| affinity | json | no | n/a | Defines affinity scheduling rules for all components. Can be overridden per component. |
| podLabels | yaml | no | n/a | Specifies custom pod labels for all the components. Can be overridden per component. |

**Note**: `postgresUser` is not the user which will be created during deployment. You should mention here the user which is already present with superuser role. If you need to use some other user instead of postgres, you should create the desired user manually with superuser role.

Expand Down Expand Up @@ -340,16 +341,17 @@ Patroni Core Operator allows configuration of TLS for PostgreSQL. By default, re

The general parameters used for the configurations are specified below.

| Parameter | Type | Mandatory | Default value | Description |
|------------------------|--------|-----------|---------------|----------------------------------------------------------------------------------------|
| postgresUser | string | no | postgres | Specifies the name of the database superuser. |
| postgresPassword | string | yes | p@ssWOrD1 | Specifies the password for the database superuser. |
| replicatorPassword | string | no | replicator | Specifies the password for the database replicator. |
| serviceAccount.create | bool | no | true | Specifies whether a service account needs to be created. |
| serviceAccount.name | string | no | postgres-sa | Specifies name of the Service Account under which Postgres Operator will work. |
| runTestsOnly | bool | no | false | Indicates whether to run Integration Tests (skipping deploy step) only or not. |
| affinity | json | no | n/a | Defines affinity scheduling rules for all components. Can be overridden per component. |
| podLabels | yaml | no | n/a | Specifies custom pod labels for all the components. Can be overridden per component. |
| Parameter | Type | Mandatory | Default value | Description |
|--------------------------|--------|-----------|---------------|----------------------------------------------------------------------------------------|
| pvc.metadata.annotations | map[string]string | no | n/a | Global annotations applied to all PVCs created by the operator. Use `argocd.argoproj.io/sync-options: Prune=false` to protect all PVCs from ArgoCD pruning. Storage-specific annotations override global ones. |
| postgresUser | string | no | postgres | Specifies the name of the database superuser. |
| postgresPassword | string | yes | p@ssWOrD1 | Specifies the password for the database superuser. |
| replicatorPassword | string | no | replicator | Specifies the password for the database replicator. |
| serviceAccount.create | bool | no | true | Specifies whether a service account needs to be created. |
| serviceAccount.name | string | no | postgres-sa | Specifies name of the Service Account under which Postgres Operator will work. |
| runTestsOnly | bool | no | false | Indicates whether to run Integration Tests (skipping deploy step) only or not. |
| affinity | json | no | n/a | Defines affinity scheduling rules for all components. Can be overridden per component. |
| podLabels | yaml | no | n/a | Specifies custom pod labels for all the components. Can be overridden per component. |

**Note**: `postgresUser` is not the user which will be created during deployment. You should mention here the user which is already present with superuser role. If you need to use some other user instead of postgres, you should create the desired user manually with superuser role.

Expand Down
29 changes: 24 additions & 5 deletions operator/charts/patroni-core/templates/cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,15 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{ if .Values.patroni.storage.annotations }}
{{- if or .Values.pvc.metadata.annotations .Values.patroni.storage.annotations }}
annotations:
{{- toYaml .Values.patroni.storage.annotations | nindent 8 }}
{{ end }}
{{- if .Values.pvc.metadata.annotations }}
{{- toYaml .Values.pvc.metadata.annotations | nindent 8 }}
{{- end }}
{{- if .Values.patroni.storage.annotations }}
{{- toYaml .Values.patroni.storage.annotations | nindent 8 }}
{{- end }}
{{- end }}
{{ if .Values.patroni.standbyCluster }}
standbyCluster:
host: {{ .Values.patroni.standbyCluster.host }}
Expand All @@ -149,7 +154,14 @@ spec:
{{ if .Values.patroni.pgWalStorage }}
pgWalStorageAutoManage: {{ default "false" .Values.patroni.pgWalStorageAutoManage }}
pgWalStorage:
{{ toYaml .Values.patroni.pgWalStorage | indent 6 }}
{{- $walStorage := .Values.patroni.pgWalStorage | deepCopy }}
{{- if and .Values.pvc.metadata.annotations (not $walStorage.annotations) }}
{{- $_ := set $walStorage "annotations" .Values.pvc.metadata.annotations }}
{{- else if and .Values.pvc.metadata.annotations $walStorage.annotations }}
{{- $merged := merge $walStorage.annotations .Values.pvc.metadata.annotations }}
{{- $_ := set $walStorage "annotations" $merged }}
{{- end }}
{{ toYaml $walStorage | indent 6 }}
{{ end }}
forceCollationVersionUpgrade: {{ default "false" .Values.patroni.forceCollationVersionUpgrade }}
{{- if .Values.patroni.ignoreSlots }}
Expand Down Expand Up @@ -183,7 +195,14 @@ spec:
backupFromStandby: {{ .Values.pgBackRest.backupFromStandby | default false }}
{{ if .Values.pgBackRest.rwx }}
rwx:
{{ toYaml .Values.pgBackRest.rwx | indent 6 }}
{{- $rwxStorage := .Values.pgBackRest.rwx | deepCopy }}
{{- if and .Values.pvc.metadata.annotations (not $rwxStorage.annotations) }}
{{- $_ := set $rwxStorage "annotations" .Values.pvc.metadata.annotations }}
{{- else if and .Values.pvc.metadata.annotations $rwxStorage.annotations }}
{{- $merged := merge $rwxStorage.annotations .Values.pvc.metadata.annotations }}
{{- $_ := set $rwxStorage "annotations" $merged }}
{{- end }}
{{ toYaml $rwxStorage | indent 6 }}
{{ end }}
{{ if .Values.pgBackRest.s3 }}
s3:
Expand Down
20 changes: 20 additions & 0 deletions operator/charts/patroni-core/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@
"type": "object",
"additionalProperties": true,
"properties": {
"pvc": {
"type": "object",
"additionalProperties": false,
"description": "Global PVC configuration",
"properties": {
"metadata": {
"type": "object",
"additionalProperties": false,
"properties": {
"annotations": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Global annotations applied to all PVCs. Storage-specific annotations will override these."
}
}
}
}
},
"postgresUser": {
"type": "string",
"default": "postgres",
Expand Down
23 changes: 12 additions & 11 deletions operator/charts/patroni-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
## This is a YAML-formatted file.
## Declare variables to be passed into your templates.

# Global PVC annotations applied to all PersistentVolumeClaims created by the operator.
# Use this to protect PVCs from ArgoCD pruning or add custom metadata.
# Storage-specific annotations will override these global annotations if both are set.
# Example:
# pvc:
# metadata:
# annotations:
# argocd.argoproj.io/sync-options: Prune=false
pvc:
metadata:
annotations: {}

# The name of database superuser.
postgresUser: postgres
# The password for the database superuser.
Expand Down Expand Up @@ -185,11 +197,6 @@ patroni:
type: pv
# Size of the PVC that will be create for each of Patroni Pod as mount for data files
size: 5Gi
# Optional annotations to apply to PVCs created for Patroni storage.
# Use this to protect PVCs from ArgoCD pruning or add custom metadata.
# Example: Prevent ArgoCD from deleting PVCs during sync:
# annotations:
# argocd.argoproj.io/sync-options: Prune=false
# Parameter specifies the list of labels that is used to bind suitable
# persistent volumes with the persistent volume claims
# selectors:
Expand Down Expand Up @@ -233,10 +240,6 @@ patroni:
# type: provisioned
# Size of the PVC that will be created for each of Patroni Pod as mount for data files
# size: 10Gi
# Optional annotations to apply to PVCs created for WAL storage.
# Use this to protect PVCs from ArgoCD pruning or add custom metadata.
# annotations:
# argocd.argoproj.io/sync-options: Prune=false
# Parameter specifies the list of labels that is used to bind suitable
# persistent volumes with the persistent volume claims
# selectors:
Expand Down Expand Up @@ -269,8 +272,6 @@ patroni:
# size: 3Gi
# volumes:
# - pg-backrest-backups-pv-1
# annotations:
# argocd.argoproj.io/sync-options: Prune=false
# s3:
# bucket: "pgbackrest"
# endpoint: "https://minio-service"
Expand Down
11 changes: 8 additions & 3 deletions operator/charts/patroni-services/templates/cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,15 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{ if .Values.backupDaemon.storage.annotations }}
{{- if or .Values.pvc.metadata.annotations .Values.backupDaemon.storage.annotations }}
annotations:
{{- toYaml .Values.backupDaemon.storage.annotations | nindent 8 }}
{{ end }}
{{- if .Values.pvc.metadata.annotations }}
{{- toYaml .Values.pvc.metadata.annotations | nindent 8 }}
{{- end }}
{{- if .Values.backupDaemon.storage.annotations }}
{{- toYaml .Values.backupDaemon.storage.annotations | nindent 8 }}
{{- end }}
{{- end }}
{{ if .Values.backupDaemon.priorityClassName }}
priorityClassName: {{ .Values.backupDaemon.priorityClassName }}
{{ end }}
Expand Down
20 changes: 20 additions & 0 deletions operator/charts/patroni-services/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@
"type": "object",
"additionalProperties": true,
"properties": {
"pvc": {
"type": "object",
"additionalProperties": false,
"description": "Global PVC configuration",
"properties": {
"metadata": {
"type": "object",
"additionalProperties": false,
"properties": {
"annotations": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Global annotations applied to all PVCs. Storage-specific annotations will override these."
}
}
}
}
},
"postgresUser": {
"type": "string",
"default": "postgres",
Expand Down
19 changes: 12 additions & 7 deletions operator/charts/patroni-services/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
## This is a YAML-formatted file.
## Declare variables to be passed into your templates.

# Global PVC annotations applied to all PersistentVolumeClaims created by the operator.
# Use this to protect PVCs from ArgoCD pruning or add custom metadata.
# Storage-specific annotations will override these global annotations if both are set.
# Example:
# pvc:
# metadata:
# annotations:
# argocd.argoproj.io/sync-options: Prune=false
pvc:
metadata:
annotations: {}

# The name of database superuser.
postgresUser: postgres
# The password for the database superuser.
Expand Down Expand Up @@ -213,11 +225,6 @@ backupDaemon:
type: provisioned
# Size of the PVC that will be create for each of Patroni Pod as mount for data files
size: 1Gi
# Optional annotations to apply to PVCs created for backup daemon storage.
# Use this to protect PVCs from ArgoCD pruning or add custom metadata.
# Example: Prevent ArgoCD from deleting PVCs during sync:
# annotations:
# argocd.argoproj.io/sync-options: Prune=false
# Parameter specifies the list of labels that is used to bind suitable
# persistent volumes with the persistent volume claims
# selectors:
Expand Down Expand Up @@ -245,8 +252,6 @@ backupDaemon:
# size: 3Gi
# volumes:
# - pg-backrest-backups-pv-1
# annotations:
# argocd.argoproj.io/sync-options: Prune=false
# s3:
# bucket: "pgbackrest"
# endpoint: "https://minio-service"
Expand Down
Loading