From 19fe6ca7ab0806bccd9c143690fae75b9ea732b0 Mon Sep 17 00:00:00 2001 From: "KHIYANI, RAHUL (rk0850)" Date: Thu, 30 Apr 2020 10:44:44 -0500 Subject: [PATCH] Memcached: Add apparmor profile to memcached init containers Change-Id: I194e24da1bc5813179b582ad89bc9c41213fe4d0 --- memcached/templates/deployment.yaml | 2 +- .../templates/monitoring/prometheus/exporter-deployment.yaml | 2 +- memcached/values_overrides/apparmor.yaml | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/memcached/templates/deployment.yaml b/memcached/templates/deployment.yaml index fb300e7d5..d39ab6191 100644 --- a/memcached/templates/deployment.yaml +++ b/memcached/templates/deployment.yaml @@ -39,7 +39,7 @@ spec: template: metadata: annotations: -{{ dict "envAll" $envAll "podName" "memcached" "containerNames" (list "memcached") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} +{{ dict "envAll" $envAll "podName" "memcached" "containerNames" (list "init" "memcached") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} labels: diff --git a/memcached/templates/monitoring/prometheus/exporter-deployment.yaml b/memcached/templates/monitoring/prometheus/exporter-deployment.yaml index 1e8622a7e..980e29c98 100644 --- a/memcached/templates/monitoring/prometheus/exporter-deployment.yaml +++ b/memcached/templates/monitoring/prometheus/exporter-deployment.yaml @@ -41,7 +41,7 @@ spec: namespace: {{ .Values.endpoints.prometheus_memcached_exporter.namespace }} annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} -{{ dict "envAll" $envAll "podName" "prometheus_memcached_exporter" "containerNames" (list "memcached-exporter") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} +{{ dict "envAll" $envAll "podName" "prometheus_memcached_exporter" "containerNames" (list "init" "memcached-exporter") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: {{ dict "envAll" $envAll "application" "memcached_exporter" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} shareProcessNamespace: true diff --git a/memcached/values_overrides/apparmor.yaml b/memcached/values_overrides/apparmor.yaml index 1ac05b2a7..8e11b2742 100644 --- a/memcached/values_overrides/apparmor.yaml +++ b/memcached/values_overrides/apparmor.yaml @@ -2,8 +2,10 @@ pod: mandatory_access_control: type: apparmor prometheus_memcached_exporter: + init: runtime/default memcached-exporter: runtime/default memcached: + init: runtime/default memcached: runtime/default monitoring: