Skip to content

K8SPG-651 - Update PG charts for 2.6.0 release#459

Merged
jvpasinatto merged 23 commits intomainfrom
K8SPG-651-pg-260
Mar 17, 2025
Merged

K8SPG-651 - Update PG charts for 2.6.0 release#459
jvpasinatto merged 23 commits intomainfrom
K8SPG-651-pg-260

Conversation

@jvpasinatto
Copy link
Copy Markdown
Contributor

No description provided.

@jvpasinatto jvpasinatto added the pg label Feb 6, 2025
@CorentinRegnier
Copy link
Copy Markdown

Any news for this PR ? We forked this repository because of this missing keys today

@sekot
Copy link
Copy Markdown

sekot commented Feb 25, 2025

+1

@jvpasinatto
Copy link
Copy Markdown
Contributor Author

Hello @CorentinRegnier,
This release was delayed by a few weeks due to a recent CVE in PostgreSQL packages.

Are you interested in a specific change being made in this PR?

…s` (#462)

* K8SPG-619: add `restartPolicy` and `backoffLimit` to `.pgbackrest.jobs`

https://perconadev.atlassian.net/browse/K8SPG-619

* update README

---------

Co-authored-by: Julio Pasinatto <julio.pasinatto@percona.com>
@CorentinRegnier
Copy link
Copy Markdown

CorentinRegnier commented Feb 27, 2025

💡 Enhancement Proposal: Add Resource Requests for Containers

Hi @jvpasinatto 👋,

I noticed that some containers in the solution do not currently handle the resources.requests section, which may impact resource allocation and overall stability.
This PR introduces support for requests in addition to the existing limits for all relevant containers.

📌 Changes Introduced:

  • Added support for requests (cpu and memory) for:
    • replicaCertCopy
    • pgBouncerConfig
    • pgbackrest
    • pgbackrestConfig
    • pgbackrest.jobs
    • pgbackrest.repoHost
  • Added support for limits (cpu and memory) for:
    • pgbackrest.repoHost
  • Preserved the existing limits handling.

This will help improve resource allocation and workload stability 🚀.

🔍 Diff of the Changes:

diff --git a/charts/pg-db/templates/official_cluster_pg_db_2_5_3.yaml b/charts/pg-db/templates/cluster.yaml
+++ b/charts/pg-db/templates/cluster.yaml
@@ -200,6 +200,11 @@ spec:
         replicaCertCopy:
           {{- if $instance.containers.replicaCertCopy.resources }}
           resources:
+            {{- if $instance.containers.replicaCertCopy.resources.requests }}
+            requests:
+              cpu: {{ $instance.containers.replicaCertCopy.resources.requests.cpu }}
+              memory: {{ $instance.containers.replicaCertCopy.resources.requests.memory }}
+            {{- end }}
             {{- if $instance.containers.replicaCertCopy.resources.limits }}
             limits:
               cpu: {{ $instance.containers.replicaCertCopy.resources.limits.cpu }}
@@ -300,6 +305,11 @@ spec:
         pgbouncerConfig:
           {{- if .Values.proxy.pgBouncer.containers.pgbouncerConfig.resources }}
           resources:
+            {{- if .Values.proxy.pgBouncer.containers.pgbouncerConfig.resources.requests }}
+            requests:
+              cpu: {{ .Values.proxy.pgBouncer.containers.pgbouncerConfig.resources.requests.cpu }}
+              memory: {{ .Values.proxy.pgBouncer.containers.pgbouncerConfig.resources.requests.memory }}
+            {{- end }}
             {{- if .Values.proxy.pgBouncer.containers.pgbouncerConfig.resources.limits }}
             limits:
               cpu: {{ .Values.proxy.pgBouncer.containers.pgbouncerConfig.resources.limits.cpu }}
@@ -386,6 +396,11 @@ spec:
         pgbackrest:
           {{- if .Values.backups.pgbackrest.containers.pgbackrest.resources }}
           resources:
+            {{- if .Values.backups.pgbackrest.containers.pgbackrest.resources.requests }}
+            requests:
+              cpu: {{ .Values.backups.pgbackrest.containers.pgbackrest.resources.requests.cpu }}
+              memory: {{ .Values.backups.pgbackrest.containers.pgbackrest.resources.requests.memory }}
+            {{- end }}
             {{- if .Values.backups.pgbackrest.containers.pgbackrest.resources.limits }}
             limits:
               cpu: {{ .Values.backups.pgbackrest.containers.pgbackrest.resources.limits.cpu }}
@@ -397,6 +412,11 @@ spec:
         pgbackrestConfig:
           {{- if .Values.backups.pgbackrest.containers.pgbackrestConfig.resources }}
           resources:
+            {{- if .Values.backups.pgbackrest.containers.pgbackrestConfig.resources.requests }}
+            requests:
+              cpu: {{ .Values.backups.pgbackrest.containers.pgbackrestConfig.resources.requests.cpu }}
+              memory: {{ .Values.backups.pgbackrest.containers.pgbackrestConfig.resources.requests.memory }}
+            {{- end }}
             {{- if .Values.backups.pgbackrest.containers.pgbackrestConfig.resources.limits }}
             limits:
               cpu: {{ .Values.backups.pgbackrest.containers.pgbackrestConfig.resources.limits.cpu }}
@@ -408,10 +428,19 @@ spec:
       {{- if .Values.backups.pgbackrest.jobs }}
       jobs:
         priorityClassName: {{ .Values.backups.pgbackrest.jobs.priorityClassName }}
+        {{- if .Values.backups.pgbackrest.jobs.resources }}
         resources:
+          {{- if .Values.backups.pgbackrest.jobs.resources.requests }}
+          requests:
+            cpu: {{ .Values.backups.pgbackrest.jobs.resources.requests.cpu }}
+            memory: {{ .Values.backups.pgbackrest.jobs.resources.requests.memory }}
+          {{- end}}
+          {{- if .Values.backups.pgbackrest.jobs.resources.limits }}
           limits:
             cpu: {{ .Values.backups.pgbackrest.jobs.resources.limits.cpu }}
             memory: {{ .Values.backups.pgbackrest.jobs.resources.limits.memory }}
+          {{- end}}
+        {{- end}}
         {{- if .Values.backups.pgbackrest.jobs.tolerations }}
         tolerations:
 {{ .Values.backups.pgbackrest.jobs.tolerations | toYaml | indent 10 }}
@@ -427,6 +456,19 @@ spec:
       {{- end }}
       {{- if .Values.backups.pgbackrest.repoHost }}
       repoHost:
+        {{- if .Values.backups.pgbackrest.repoHost.resources }}
+        resources:
+          {{- if .Values.backups.pgbackrest.repoHost.resources.requests }}
+          requests:
+            cpu: {{ .Values.backups.pgbackrest.repoHost.resources.requests.cpu }}
+            memory: {{ .Values.backups.pgbackrest.repoHost.resources.requests.memory }}
+          {{- end }}
+          {{- if .Values.backups.pgbackrest.containers.pgbackrestConfig.resources.limits }}
+          limits:
+            cpu: {{ .Values.backups.pgbackrest.repoHost.resources.limits.cpu }}
+            memory: {{ .Values.backups.pgbackrest.repoHost.resources.limits.memory }}
+          {{- end }}
+        {{- end }}
         priorityClassName: {{ .Values.backups.pgbackrest.repoHost.priorityClassName }}
         {{- if .Values.backups.pgbackrest.repoHost.topologySpreadConstraints }}
         topologySpreadConstraints:

Please feel free to share any feedback! Thanks in advance for your review and support 🙌.

hors
hors previously approved these changes Mar 17, 2025
eleo007
eleo007 previously approved these changes Mar 17, 2025
@jvpasinatto jvpasinatto dismissed stale reviews from eleo007 and hors via a181420 March 17, 2025 17:43
@jvpasinatto jvpasinatto merged commit cc606ae into main Mar 17, 2025
2 checks passed
@jvpasinatto jvpasinatto deleted the K8SPG-651-pg-260 branch March 17, 2025 18:05
@CorentinRegnier
Copy link
Copy Markdown

Thanks for this work ❤️

tuotempo pushed a commit to tuotempo/percona-helm-charts that referenced this pull request Nov 11, 2025
* K8SPG-651 - Update pg-db and pg-operator charts for 2.6.0 release

* Update maintainers

* K8SPG-699: Add example for pgvector

* K8SPG-554: add `.spec.tlsOnly` (percona#469)

https://perconadev.atlassian.net/browse/K8SPG-554

Co-authored-by: Julio Pasinatto <julio.pasinatto@percona.com>

* K8SPG-634: Add autoCreateUserSchema field (percona#453)

* Add autoCreateUserSchema field.

* Add autoCreateUserSchema field in pg-db template

---------

Co-authored-by: Julio Pasinatto <julio.pasinatto@percona.com>

* K8SPG-676 - Add missing resources requests fields

* Update image versions

* Update crd and notes

* Use resources named template

* K8SPG-678 - Remove hard coded values and fixes

* K8SPG-619: add `restartPolicy` and `backoffLimit` to `.pgbackrest.jobs` (percona#462)

* K8SPG-619: add `restartPolicy` and `backoffLimit` to `.pgbackrest.jobs`

https://perconadev.atlassian.net/browse/K8SPG-619

* update README

---------

Co-authored-by: Julio Pasinatto <julio.pasinatto@percona.com>

* Update db to PG16

* Update rbac and crd

* Add finalizer and metadata fields

* Add annotations field plus fixes

* Add resources filed for pgbackrest.repoHost

---------

Co-authored-by: Ege Güneş <ege.gunes@percona.com>
Co-authored-by: Andrii Dema <a.dema@jazzserve.com>
Co-authored-by: Inel Pandzic <inel.pandzic@percona.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants