diff --git a/release-charts/mixingx-agent-unit/templates/unit.yaml b/release-charts/mixingx-agent-unit/templates/unit.yaml index 51f9e73..2706ba0 100644 --- a/release-charts/mixingx-agent-unit/templates/unit.yaml +++ b/release-charts/mixingx-agent-unit/templates/unit.yaml @@ -253,8 +253,17 @@ spec: app.kubernetes.io/component: {{ $name }}-postgres spec: {{ include "mixingx-unit.followerScheduling" . | nindent 6 }} + # postgres 以专用用户直跑,绕过镜像内 gosu(新内核下 gosu 用户态死循环, + # 见 ADR/工单:kernel 7.0.0-39+ × gosu 兼容 bug;三件套缺一不可) + securityContext: + runAsUser: 999 + runAsGroup: 999 + fsGroup: 999 containers: - name: postgres + command: ["docker-entrypoint.sh", "postgres"] + securityContext: + privileged: true image: {{ include "mixingx-agent-unit.image" (dict "registry" .Values.global.imageRegistry "image" .Values.images.postgres) | quote }} imagePullPolicy: IfNotPresent env: diff --git a/release-charts/mixingx-audit/templates/audit-db.yaml b/release-charts/mixingx-audit/templates/audit-db.yaml index 9f55c79..7cda2ed 100644 --- a/release-charts/mixingx-audit/templates/audit-db.yaml +++ b/release-charts/mixingx-audit/templates/audit-db.yaml @@ -32,8 +32,17 @@ spec: app.kubernetes.io/component: {{ .Values.audit.database }}-postgres spec: {{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }} + # postgres 以专用用户直跑,绕过镜像内 gosu(新内核下 gosu 用户态死循环, + # 见 ADR/工单:kernel 7.0.0-39+ × gosu 兼容 bug;三件套缺一不可) + securityContext: + runAsUser: 999 + runAsGroup: 999 + fsGroup: 999 containers: - name: postgres + command: ["docker-entrypoint.sh", "postgres"] + securityContext: + privileged: true image: {{ include "mixingx-audit.image" (dict "registry" $root.Values.global.imageRegistry "image" $root.Values.images.postgres) | quote }} imagePullPolicy: IfNotPresent env: diff --git a/release-charts/mixingx-platform/templates/audit.yaml b/release-charts/mixingx-platform/templates/audit.yaml index b639bac..9693601 100644 --- a/release-charts/mixingx-platform/templates/audit.yaml +++ b/release-charts/mixingx-platform/templates/audit.yaml @@ -208,8 +208,17 @@ spec: app.kubernetes.io/component: {{ .Values.audit.database }}-postgres spec: {{ include "mixingx-platform.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }} + # postgres 以专用用户直跑,绕过镜像内 gosu(新内核下 gosu 用户态死循环, + # 见 ADR/工单:kernel 7.0.0-39+ × gosu 兼容 bug;三件套缺一不可) + securityContext: + runAsUser: 999 + runAsGroup: 999 + fsGroup: 999 containers: - name: postgres + command: ["docker-entrypoint.sh", "postgres"] + securityContext: + privileged: true image: {{ include "mixingx-platform.image" (dict "registry" $root.Values.global.imageRegistry "image" $root.Values.images.postgres) | quote }} imagePullPolicy: IfNotPresent env: diff --git a/release-charts/mixingx-sso/templates/sso.yaml b/release-charts/mixingx-sso/templates/sso.yaml index c35f1b5..77f2551 100644 --- a/release-charts/mixingx-sso/templates/sso.yaml +++ b/release-charts/mixingx-sso/templates/sso.yaml @@ -190,8 +190,17 @@ spec: app.kubernetes.io/component: {{ $name }}-postgres spec: {{ include "mixingx-sso.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }} + # postgres 以专用用户直跑,绕过镜像内 gosu(新内核下 gosu 用户态死循环, + # 见 ADR/工单:kernel 7.0.0-39+ × gosu 兼容 bug;三件套缺一不可) + securityContext: + runAsUser: 999 + runAsGroup: 999 + fsGroup: 999 containers: - name: postgres + command: ["docker-entrypoint.sh", "postgres"] + securityContext: + privileged: true image: {{ include "mixingx-sso.image" (dict "registry" $root.Values.global.imageRegistry "image" $root.Values.images.postgres) | quote }} imagePullPolicy: IfNotPresent env: diff --git a/release-charts/mixingx-ultra/templates/ultra.yaml b/release-charts/mixingx-ultra/templates/ultra.yaml index 65a7f4a..5d998df 100644 --- a/release-charts/mixingx-ultra/templates/ultra.yaml +++ b/release-charts/mixingx-ultra/templates/ultra.yaml @@ -193,8 +193,17 @@ spec: app.kubernetes.io/component: {{ $name }}-postgres spec: {{ include "mixingx-ultra.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }} + # postgres 以专用用户直跑,绕过镜像内 gosu(新内核下 gosu 用户态死循环, + # 见 ADR/工单:kernel 7.0.0-39+ × gosu 兼容 bug;三件套缺一不可) + securityContext: + runAsUser: 999 + runAsGroup: 999 + fsGroup: 999 containers: - name: postgres + command: ["docker-entrypoint.sh", "postgres"] + securityContext: + privileged: true image: {{ include "mixingx-ultra.image" (dict "registry" $root.Values.global.imageRegistry "image" $root.Values.images.postgres) | quote }} imagePullPolicy: IfNotPresent env: