Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(charts)!: Update Helm release postgresql to 15.5.38 - autoclosed #2437

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 18, 2024

This PR contains the following updates:

Package Update Change
postgresql (source) major 11.9.8 -> 15.5.38

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

bitnami/charts (postgresql)

v15.5.38

  • [bitnami/postgresql] Release 15.5.38 (#​29681)

v15.5.37

  • [bitnami/postgresql] Release 15.5.37 (#​29660)

v15.5.36

v15.5.35

v15.5.34

v15.5.33

v15.5.32

v15.5.31

v15.5.30

v15.5.29

v15.5.28

v15.5.27

v15.5.26

v15.5.25

v15.5.24

v15.5.23

v15.5.22

v15.5.21

v15.5.20

  • [bitnami/postgresql] Release 15.5.20 (#​28489)

v15.5.19

v15.5.18

v15.5.17

v15.5.16

v15.5.15

v15.5.14

v15.5.13

v15.5.12

v15.5.11

  • [bitnami/postgresql] Release 15.5.11 (#​27548)

v15.5.10

v15.5.9

v15.5.8

v15.5.7

v15.5.6

v15.5.5

v15.5.4

v15.5.3

v15.5.1

v15.5.0

v15.4.2

v15.4.1

v15.4.0

  • [bitnami/postgresql] feat: ✨ 🔒 Add warning when original images are replaced (#​26264)

v15.3.5

v15.3.4

v15.3.3

v15.3.2

v15.3.1

v15.3.0

v15.2.13

v15.2.12

v15.2.11

v15.2.10

v15.2.9

v15.2.8

v15.2.7

v15.2.6

v15.2.5

v15.2.4

v15.2.3

v15.2.2

v15.2.1

v15.2.0

v15.1.4

v15.1.3

v15.1.2

v15.1.1

v15.1.0

  • [bitnami/postgresql] Add a NetworkPolicy to allow backup pods to access primary nodes (#​24363) (dc93455), closes #​24363

v15.0.0

v14.3.3

v14.3.2

v14.3.1

v14.3.0

  • [bitnami/postgresql] postgresql backup container adds resources parameter (#​23955) (8da2a95), closes #​23955
  • [bitnami/postgresql] feat: ✨ 🔒 Add automatic adaptation for Openshift restricted-v2 SC (1a2217f), closes #​24141

v14.2.4

v14.2.3

v14.2.2

v14.2.1

v14.1.3

v14.1.2

v14.1.1

  • [bitnami/postgresql] Do not create a NetworkPolicy for "read" instance when "standalone" (#​23392) (7ef876c), closes #​23392

v14.1.0

v14.0.5

v14.0.4

v14.0.3

v14.0.2

v14.0.1

v14.0.0

v13.4.4

v13.4.3

v13.4.2

v13.4.1

v13.4.0

  • [bitnami/postgresql] fix: 🔒 Move service-account token auto-mount to pod declaration (#​22450) (002c752), closes #​22450

v13.3.1

v13.3.0

  • [bitnami/postgresql] fix: 🔒 Improve podSecurityContext and containerSecurityContext with essent (fe72f51), closes #​22177

v13.2.30

v13.2.29

v13.2.28

v13.2.27

v13.2.26

v13.2.25

v13.2.24

v13.2.23

v13.2.22

v13.2.21

v13.2.20

v13.2.19

v13.2.18

v13.2.17

v13.2.16

v13.2.15

v13.2.14

v13.2.13

v13.2.12

v13.2.11

v13.2.10

  • [bitnami/*] Remove relative links to non-README sections, add verification for that and update TL;DR (1103633), closes #​20967
  • [bitnami/postgresql] Release 13.2.10 updating components versions (#​21039) (2b176c0), closes #​21039

v13.2.9

v13.2.8

v13.2.7

v13.2.6

v13.2.5

v13.2.4

v13.2.3

v13.2.2

v13.2.1

v13.2.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from dfroberg as a code owner March 18, 2024 18:29
Copy link

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.0.0

@@ -1,3 +1,42 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +44,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "Z0lOSmM4SWNwVA=="
+  postgres-password: "UTBSWDh3TUlWTw=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +60,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +75,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,10 +86,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
+  annotations:
     # Use this annotation in addition to the actual publishNotReadyAddresses
     # field below because the annotation will stop being respected soon but the
     # field is broken in some versions of Kubernetes:
@@ -68,8 +108,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +119,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +132,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +143,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +155,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +173,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +182,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,17 +224,17 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
             # Replication
             # Initdb
@@ -238,21 +288,47 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/logs
+              subPath: app-logs-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r14
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -285,15 +361,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +398,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from 2fabaa8 to c476421 Compare March 20, 2024 12:05
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.0.0 feat(charts)!: Update Helm release postgresql to 15.1.0 Mar 20, 2024
Copy link

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.1.0

@@ -1,3 +1,66 @@
+# Source: postgresql/templates/backup/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql-pgdumpall
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: pg_dumpall
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: pg_dumpall
+  policyTypes:
+    - Egress
+  egress:
+    - ports:
+        - port: 5432
+          protocol: TCP
+---
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +68,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "c3hoc1Y4U3NwTg=="
+  postgres-password: "Vk9SNkpXYTloMA=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +84,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +99,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,10 +110,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
+  annotations:
     # Use this annotation in addition to the actual publishNotReadyAddresses
     # field below because the annotation will stop being respected soon but the
     # field is broken in some versions of Kubernetes:
@@ -68,8 +132,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +143,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +156,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +167,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +179,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +197,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +206,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,17 +248,17 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
             # Replication
             # Initdb
@@ -238,21 +312,47 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/logs
+              subPath: app-logs-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r14
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -285,15 +385,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +422,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from c476421 to 2eeaa29 Compare March 21, 2024 11:03
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.1.0 feat(charts)!: Update Helm release postgresql to 15.1.1 Mar 21, 2024
Copy link

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.1.1

@@ -1,3 +1,42 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +44,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "c1lyMEh2elVkUg=="
+  postgres-password: "enl5MzZ1N2lSUw=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +60,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +75,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,10 +86,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
+  annotations:
     # Use this annotation in addition to the actual publishNotReadyAddresses
     # field below because the annotation will stop being respected soon but the
     # field is broken in some versions of Kubernetes:
@@ -68,8 +108,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +119,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +132,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +143,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +155,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +173,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +182,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,17 +224,17 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
             # Replication
             # Initdb
@@ -238,21 +288,47 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/logs
+              subPath: app-logs-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r14
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -285,15 +361,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +398,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from 2eeaa29 to db76b43 Compare March 21, 2024 13:04
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.1.1 feat(charts)!: Update Helm release postgresql to 15.1.2 Mar 21, 2024
Copy link

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.1.2

@@ -1,3 +1,42 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +44,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "cElHRjZtbHQ1Yg=="
+  postgres-password: "bHZ2cTZjVFZEdg=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +60,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +75,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,10 +86,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
+  annotations:
     # Use this annotation in addition to the actual publishNotReadyAddresses
     # field below because the annotation will stop being respected soon but the
     # field is broken in some versions of Kubernetes:
@@ -68,8 +108,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +119,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +132,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +143,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +155,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +173,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +182,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,17 +224,17 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
             # Replication
             # Initdb
@@ -238,21 +288,47 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/logs
+              subPath: app-logs-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r14
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -285,15 +361,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +398,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from db76b43 to b13d384 Compare March 25, 2024 08:17
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.1.2 feat(charts)!: Update Helm release postgresql to 15.1.4 Mar 25, 2024
Copy link

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.1.4

@@ -1,3 +1,42 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +44,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "SWVSUFp5bTBZVA=="
+  postgres-password: "RE5zNGx1T0o2Ug=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +60,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +75,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,10 +86,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
+  annotations:
     # Use this annotation in addition to the actual publishNotReadyAddresses
     # field below because the annotation will stop being respected soon but the
     # field is broken in some versions of Kubernetes:
@@ -68,8 +108,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +119,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +132,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +143,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +155,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +173,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +182,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,17 +224,17 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
             # Replication
             # Initdb
@@ -238,21 +288,47 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/logs
+              subPath: app-logs-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r14
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -285,15 +361,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +398,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from b13d384 to a2238a0 Compare April 1, 2024 10:17
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.1.4 feat(charts)!: Update Helm release postgresql to 15.2.0 Apr 1, 2024
Copy link

github-actions bot commented Apr 1, 2024

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.2.0

@@ -1,3 +1,42 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +44,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "eFdoQnBOM2x4eg=="
+  postgres-password: "c2pIM1hOdnh0bg=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +60,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +75,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,10 +86,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
+  annotations:
     # Use this annotation in addition to the actual publishNotReadyAddresses
     # field below because the annotation will stop being respected soon but the
     # field is broken in some versions of Kubernetes:
@@ -68,8 +108,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +119,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +132,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +143,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +155,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +173,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +182,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,17 +224,17 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
             # Replication
             # Initdb
@@ -238,21 +288,47 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/logs
+              subPath: app-logs-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r14
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -285,15 +361,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +398,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from a2238a0 to 9b5bdc4 Compare April 2, 2024 13:37
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.2.0 feat(charts)!: Update Helm release postgresql to 15.2.1 Apr 2, 2024
Copy link

github-actions bot commented Apr 2, 2024

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.2.1

@@ -1,3 +1,42 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +44,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "dVRlWUx4dHo4bQ=="
+  postgres-password: "SkZLS043MFFmbA=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +60,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +75,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,10 +86,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
+  annotations:
     # Use this annotation in addition to the actual publishNotReadyAddresses
     # field below because the annotation will stop being respected soon but the
     # field is broken in some versions of Kubernetes:
@@ -68,8 +108,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +119,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +132,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +143,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +155,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +173,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +182,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,17 +224,17 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
             # Replication
             # Initdb
@@ -238,21 +288,47 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/logs
+              subPath: app-logs-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r14
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -285,15 +361,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +398,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from 9b5bdc4 to e87036b Compare April 2, 2024 22:35
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.2.1 feat(charts)!: Update Helm release postgresql to 15.2.2 Apr 2, 2024
Copy link

github-actions bot commented Apr 2, 2024

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.2.2

@@ -1,3 +1,42 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +44,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "Tm5BSVo3clk1Zg=="
+  postgres-password: "MFY0NDdnMGFrSw=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +60,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +75,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,10 +86,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
+  annotations:
     # Use this annotation in addition to the actual publishNotReadyAddresses
     # field below because the annotation will stop being respected soon but the
     # field is broken in some versions of Kubernetes:
@@ -68,8 +108,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +119,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +132,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +143,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +155,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +173,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +182,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,17 +224,17 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
             # Replication
             # Initdb
@@ -238,21 +288,47 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/logs
+              subPath: app-logs-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r15
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -285,15 +361,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +398,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from e87036b to e3f62e7 Compare April 5, 2024 04:01
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.2.2 feat(charts)!: Update Helm release postgresql to 15.2.3 Apr 5, 2024
Copy link

github-actions bot commented Apr 5, 2024

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.2.3

@@ -1,3 +1,42 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +44,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "TzJHY1ZVdmVZMQ=="
+  postgres-password: "MDJObUhGMVh6aw=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +60,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +75,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,10 +86,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
+  annotations:
     # Use this annotation in addition to the actual publishNotReadyAddresses
     # field below because the annotation will stop being respected soon but the
     # field is broken in some versions of Kubernetes:
@@ -68,8 +108,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +119,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +132,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +143,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +155,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +173,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +182,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,17 +224,17 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
             # Replication
             # Initdb
@@ -238,21 +288,47 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/logs
+              subPath: app-logs-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r16
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -285,15 +361,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +398,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from e3f62e7 to 5a206ef Compare April 7, 2024 05:42
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.2.3 feat(charts)!: Update Helm release postgresql to 15.2.4 Apr 7, 2024
Copy link

github-actions bot commented Apr 7, 2024

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.2.4

@@ -1,3 +1,42 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +44,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "eUprYlJsdWt0TA=="
+  postgres-password: "OHgzR2FNZXM0Vg=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +60,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +75,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,10 +86,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
+  annotations:
     # Use this annotation in addition to the actual publishNotReadyAddresses
     # field below because the annotation will stop being respected soon but the
     # field is broken in some versions of Kubernetes:
@@ -68,8 +108,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +119,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +132,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +143,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +155,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +173,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +182,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,17 +224,17 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
             # Replication
             # Initdb
@@ -238,21 +288,47 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/logs
+              subPath: app-logs-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r16
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -285,15 +361,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 1024Mi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +398,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.5.29 feat(charts)!: Update Helm release postgresql to 15.5.30 Sep 13, 2024
Copy link

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.5.30

@@ -1,3 +1,61 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/primary/pdb.yaml
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  maxUnavailable: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +63,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "R3F5N2hmS1l5OQ=="
+  postgres-password: "dzZSNkdlYmxBYw=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +79,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +94,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,15 +105,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-    # Use this annotation in addition to the actual publishNotReadyAddresses
-    # field below because the annotation will stop being respected soon but the
-    # field is broken in some versions of Kubernetes:
-    # https://github.com/kubernetes/kubernetes/issues/58662
-    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
+  annotations:
 spec:
   type: ClusterIP
   clusterIP: None
@@ -68,8 +122,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +133,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +146,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +157,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +169,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +187,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +196,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,21 +238,18 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
-            # Replication
-            # Initdb
-            # Standby
             # LDAP
             - name: POSTGRESQL_ENABLE_LDAP
               value: "no"
@@ -238,21 +299,44 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r43
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -260,9 +344,9 @@
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
+                  key: postgres-password
             - name: DATA_SOURCE_USER
-              value: "${SECRET_POSTGRES_USERNAME}"
+              value: "postgres"
           ports:
             - name: http-metrics
               containerPort: 9187
@@ -285,15 +369,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +406,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from 29086a1 to ac30743 Compare September 13, 2024 22:59
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.5.30 feat(charts)!: Update Helm release postgresql to 15.5.31 Sep 13, 2024
Copy link

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.5.31

@@ -1,3 +1,61 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/primary/pdb.yaml
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  maxUnavailable: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +63,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "UVN5cXltcXJ3Rg=="
+  postgres-password: "Nk1MNHNpSmxXUA=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +79,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +94,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,15 +105,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-    # Use this annotation in addition to the actual publishNotReadyAddresses
-    # field below because the annotation will stop being respected soon but the
-    # field is broken in some versions of Kubernetes:
-    # https://github.com/kubernetes/kubernetes/issues/58662
-    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
+  annotations:
 spec:
   type: ClusterIP
   clusterIP: None
@@ -68,8 +122,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +133,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +146,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +157,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +169,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +187,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +196,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,21 +238,18 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
-            # Replication
-            # Initdb
-            # Standby
             # LDAP
             - name: POSTGRESQL_ENABLE_LDAP
               value: "no"
@@ -238,21 +299,44 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r43
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -260,9 +344,9 @@
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
+                  key: postgres-password
             - name: DATA_SOURCE_USER
-              value: "${SECRET_POSTGRES_USERNAME}"
+              value: "postgres"
           ports:
             - name: http-metrics
               containerPort: 9187
@@ -285,15 +369,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +406,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from ac30743 to a67bbf4 Compare September 17, 2024 16:02
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.5.31 feat(charts)!: Update Helm release postgresql to 15.5.32 Sep 17, 2024
Copy link

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.5.32

@@ -1,3 +1,61 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/primary/pdb.yaml
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  maxUnavailable: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +63,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "WkdaalRjbXZ1bg=="
+  postgres-password: "SmJENm5BOHBBMQ=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +79,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +94,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,15 +105,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-    # Use this annotation in addition to the actual publishNotReadyAddresses
-    # field below because the annotation will stop being respected soon but the
-    # field is broken in some versions of Kubernetes:
-    # https://github.com/kubernetes/kubernetes/issues/58662
-    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
+  annotations:
 spec:
   type: ClusterIP
   clusterIP: None
@@ -68,8 +122,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +133,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +146,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +157,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +169,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +187,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +196,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,21 +238,18 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
-            # Replication
-            # Initdb
-            # Standby
             # LDAP
             - name: POSTGRESQL_ENABLE_LDAP
               value: "no"
@@ -238,21 +299,44 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r43
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -260,9 +344,9 @@
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
+                  key: postgres-password
             - name: DATA_SOURCE_USER
-              value: "${SECRET_POSTGRES_USERNAME}"
+              value: "postgres"
           ports:
             - name: http-metrics
               containerPort: 9187
@@ -285,15 +369,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +406,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from a67bbf4 to d1f4ae4 Compare September 23, 2024 16:23
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.5.32 feat(charts)!: Update Helm release postgresql to 15.5.33 Sep 23, 2024
Copy link

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.5.33

@@ -1,3 +1,61 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/primary/pdb.yaml
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  maxUnavailable: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +63,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "c1lWSUtwT3Naeg=="
+  postgres-password: "OWJhTU40NG8zTA=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +79,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +94,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,15 +105,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-    # Use this annotation in addition to the actual publishNotReadyAddresses
-    # field below because the annotation will stop being respected soon but the
-    # field is broken in some versions of Kubernetes:
-    # https://github.com/kubernetes/kubernetes/issues/58662
-    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
+  annotations:
 spec:
   type: ClusterIP
   clusterIP: None
@@ -68,8 +122,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +133,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +146,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +157,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +169,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +187,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +196,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,21 +238,18 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
-            # Replication
-            # Initdb
-            # Standby
             # LDAP
             - name: POSTGRESQL_ENABLE_LDAP
               value: "no"
@@ -238,21 +299,44 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r43
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -260,9 +344,9 @@
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
+                  key: postgres-password
             - name: DATA_SOURCE_USER
-              value: "${SECRET_POSTGRES_USERNAME}"
+              value: "postgres"
           ports:
             - name: http-metrics
               containerPort: 9187
@@ -285,15 +369,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +406,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from d1f4ae4 to deb616a Compare September 23, 2024 18:50
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.5.33 feat(charts)!: Update Helm release postgresql to 15.5.34 Sep 23, 2024
Copy link

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.5.34

@@ -1,3 +1,61 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/primary/pdb.yaml
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  maxUnavailable: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +63,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "dEI2ZjZWeHlYaw=="
+  postgres-password: "WlNkeTA0c2htUA=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +79,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +94,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,15 +105,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-    # Use this annotation in addition to the actual publishNotReadyAddresses
-    # field below because the annotation will stop being respected soon but the
-    # field is broken in some versions of Kubernetes:
-    # https://github.com/kubernetes/kubernetes/issues/58662
-    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
+  annotations:
 spec:
   type: ClusterIP
   clusterIP: None
@@ -68,8 +122,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +133,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +146,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +157,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +169,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +187,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +196,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,21 +238,18 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
-            # Replication
-            # Initdb
-            # Standby
             # LDAP
             - name: POSTGRESQL_ENABLE_LDAP
               value: "no"
@@ -238,21 +299,44 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r43
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -260,9 +344,9 @@
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
+                  key: postgres-password
             - name: DATA_SOURCE_USER
-              value: "${SECRET_POSTGRES_USERNAME}"
+              value: "postgres"
           ports:
             - name: http-metrics
               containerPort: 9187
@@ -285,15 +369,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +406,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from deb616a to 6f69629 Compare September 26, 2024 08:14
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.5.34 feat(charts)!: Update Helm release postgresql to 15.5.35 Sep 26, 2024
Copy link

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.5.35

@@ -1,3 +1,61 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/primary/pdb.yaml
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  maxUnavailable: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +63,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "ODYwVVdFSG1JWA=="
+  postgres-password: "Z05pc3FEU0xveQ=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +79,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +94,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,15 +105,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-    # Use this annotation in addition to the actual publishNotReadyAddresses
-    # field below because the annotation will stop being respected soon but the
-    # field is broken in some versions of Kubernetes:
-    # https://github.com/kubernetes/kubernetes/issues/58662
-    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
+  annotations:
 spec:
   type: ClusterIP
   clusterIP: None
@@ -68,8 +122,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +133,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +146,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +157,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +169,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +187,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +196,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,21 +238,18 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
-            # Replication
-            # Initdb
-            # Standby
             # LDAP
             - name: POSTGRESQL_ENABLE_LDAP
               value: "no"
@@ -238,21 +299,44 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r43
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -260,9 +344,9 @@
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
+                  key: postgres-password
             - name: DATA_SOURCE_USER
-              value: "${SECRET_POSTGRES_USERNAME}"
+              value: "postgres"
           ports:
             - name: http-metrics
               containerPort: 9187
@@ -285,15 +369,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +406,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from 6f69629 to 1569fd2 Compare September 27, 2024 00:10
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.5.35 feat(charts)!: Update Helm release postgresql to 15.5.36 Sep 27, 2024
Copy link

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.5.36

@@ -1,3 +1,61 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/primary/pdb.yaml
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  maxUnavailable: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +63,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "cWtVUlJGMXZrVg=="
+  postgres-password: "SW9DNFFLTkpHVw=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +79,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +94,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,15 +105,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-    # Use this annotation in addition to the actual publishNotReadyAddresses
-    # field below because the annotation will stop being respected soon but the
-    # field is broken in some versions of Kubernetes:
-    # https://github.com/kubernetes/kubernetes/issues/58662
-    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
+  annotations:
 spec:
   type: ClusterIP
   clusterIP: None
@@ -68,8 +122,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +133,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +146,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +157,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +169,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +187,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +196,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,21 +238,18 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
-            # Replication
-            # Initdb
-            # Standby
             # LDAP
             - name: POSTGRESQL_ENABLE_LDAP
               value: "no"
@@ -238,21 +299,44 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r43
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -260,9 +344,9 @@
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
+                  key: postgres-password
             - name: DATA_SOURCE_USER
-              value: "${SECRET_POSTGRES_USERNAME}"
+              value: "postgres"
           ports:
             - name: http-metrics
               containerPort: 9187
@@ -285,15 +369,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +406,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from 1569fd2 to 4ee8775 Compare September 30, 2024 09:52
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.5.36 feat(charts)!: Update Helm release postgresql to 15.5.37 Sep 30, 2024
Copy link

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.5.37

@@ -1,3 +1,61 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/primary/pdb.yaml
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  maxUnavailable: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +63,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "Wm9kQURnZTJSNA=="
+  postgres-password: "M0NGYXpHbmxsRw=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +79,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +94,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,15 +105,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-    # Use this annotation in addition to the actual publishNotReadyAddresses
-    # field below because the annotation will stop being respected soon but the
-    # field is broken in some versions of Kubernetes:
-    # https://github.com/kubernetes/kubernetes/issues/58662
-    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
+  annotations:
 spec:
   type: ClusterIP
   clusterIP: None
@@ -68,8 +122,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +133,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +146,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +157,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +169,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +187,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +196,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,21 +238,18 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
-            # Replication
-            # Initdb
-            # Standby
             # LDAP
             - name: POSTGRESQL_ENABLE_LDAP
               value: "no"
@@ -238,21 +299,44 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r43
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -260,9 +344,9 @@
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
+                  key: postgres-password
             - name: DATA_SOURCE_USER
-              value: "${SECRET_POSTGRES_USERNAME}"
+              value: "postgres"
           ports:
             - name: http-metrics
               containerPort: 9187
@@ -285,15 +369,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +406,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot force-pushed the renovate/postgresql-15.x branch from 4ee8775 to a91faa2 Compare October 1, 2024 18:37
Copy link

github-actions bot commented Oct 1, 2024

Path: cluster/core/databases/postgresql/helm-release.yaml
Version: 11.9.8 -> 15.5.38

@@ -1,3 +1,61 @@
+# Source: postgresql/templates/primary/networkpolicy.yaml
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  podSelector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+  policyTypes:
+    - Ingress
+    - Egress
+  egress:
+    - {}
+  ingress:
+    - ports:
+        - port: 5432
+        - port: 9187
+---
+# Source: postgresql/templates/primary/pdb.yaml
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+    app.kubernetes.io/component: primary
+spec:
+  maxUnavailable: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
+      app.kubernetes.io/component: primary
+---
+# Source: postgresql/templates/serviceaccount.yaml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: postgresql
+  namespace: "default"
+  labels:
+    app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
+automountServiceAccountToken: false
+---
 # Source: postgresql/templates/secrets.yaml
 apiVersion: v1
 kind: Secret
@@ -5,12 +63,12 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
 type: Opaque
 data:
-  postgres-password: "OGNweDg2R0NJTA=="
+  postgres-password: "YlpQdGs5Q205bA=="
   password: "JHtTRUNSRVRfUE9TVEdSRVNfUEFTU1dPUkR9"
   # We don't auto-generate LDAP password when it's not provided as we do for other passwords
 ---
@@ -21,12 +79,12 @@
   name: postgresql-metrics
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
   annotations:
-    prometheus.io/port: '9187'
+    prometheus.io/port: "9187"
     prometheus.io/scrape: "true"
 spec:
   type: ClusterIP
@@ -36,8 +94,8 @@
       port: 9187
       targetPort: http-metrics
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc-headless.yaml
@@ -47,15 +105,11 @@
   name: postgresql-hl
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-    # Use this annotation in addition to the actual publishNotReadyAddresses
-    # field below because the annotation will stop being respected soon but the
-    # field is broken in some versions of Kubernetes:
-    # https://github.com/kubernetes/kubernetes/issues/58662
-    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
+  annotations:
 spec:
   type: ClusterIP
   clusterIP: None
@@ -68,8 +122,8 @@
       port: 5432
       targetPort: tcp-postgresql
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/svc.yaml
@@ -79,11 +133,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   type: ClusterIP
   sessionAffinity: None
@@ -93,8 +146,8 @@
       targetPort: tcp-postgresql
       nodePort: null
   selector:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
 ---
 # Source: postgresql/templates/primary/statefulset.yaml
@@ -104,11 +157,10 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: primary
-  annotations:
 spec:
   replicas: 1
   serviceName: postgresql-hl
@@ -117,16 +169,16 @@
     type: RollingUpdate
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: primary
   template:
     metadata:
       name: postgresql
       labels:
-        app.kubernetes.io/name: postgresql
         app.kubernetes.io/instance: postgresql
         app.kubernetes.io/managed-by: Helm
+        app.kubernetes.io/name: postgresql
         app.kubernetes.io/component: primary
       annotations:
         backup.velero.io/backup-volumes: data
@@ -135,7 +187,8 @@
         pre.hook.backup.velero.io/command: '["/sbin/fsfreeze", "--freeze", "/bitnami/postgresql"]'
         pre.hook.backup.velero.io/container: fsfreeze
     spec:
-      serviceAccountName: default
+      serviceAccountName: postgresql
+      automountServiceAccountToken: false
       affinity:
         podAffinity:
         podAntiAffinity:
@@ -143,25 +196,36 @@
             - podAffinityTerm:
                 labelSelector:
                   matchLabels:
-                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/instance: postgresql
+                    app.kubernetes.io/name: postgresql
                     app.kubernetes.io/component: primary
-                namespaces:
-                  - "default"
                 topologyKey: kubernetes.io/hostname
               weight: 1
         nodeAffinity:
       securityContext:
         fsGroup: 1001
+        fsGroupChangePolicy: Always
+        supplementalGroups: []
+        sysctls: []
       hostNetwork: false
       hostIPC: false
-      initContainers:
       containers:
         - name: postgresql
           image: quay.io/bitnami/postgresql:14.1.0
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
+            runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: BITNAMI_DEBUG
               value: "false"
@@ -174,21 +238,18 @@
             # Authentication
             - name: POSTGRES_USER
               value: "${SECRET_POSTGRES_USERNAME}"
-            - name: POSTGRES_POSTGRES_PASSWORD
+            - name: POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: postgres-password
-            - name: POSTGRES_PASSWORD
+                  key: password
+            - name: POSTGRES_POSTGRES_PASSWORD
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
-            - name: POSTGRES_DB
+                  key: postgres-password
+            - name: POSTGRES_DATABASE
               value: "postgres"
-            # Replication
-            # Initdb
-            # Standby
             # LDAP
             - name: POSTGRESQL_ENABLE_LDAP
               value: "no"
@@ -238,21 +299,44 @@
                   exec pg_isready -U "${SECRET_POSTGRES_USERNAME}" -d "dbname=postgres" -h 127.0.0.1 -p 5432
                   [ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
           resources:
-            limits: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
             requests:
-              cpu: 250m
-              memory: 256Mi
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/conf
+              subPath: app-conf-dir
+            - name: empty-dir
+              mountPath: /opt/bitnami/postgresql/tmp
+              subPath: app-tmp-dir
             - name: dshm
               mountPath: /dev/shm
             - name: data
               mountPath: /bitnami/postgresql
         - name: metrics
-          image: docker.io/bitnami/postgres-exporter:0.11.1-debian-11-r15
+          image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r43
           imagePullPolicy: "IfNotPresent"
           securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+                - ALL
+            privileged: false
+            readOnlyRootFilesystem: true
+            runAsGroup: 1001
             runAsNonRoot: true
             runAsUser: 1001
+            seLinuxOptions: {}
+            seccompProfile:
+              type: RuntimeDefault
           env:
             - name: DATA_SOURCE_URI
               value: 127.0.0.1:5432/postgres?sslmode=disable
@@ -260,9 +344,9 @@
               valueFrom:
                 secretKeyRef:
                   name: postgresql
-                  key: password
+                  key: postgres-password
             - name: DATA_SOURCE_USER
-              value: "${SECRET_POSTGRES_USERNAME}"
+              value: "postgres"
           ports:
             - name: http-metrics
               containerPort: 9187
@@ -285,15 +369,28 @@
               path: /
               port: http-metrics
           volumeMounts:
+            - name: empty-dir
+              mountPath: /tmp
+              subPath: tmp-dir
           resources:
-            limits: {}
-            requests: {}
+            limits:
+              cpu: 150m
+              ephemeral-storage: 2Gi
+              memory: 192Mi
+            requests:
+              cpu: 100m
+              ephemeral-storage: 50Mi
+              memory: 128Mi
       volumes:
+        - name: empty-dir
+          emptyDir: {}
         - name: dshm
           emptyDir:
             medium: Memory
   volumeClaimTemplates:
-    - metadata:
+    - apiVersion: v1
+      kind: PersistentVolumeClaim
+      metadata:
         name: data
       spec:
         accessModes:
@@ -309,15 +406,15 @@
   name: postgresql
   namespace: "default"
   labels:
-    app.kubernetes.io/name: postgresql
     app.kubernetes.io/instance: postgresql
     app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: postgresql
     app.kubernetes.io/component: metrics
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: postgresql
       app.kubernetes.io/instance: postgresql
+      app.kubernetes.io/name: postgresql
       app.kubernetes.io/component: metrics
   endpoints:
     - port: http-metrics

@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.5.37 feat(charts)!: Update Helm release postgresql to 15.5.38 Oct 1, 2024
@renovate renovate bot changed the title feat(charts)!: Update Helm release postgresql to 15.5.38 feat(charts)!: Update Helm release postgresql to 15.5.38 - autoclosed Oct 3, 2024
@renovate renovate bot closed this Oct 3, 2024
@renovate renovate bot deleted the renovate/postgresql-15.x branch October 3, 2024 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants