fix(helm): start PostgreSQL without gosu on K3s
This commit is contained in:
1 parent
60356c55aa
commit
88ebfd30e1
7 files changed
+124
No files matched your search
@@ -207,6 +207,11 @@ spec:
|
||||
labels:
|
||||
app.kubernetes.io/component: {{ $name }}-postgres
|
||||
spec:
|
||||
securityContext:
|
||||
# Run the image entrypoint as postgres so it does not invoke gosu.
|
||||
runAsUser: 999
|
||||
runAsGroup: 999
|
||||
fsGroup: 999
|
||||
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
|
||||
{{- with $.Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
@@ -216,6 +221,10 @@ spec:
|
||||
- name: postgres
|
||||
image: {{ .Values.images.postgres.repository }}:{{ .Values.images.postgres.tag | default "latest" }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["docker-entrypoint.sh", "postgres"]
|
||||
securityContext:
|
||||
# Temporary compatibility workaround for checkpoint signal failures on affected k3s nodes.
|
||||
privileged: true
|
||||
env:
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: "{{ .Values.sharedInfra.postgres.password }}"
|
||||
@@ -229,6 +238,15 @@ spec:
|
||||
- name: tcp
|
||||
containerPort: {{ .Values.ports.postgres }}
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -ec
|
||||
- >-
|
||||
exec pg_isready -q -h 127.0.0.1 -p {{ .Values.ports.postgres }} -U "$POSTGRES_USER" -d "$POSTGRES_DB"
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
|
||||
@@ -31,6 +31,11 @@ spec:
|
||||
labels:
|
||||
app.kubernetes.io/component: {{ .Values.audit.database }}-postgres
|
||||
spec:
|
||||
securityContext:
|
||||
# Run the image entrypoint as postgres so it does not invoke gosu.
|
||||
runAsUser: 999
|
||||
runAsGroup: 999
|
||||
fsGroup: 999
|
||||
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
||||
{{- with $.Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
@@ -40,6 +45,10 @@ spec:
|
||||
- name: postgres
|
||||
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["docker-entrypoint.sh", "postgres"]
|
||||
securityContext:
|
||||
# Temporary compatibility workaround for checkpoint signal failures on affected k3s nodes.
|
||||
privileged: true
|
||||
env:
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: "{{ $root.Values.sharedInfra.postgres.password }}"
|
||||
@@ -53,6 +62,15 @@ spec:
|
||||
- name: tcp
|
||||
containerPort: {{ $root.Values.sharedInfra.postgres.port }}
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -ec
|
||||
- >-
|
||||
exec pg_isready -q -h 127.0.0.1 -p {{ $root.Values.sharedInfra.postgres.port }} -U "$POSTGRES_USER" -d "$POSTGRES_DB"
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
|
||||
@@ -231,6 +231,11 @@ spec:
|
||||
labels:
|
||||
app.kubernetes.io/component: {{ .name }}-postgres
|
||||
spec:
|
||||
securityContext:
|
||||
# Run the image entrypoint as postgres so it does not invoke gosu.
|
||||
runAsUser: 999
|
||||
runAsGroup: 999
|
||||
fsGroup: 999
|
||||
{{ include "mixingx-platform.tierAffinity" (dict "role" .tierRole "root" $root) | nindent 6 }}
|
||||
{{- with $root.Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
@@ -240,6 +245,10 @@ spec:
|
||||
- name: postgres
|
||||
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["docker-entrypoint.sh", "postgres"]
|
||||
securityContext:
|
||||
# Temporary compatibility workaround for checkpoint signal failures on affected k3s nodes.
|
||||
privileged: true
|
||||
env:
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: "{{ $root.Values.sharedInfra.postgres.password }}"
|
||||
@@ -253,6 +262,15 @@ spec:
|
||||
- name: tcp
|
||||
containerPort: {{ $root.Values.sharedInfra.postgres.port }}
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -ec
|
||||
- >-
|
||||
exec pg_isready -q -h 127.0.0.1 -p {{ $root.Values.sharedInfra.postgres.port }} -U "$POSTGRES_USER" -d "$POSTGRES_DB"
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
|
||||
@@ -213,6 +213,11 @@ spec:
|
||||
labels:
|
||||
app.kubernetes.io/component: {{ .Values.audit.database }}-postgres
|
||||
spec:
|
||||
securityContext:
|
||||
# Run the image entrypoint as postgres so it does not invoke gosu.
|
||||
runAsUser: 999
|
||||
runAsGroup: 999
|
||||
fsGroup: 999
|
||||
{{ include "mixingx-platform.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
||||
{{- with $.Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
@@ -222,6 +227,10 @@ spec:
|
||||
- name: postgres
|
||||
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["docker-entrypoint.sh", "postgres"]
|
||||
securityContext:
|
||||
# Temporary compatibility workaround for checkpoint signal failures on affected k3s nodes.
|
||||
privileged: true
|
||||
env:
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: "{{ $root.Values.sharedInfra.postgres.password }}"
|
||||
@@ -235,6 +244,15 @@ spec:
|
||||
- name: tcp
|
||||
containerPort: {{ $root.Values.sharedInfra.postgres.port }}
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -ec
|
||||
- >-
|
||||
exec pg_isready -q -h 127.0.0.1 -p {{ $root.Values.sharedInfra.postgres.port }} -U "$POSTGRES_USER" -d "$POSTGRES_DB"
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
|
||||
@@ -197,6 +197,11 @@ spec:
|
||||
labels:
|
||||
app.kubernetes.io/component: {{ $name }}-postgres
|
||||
spec:
|
||||
securityContext:
|
||||
# Run the image entrypoint as postgres so it does not invoke gosu.
|
||||
runAsUser: 999
|
||||
runAsGroup: 999
|
||||
fsGroup: 999
|
||||
{{ include "mixingx-sso.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
|
||||
{{- with $.Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
@@ -206,6 +211,10 @@ spec:
|
||||
- name: postgres
|
||||
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["docker-entrypoint.sh", "postgres"]
|
||||
securityContext:
|
||||
# Temporary compatibility workaround for checkpoint signal failures on affected k3s nodes.
|
||||
privileged: true
|
||||
env:
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: "{{ $root.Values.sharedInfra.postgres.password }}"
|
||||
@@ -219,6 +228,15 @@ spec:
|
||||
- name: tcp
|
||||
containerPort: {{ $root.Values.sharedInfra.postgres.port }}
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -ec
|
||||
- >-
|
||||
exec pg_isready -q -h 127.0.0.1 -p {{ $root.Values.sharedInfra.postgres.port }} -U "$POSTGRES_USER" -d "$POSTGRES_DB"
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
|
||||
@@ -200,6 +200,11 @@ spec:
|
||||
labels:
|
||||
app.kubernetes.io/component: {{ $name }}-postgres
|
||||
spec:
|
||||
securityContext:
|
||||
# Run the image entrypoint as postgres so it does not invoke gosu.
|
||||
runAsUser: 999
|
||||
runAsGroup: 999
|
||||
fsGroup: 999
|
||||
{{ include "mixingx-ultra.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
|
||||
{{- with $.Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
@@ -209,6 +214,10 @@ spec:
|
||||
- name: postgres
|
||||
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["docker-entrypoint.sh", "postgres"]
|
||||
securityContext:
|
||||
# Temporary compatibility workaround for checkpoint signal failures on affected k3s nodes.
|
||||
privileged: true
|
||||
env:
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: "{{ $root.Values.sharedInfra.postgres.password }}"
|
||||
@@ -222,6 +231,15 @@ spec:
|
||||
- name: tcp
|
||||
containerPort: {{ $root.Values.sharedInfra.postgres.port }}
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -ec
|
||||
- >-
|
||||
exec pg_isready -q -h 127.0.0.1 -p {{ $root.Values.sharedInfra.postgres.port }} -U "$POSTGRES_USER" -d "$POSTGRES_DB"
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
|
||||
Reference in new issue
Block a user