-
Notifications
You must be signed in to change notification settings - Fork 13
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
Conversation
Path: @@ -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 |
2fabaa8
to
c476421
Compare
Path: @@ -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 |
c476421
to
2eeaa29
Compare
Path: @@ -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 |
2eeaa29
to
db76b43
Compare
Path: @@ -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 |
db76b43
to
b13d384
Compare
Path: @@ -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 |
b13d384
to
a2238a0
Compare
Path: @@ -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 |
a2238a0
to
9b5bdc4
Compare
Path: @@ -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 |
9b5bdc4
to
e87036b
Compare
Path: @@ -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 |
e87036b
to
e3f62e7
Compare
Path: @@ -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 |
e3f62e7
to
5a206ef
Compare
Path: @@ -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 |
Path: @@ -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 |
29086a1
to
ac30743
Compare
Path: @@ -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 |
ac30743
to
a67bbf4
Compare
Path: @@ -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 |
a67bbf4
to
d1f4ae4
Compare
Path: @@ -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 |
d1f4ae4
to
deb616a
Compare
Path: @@ -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 |
deb616a
to
6f69629
Compare
Path: @@ -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 |
6f69629
to
1569fd2
Compare
Path: @@ -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 |
1569fd2
to
4ee8775
Compare
Path: @@ -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 |
Signed-off-by: Danny Froberg <[email protected]>
4ee8775
to
a91faa2
Compare
Path: @@ -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 |
This PR contains the following updates:
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
v15.5.37
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
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
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
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
v15.0.0
v14.3.3
v14.3.2
v14.3.1
v14.3.0
v14.2.4
v14.2.3
v14.2.2
v14.2.1
v14.1.3
v14.1.2
v14.1.1
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
v13.3.1
v13.3.0
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
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.
This PR was generated by Mend Renovate. View the repository job log.