Skip to content

Commit f3d3531

Browse files
authored
Add pg-db intances metadata fields (#491)
* Added metadata fields to helm chart * Added README.md documentation for .instances[].metadata fields * Added commented keys to pg-db helm-chart for instances[].metadata * Fixed alignment on pg-db helm chart instance[].metadata fields
1 parent b8594c2 commit f3d3531

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

charts/pg-db/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: pg-db
33
description: 'A Helm chart to deploy the PostgreSQL database with the Percona Operator for PostgreSQL'
44
type: application
5-
version: 2.5.2
5+
version: 2.5.3
66
appVersion: 2.5.0
77
home: https://docs.percona.com/percona-operator-for-postgresql/2.0/
88
maintainers:

charts/pg-db/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ The chart can be customized using the following configurable parameters:
9090
| |
9191
| `instances.name` | The name of the PostgreSQL instance | `instance1` |
9292
| `instances.replicas` | The number of Replicas to create for the PostgreSQL instance | `3` |
93+
| `instances.metadata.labels` | Labels applied to instance pods | `{}` |
94+
| `instances.metadata.annotations` | Annotations applied to instance pods | `{}` |
9395
| `instances.affinity.podAntiAffinity` | Pod anti-affinity, allows setting the standard Kubernetes affinity constraints of any complexity | `{}` |
9496
| `instances.resources.requests.memory` | Kubernetes memory requests for a PostgreSQL instance | `""` |
9597
| `instances.resources.requests.cpu` | Kubernetes CPU requests for a PostgreSQL instance | `""` |

charts/pg-db/templates/cluster.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@ spec:
191191
memory: {{ $instance.resources.limits.memory }}
192192
{{- end }}
193193
{{- end }}
194+
{{- if $instance.metadata }}
195+
metadata: {{- $instance.metadata | toYaml | nindent 8 }}
196+
{{- end }}
194197
{{- if $instance.containers }}
195198
containers:
196199
{{- if $instance.containers.replicaCertCopy }}

charts/pg-db/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ instances:
155155
matchLabels:
156156
postgres-operator.crunchydata.com/data: postgres
157157
topologyKey: kubernetes.io/hostname
158-
158+
# metadata:
159+
# annotations: {}
160+
# labels: {}
159161
# resources:
160162
# requests:
161163
# cpu: 2.0

0 commit comments

Comments
 (0)