Add Docker default AppArmor profile to memcached chart

Adding apparmor profile to memcached and memcached-exporter charts

Change-Id: I40ece825d75b6884714b9121d8d501efcbce2f53
This commit is contained in:
KHIYANI, RAHUL (rk0850) 2020-02-13 10:51:15 -06:00
parent f17b6de1a2
commit cce2e61c16
3 changed files with 12 additions and 1 deletions

View File

@ -39,7 +39,7 @@ spec:
template: template:
metadata: metadata:
annotations: annotations:
{{- dict "envAll" $envAll "podName" "memcached" "containerNames" (list "apparmor-loader" "memcached") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} {{ dict "envAll" $envAll "podName" "memcached" "containerNames" (list "memcached") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
labels: labels:

View File

@ -39,6 +39,10 @@ spec:
labels: labels:
{{ tuple $envAll "prometheus_memcached_exporter" "exporter" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} {{ tuple $envAll "prometheus_memcached_exporter" "exporter" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
namespace: {{ .Values.endpoints.prometheus_memcached_exporter.namespace }} namespace: {{ .Values.endpoints.prometheus_memcached_exporter.namespace }}
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
{{ dict "envAll" $envAll "podName" "prometheus_memcached_exporter" "containerNames" (list "memcached-exporter") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
spec: spec:
{{ dict "envAll" $envAll "application" "memcached_exporter" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} {{ dict "envAll" $envAll "application" "memcached_exporter" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
shareProcessNamespace: true shareProcessNamespace: true

View File

@ -0,0 +1,7 @@
pod:
mandatory_access_control:
type: apparmor
prometheus_memcached_exporter:
memcached-exporter: runtime/default
memcached:
memcached: runtime/default