Skip to content

Commit

Permalink
Updated readme and values
Browse files Browse the repository at this point in the history
Signed-off-by: Tarun Singh <[email protected]>
  • Loading branch information
tarunsinghot committed Dec 24, 2024
1 parent 9135799 commit 99ef8db
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
41 changes: 41 additions & 0 deletions charts/pg-operator-db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,23 @@ helm install my-db <path-to-chart> --namespace my-namespace

The chart can be customized using the following configurable parameters:

#These parameters are for pg-operator:

| Parameter | Description | Default |
| -------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------- |
| `image` | PG Operator Container image full path | `percona/percona-postgresql-operator:2.5.0` |
| `imagePullPolicy` | PG Operator Container pull policy | `Always` |
| `resources` | Resource requests and limits | `{}` |
| `nodeSelector` | Labels for Pod assignment | `{}` |
| `logStructured` | Force PG operator to print JSON-wrapped log messages | `false` |
| `logLevel` | PG Operator logging level | `INFO` |
| `disableTelemetry` | Disable sending PG Operator telemetry data to Percona | `false` |
| `podAnnotations` | Add annotations to the Operator Pod | `{}` |
| `watchNamespace` | Set this variable if the target cluster namespace differs from operators namespace | `` |
| `watchAllNamespaces` | K8S Cluster-wide operation | `false`

#These parameters are for pg-db:

| Parameter | Description | Default |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| `finalizers` | Finalizers list | `{}` |
Expand Down Expand Up @@ -222,6 +239,30 @@ The chart can be customized using the following configurable parameters:
| `secrets.pgbouncer` | pgbouncer user password | `autogenerated by operator` |
| `secrets.<default_user>` | Default user password | `autogenerated by operator` |

# Parameters for Backup

| Parameter | Description |
| --------------- | -------------------------------------------------- |
| `enabled` | Specifies whether the backup is enabled |
| `annotations` | Annotations for the resource |
| `name` | Name of the backup resource |
| `labels` | Labels for the resource |
| `pgCluster` | Name of the PostgreSQL cluster to backup |
| `repoName` | Name of the storage configuration for the backup |
| `options` | Additional options for the backup operation |

# Parameters for Restore

| Parameter | Description |
| --------------- | -------------------------------------------------- |
| `enabled` | Specifies whether the restore is enabled |
| `annotations` | Annotations for the resource |
| `name` | Name of the restore resource |
| `labels` | Labels for the resource |
| `pgCluster` | Name of the PostgreSQL cluster to restore |
| `repoName` | Name of the backup repository to restore from |
| `options` | Additional options for the restore operation |

Specify parameters using `--set key=value[,key=value]` argument to `helm install`
Notice that you can use multiple replica sets only with sharding enabled.

Expand Down
8 changes: 8 additions & 0 deletions charts/pg-operator-db/templates/backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ apiVersion: pgv2.percona.com/v2
kind: PerconaPGBackup
metadata:
name: {{ .Values.backup.name }}
{{- if .Values.backup.annotations }}
annotations:
{{ .Values.backup.annotations | toYaml | indent 4 }}
{{- end }}
{{- if .Values.backup.labels }}
labels:
{{ .Values.backup.labels | toYaml | indent 4 }}
{{- end }}
spec:
pgCluster: {{ .Values.backup.pgCluster }}
repoName: {{ .Values.backup.repoName }}
Expand Down
8 changes: 8 additions & 0 deletions charts/pg-operator-db/templates/restore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ apiVersion: pgv2.percona.com/v2
kind: PerconaPGRestore
metadata:
name: {{ .Values.restore.name }}
{{- if .Values.restore.annotations }}
annotations:
{{ .Values.restore.annotations | toYaml | indent 4 }}
{{- end }}
{{- if .Values.restore.labels }}
labels:
{{ .Values.restore.labels | toYaml | indent 4 }}
{{- end }}
spec:
pgCluster: {{ .Values.restore.pgCluster }}
repoName: {{ .Values.restore.repoName }}
Expand Down
10 changes: 10 additions & 0 deletions charts/pg-operator-db/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -643,15 +643,25 @@ pg-db:

backup:
enabled: true
annotations:
description: "test"
name: backup1
labels:
app: postgres-backup
environment: testing
pgCluster: postgres-pg-db
repoName: repo4
options:
- --type=full

restore:
enabled: true
annotations:
description: "test"
name: restore1
labels:
app: postgres-restore
environment: testing
pgCluster: postgres-pg-db
repoName: repo4
options:
Expand Down

0 comments on commit 99ef8db

Please sign in to comment.