From 977c523cef00f7919a82d268da7e55223f1864ce Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Sat, 8 Dec 2018 16:16:11 -0600 Subject: [PATCH] Mariadb: Share container PID namespaces under docker This PS shares pid namespaces for containers in pods under docker, bringing running in this runtime inline with other runc based container backends, allowing the pause process in the pod to act as a reaper. Change-Id: Ib5fc101d930446d848246eb5ca4d554b756cb91f Signed-off-by: Pete Birley --- mariadb/templates/deployment-error.yaml | 1 + mariadb/templates/deployment-ingress.yaml | 1 + mariadb/templates/monitoring/prometheus/exporter-deployment.yaml | 1 + .../monitoring/prometheus/exporter-job-create-user.yaml | 1 + mariadb/templates/statefulset.yaml | 1 + 5 files changed, 5 insertions(+) diff --git a/mariadb/templates/deployment-error.yaml b/mariadb/templates/deployment-error.yaml index c310324cb..78c4b1887 100644 --- a/mariadb/templates/deployment-error.yaml +++ b/mariadb/templates/deployment-error.yaml @@ -42,6 +42,7 @@ spec: configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} spec: + shareProcessNamespace: true serviceAccountName: {{ $serviceAccountName }} affinity: {{ tuple $envAll "mariadb" "ingress-error-pages" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} diff --git a/mariadb/templates/deployment-ingress.yaml b/mariadb/templates/deployment-ingress.yaml index 053a08f91..afe9407f5 100644 --- a/mariadb/templates/deployment-ingress.yaml +++ b/mariadb/templates/deployment-ingress.yaml @@ -137,6 +137,7 @@ spec: configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} spec: + shareProcessNamespace: true serviceAccountName: {{ $serviceAccountName }} affinity: {{ tuple $envAll "mariadb" "ingress" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} diff --git a/mariadb/templates/monitoring/prometheus/exporter-deployment.yaml b/mariadb/templates/monitoring/prometheus/exporter-deployment.yaml index 274a06c0e..00b3f6ecc 100644 --- a/mariadb/templates/monitoring/prometheus/exporter-deployment.yaml +++ b/mariadb/templates/monitoring/prometheus/exporter-deployment.yaml @@ -38,6 +38,7 @@ spec: {{ tuple $envAll "prometheus_mysql_exporter" "exporter" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} namespace: {{ .Values.endpoints.prometheus_mysql_exporter.namespace }} spec: + shareProcessNamespace: true serviceAccountName: {{ $serviceAccountName }} nodeSelector: {{ .Values.labels.prometheus_mysql_exporter.node_selector_key }}: {{ .Values.labels.prometheus_mysql_exporter.node_selector_value }} diff --git a/mariadb/templates/monitoring/prometheus/exporter-job-create-user.yaml b/mariadb/templates/monitoring/prometheus/exporter-job-create-user.yaml index df7a14701..b9f7b5674 100644 --- a/mariadb/templates/monitoring/prometheus/exporter-job-create-user.yaml +++ b/mariadb/templates/monitoring/prometheus/exporter-job-create-user.yaml @@ -30,6 +30,7 @@ spec: labels: {{ tuple $envAll "prometheus_mysql_exporter" "create-sql-user" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} spec: + shareProcessNamespace: true serviceAccountName: {{ $serviceAccountName }} restartPolicy: OnFailure nodeSelector: diff --git a/mariadb/templates/statefulset.yaml b/mariadb/templates/statefulset.yaml index de0fac2c2..c6aa45185 100644 --- a/mariadb/templates/statefulset.yaml +++ b/mariadb/templates/statefulset.yaml @@ -91,6 +91,7 @@ spec: configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} spec: + shareProcessNamespace: true serviceAccountName: {{ $serviceAccountName }} affinity: {{ tuple $envAll "mariadb" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}