Skip to content

Commit

Permalink
Merge pull request #387 from percona/K8SPG-604-pg-250
Browse files Browse the repository at this point in the history
K8SPG-604 - Update PG operator chart for 2.5.0 release
  • Loading branch information
jvpasinatto authored Oct 8, 2024
2 parents 04f2c1f + 5eb8442 commit d74b487
Show file tree
Hide file tree
Showing 8 changed files with 1,003 additions and 679 deletions.
4 changes: 2 additions & 2 deletions charts/pg-db/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: pg-db
description: 'A Helm chart to deploy the PostgreSQL database with the Percona Operator for PostgreSQL'
type: application
version: 2.4.3
appVersion: 2.4.1
version: 2.5.0
appVersion: 2.5.0
home: https://docs.percona.com/percona-operator-for-postgresql/2.0/
maintainers:
- name: tplavcic
Expand Down
18 changes: 11 additions & 7 deletions charts/pg-db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Useful links:

## Pre-requisites
* [Percona Operator for PostgreSQL](https://hub.helm.sh/charts/percona/pg-operator) running in your Kubernetes cluster. See installation details [here](https://github.com/percona/percona-helm-charts/tree/main/charts/pg-operator) or in the [Operator Documentation](https://www.percona.com/doc/kubernetes-operator-for-postgresql/helm.html).
* Kubernetes 1.27+
* Kubernetes 1.28+
* At least `v3.2.3` version of helm

# Installation
Expand All @@ -24,17 +24,17 @@ To install the chart with the `pg` release name using a dedicated namespace (rec

```sh
helm repo add percona https://percona.github.io/percona-helm-charts/
helm install my-db percona/pg-db --version 2.4.3 --namespace my-namespace
helm install my-db percona/pg-db --version 2.5.0 --namespace my-namespace
```

The chart can be customized using the following configurable parameters:

| Parameter | Description | Default |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| `finalizers` | Finalizers list | `{}` |
| `crVersion` | CR Cluster Manifest version | `2.4.1` |
| `crVersion` | CR Cluster Manifest version | `2.5.0` |
| `repository` | PostgreSQL container image repository | `percona/percona-postgresql-operator` |
| `image` | Postgres image | `percona/percona-postgresql-operator:2.4.1-ppg16.3-postgres` |
| `image` | Postgres image | `percona/percona-postgresql-operator:2.5.0-ppg16.4-postgres` |
| `imagePullPolicy` | image Pull Policy | `Always` |
| `port` | PostgreSQL port | `5432` |
| `postgresVersion` | PostgreSQL container version tag | `16` |
Expand All @@ -44,6 +44,8 @@ The chart can be customized using the following configurable parameters:
| `standby.host` | Host address of the primary cluster this standby cluster connects to | `` |
| `standby.port` | Port number used by a standby copy to connect to the primary cluster | `` |
| `standby.repoName` | Name of the pgBackRest repository in the primary cluster this standby cluster connects to | `` |
| `customRootCATLSSecret.name` | Name of the secret with the custom root CA certificate and key for secure connections to the PostgreSQL server | `` |
| `customRootCATLSSecret.items` | Key-value pairs of the `key` (a key from the `secrets.customRootCATLSSecret.name` secret) and the `path` (name on the file system) for the custom root certificate and key | `` |
| `customTLSSecret.name` | A secret with TLS certificate generated for external communications | `""` |
| `customReplicationTLSSecret.name` | A secret with TLS certificate generated for internal communications | `""` |
| `openshift` | Set to true if the cluster is being deployed on OpenShift, set to false otherwise, or unset it for autodetection | `false` |
Expand Down Expand Up @@ -117,6 +119,7 @@ The chart can be customized using the following configurable parameters:
| `instances.tablespaceVolumes.dataVolumeClaimSpec.accessModes` | The Kubernetes PersistentVolumeClaim access modes for the tablespace volume | `{}` |
| `instances.tablespaceVolumes.dataVolumeClaimSpec.resources.requests.storage` | The Kubernetes storage requests for the tablespace volume | `""` |
| |
| `backups.trackLatestRestorableTime` | Enable background worker to track commit timestamps and set latest restorable time to latest successful backup | `true` |
| `backups.pgbackrest.metadata.labels` | Set labels for pgbackrest | `test-label:test` |
| `backups.pgbackrest.configuration` | Name of the Kubernetes Secret object with custom pgBackRest configuration, which will be added to the pgBackRest configuration generated by the Operator | `[]` |
| `backups.pgbackrest.containers.pgbackrest.resources.limits.cpu` | Kubernetes CPU limits for pgbackrest instance | `200m` |
Expand Down Expand Up @@ -161,7 +164,7 @@ The chart can be customized using the following configurable parameters:
| `backups.restore.enabled` | Enables or disables restoring a previously made backup | `false` |
| `backups.restore.repoName` | Name of the pgBackRest repository that contains the backup to be restored | `repo1` |
| `backups.restore.options` | The pgBackRest command-line options for the pgBackRest restore command | `--type=time` |
| `backups.pgbackrest.image` | Set this variable if you need to use a custom pgBackrest image | `percona/percona-postgresql-operator:2.4.1-ppg16.3-pgbackrest2.51-1` |
| `backups.pgbackrest.image` | Set this variable if you need to use a custom pgBackrest image | `percona/percona-postgresql-operator:2.5.0-ppg16.4-pgbackrest2.53-1` |
| `backups.repos.repo2.s3.bucket` | Storage bucket | `` |
| `backups.repos.repo2.s3.region` | S3-compatible storage name | `` |
| `backups.repos.repo2.s3.endpoint` | S3-compatible storage endpoint | `` |
Expand All @@ -185,7 +188,7 @@ The chart can be customized using the following configurable parameters:
| `proxy.pgBouncer.customTLSSecret.name` | Custom external TLS secret name | `keycloakdb-pgbouncer.tls` |
| `proxy.pgBouncer.securityContext` | The Kubernetes Pod security context for the pgBouncer instance | `{}` |
| `proxy.pgBouncer.affinity.podAntiAffinity` | Pod anti-affinity, allows setting the standard Kubernetes affinity constraints of any complexity | `{}` |
| `proxy.pgBouncer.image` | Set this variable if you need to use a custom pgbouncer image | `percona/percona-postgresql-operator:2.4.1-ppg16.3-pgbouncer1.22.1` |
| `proxy.pgBouncer.image` | Set this variable if you need to use a custom pgbouncer image | `percona/percona-postgresql-operator:2.5.0-ppg16.4-pgbouncer1.23.1` |
| `proxy.pgBouncer.replicas` | The number of pgbouncer instances | `3` |
| `proxy.pgBouncer.resources.requests.cpu` | Container resource request for CPU | `1` |
| `proxy.pgBouncer.resources.requests.memory` | Container resource request for RAM | `128Mi` |
Expand All @@ -196,8 +199,9 @@ The chart can be customized using the following configurable parameters:
| |
| `pmm.enabled` | Enable integration with [Percona Monitoring and Management software](https://www.percona.com/blog/2020/07/23/using-percona-kubernetes-operators-with-percona-monitoring-and-management/) | `false` |
| `pmm.image.repository` | PMM Container image repository | `percona/pmm-client` |
| `pmm.image.tag` | PMM Container image tag | `2.42.0` |
| `pmm.image.tag` | PMM Container image tag | `2.43.1` |
| `pmm.serverHost` | PMM server related K8S service hostname | `monitoring-service` |
| `pmm.querySource` | PMM querySource, 'pgstatmonitor' or 'pgstatstatemenets'. | `pgstatmonitor` |
| `pmm.resources.requests.memory` | Container resource request for RAM | `200M` |
| `pmm.resources.requests.cpu` | Container resource request for CPU | `500m` |
| |
Expand Down
38 changes: 26 additions & 12 deletions charts/pg-db/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ spec:
enabled: {{ .Values.standby.enabled }}
{{- if or (.Values.customTLSSecret.name) (.Values.customReplicationTLSSecret.name) }}
secrets:
{{- if .Values.customRootCATLSSecret.name }}
customRootCATLSSecret:
name: {{ .Values.customRootCATLSSecret.name }}
items:
{{- toYaml .Values.customRootCATLSSecret.items | nindent 8 }}
{{- end }}
{{- if .Values.customTLSSecret.name }}
customTLSSecret:
name: {{ .Values.customTLSSecret.name }}
Expand Down Expand Up @@ -221,10 +227,12 @@ spec:

{{- if $instance.tolerations }}
tolerations:
- effect: {{ $instance.tolerations.effect }}
key: {{ $instance.tolerations.key }}
operator: {{ $instance.tolerations.operator }}
value: {{ $instance.tolerations.value }}
{{- range $toleration := $instance.tolerations }}
- effect: {{ $toleration.effect }}
key: {{ $toleration.key }}
operator: {{ $toleration.operator }}
value: {{ $toleration.value }}
{{- end }}
{{- end }}

{{- if $instance.priorityClassName }}
Expand Down Expand Up @@ -353,10 +361,12 @@ spec:
{{- end }}
{{- if .Values.proxy.pgBouncer.tolerations }}
tolerations:
- effect: {{ .Values.proxy.pgBouncer.tolerations.effect }}
key: {{ .Values.proxy.pgBouncer.tolerations.key }}
operator: {{ .Values.proxy.pgBouncer.tolerations.operator }}
value: {{ .Values.proxy.pgBouncer.tolerations.value }}
{{- range $toleration := .Values.proxy.pgBouncer.tolerations }}
- effect: {{ $toleration.effect }}
key: {{ $toleration.key }}
operator: {{ $toleration.operator }}
value: {{ $toleration.value }}
{{- end }}
{{- end }}
{{- if .Values.proxy.pgBouncer.securityContext }}
securityContext:
Expand All @@ -368,8 +378,10 @@ spec:
image: {{ .Values.pmm.image.repository }}:{{ .Values.pmm.image.tag }}
serverHost: {{ .Values.pmm.serverHost }}
secret: {{ include "pg-database.fullname" . }}-pmm-secret
querySource: {{ .Values.pmm.querySource }}

backups:
trackLatestRestorableTime: {{ .Values.backups.trackLatestRestorableTime }}
pgbackrest:
image: {{ .Values.backups.pgbackrest.image }}
{{- if .Values.backups.pgbackrest.configuration }}
Expand Down Expand Up @@ -410,10 +422,12 @@ spec:
memory: {{ .Values.backups.pgbackrest.jobs.resources.limits.memory }}
{{- if .Values.backups.pgbackrest.jobs.tolerations }}
tolerations:
- effect: {{ .Values.backups.pgbackrest.jobs.tolerations.effect }}
key: {{ .Values.backups.pgbackrest.jobs.tolerations.key }}
operator: {{ .Values.backups.pgbackrest.jobs.tolerations.operator }}
value: {{ .Values.backups.pgbackrest.jobs.tolerations.value }}
{{- range $toleration := .Values.backups.pgbackrest.jobs.tolerations }}
- effect: {{ $toleration.effect }}
key: {{ $toleration.key }}
operator: {{ $toleration.operator }}
value: {{ $toleration.value }}
{{- end }}
{{- end }}
{{- if .Values.backups.pgbackrest.jobs.securityContext }}
securityContext:
Expand Down
Loading

0 comments on commit d74b487

Please sign in to comment.