Skip to content

Commit

Permalink
Add pg-db intances metadata fields (#491)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
elsayedmt authored Feb 26, 2025
1 parent b8594c2 commit f3d3531
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/pg-db/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: pg-db
description: 'A Helm chart to deploy the PostgreSQL database with the Percona Operator for PostgreSQL'
type: application
version: 2.5.2
version: 2.5.3
appVersion: 2.5.0
home: https://docs.percona.com/percona-operator-for-postgresql/2.0/
maintainers:
Expand Down
2 changes: 2 additions & 0 deletions charts/pg-db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ The chart can be customized using the following configurable parameters:
| |
| `instances.name` | The name of the PostgreSQL instance | `instance1` |
| `instances.replicas` | The number of Replicas to create for the PostgreSQL instance | `3` |
| `instances.metadata.labels` | Labels applied to instance pods | `{}` |
| `instances.metadata.annotations` | Annotations applied to instance pods | `{}` |
| `instances.affinity.podAntiAffinity` | Pod anti-affinity, allows setting the standard Kubernetes affinity constraints of any complexity | `{}` |
| `instances.resources.requests.memory` | Kubernetes memory requests for a PostgreSQL instance | `""` |
| `instances.resources.requests.cpu` | Kubernetes CPU requests for a PostgreSQL instance | `""` |
Expand Down
3 changes: 3 additions & 0 deletions charts/pg-db/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ spec:
memory: {{ $instance.resources.limits.memory }}
{{- end }}
{{- end }}
{{- if $instance.metadata }}
metadata: {{- $instance.metadata | toYaml | nindent 8 }}
{{- end }}
{{- if $instance.containers }}
containers:
{{- if $instance.containers.replicaCertCopy }}
Expand Down
4 changes: 3 additions & 1 deletion charts/pg-db/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ instances:
matchLabels:
postgres-operator.crunchydata.com/data: postgres
topologyKey: kubernetes.io/hostname

# metadata:
# annotations: {}
# labels: {}
# resources:
# requests:
# cpu: 2.0
Expand Down

0 comments on commit f3d3531

Please sign in to comment.