From 47df9fa6b405099ce3ebcffd5beea782e2f6e9d1 Mon Sep 17 00:00:00 2001 From: Prateek Dodda Date: Mon, 10 Feb 2020 14:59:48 -0600 Subject: [PATCH] Add Docker default AppArmor profile to rabbitmq Change-Id: I177554ff5bd9c5b61f9c5ad3fea9e6519c3b94bf --- rabbitmq/templates/job-cluster-wait.yaml | 5 +++++ rabbitmq/templates/statefulset.yaml | 1 + rabbitmq/values_overrides/apparmor.yaml | 11 +++++++++++ 3 files changed, 17 insertions(+) create mode 100644 rabbitmq/values_overrides/apparmor.yaml diff --git a/rabbitmq/templates/job-cluster-wait.yaml b/rabbitmq/templates/job-cluster-wait.yaml index bf8e710bb..3a3976cda 100644 --- a/rabbitmq/templates/job-cluster-wait.yaml +++ b/rabbitmq/templates/job-cluster-wait.yaml @@ -33,6 +33,11 @@ spec: metadata: labels: {{ tuple $envAll "rabbitmq" "cluster-wait" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} + annotations: +{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} +{{ dict "envAll" $envAll "podName" "rabbitmq-cluster-wait" "containerNames" (list "rabbitmq-cookie" "rabbitmq-rabbitmq-cluster-wait" ) | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: {{ dict "envAll" $envAll "application" "cluster_wait" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} serviceAccountName: {{ $serviceAccountName }} diff --git a/rabbitmq/templates/statefulset.yaml b/rabbitmq/templates/statefulset.yaml index a38df6e29..9e40a103d 100644 --- a/rabbitmq/templates/statefulset.yaml +++ b/rabbitmq/templates/statefulset.yaml @@ -77,6 +77,7 @@ spec: configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} secret-rabbit-admin-hash: {{ tuple "secret-rabbit-admin.yaml" . | include "helm-toolkit.utils.hash" }} secret-erlang-cookie-hash: {{ tuple "secret-erlang-cookie.yaml" . | include "helm-toolkit.utils.hash" }} +{{ dict "envAll" $envAll "podName" "rabbitmq" "containerNames" (list "rabbitmq-password" "rabbitmq-cookie" "rabbitmq-perms" "rabbitmq") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: {{ dict "envAll" $envAll "application" "server" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} serviceAccountName: {{ $rcControllerName | quote }} diff --git a/rabbitmq/values_overrides/apparmor.yaml b/rabbitmq/values_overrides/apparmor.yaml new file mode 100644 index 000000000..f50c10943 --- /dev/null +++ b/rabbitmq/values_overrides/apparmor.yaml @@ -0,0 +1,11 @@ +pod: + mandatory_access_control: + type: apparmor + rabbitmq-cluster-wait: + rabbitmq-cookie: runtime/default + rabbitmq-rabbitmq-cluster-wait: runtime/default + rabbitmq: + rabbitmq-password: runtime/default + rabbitmq-cookie: runtime/default + rabbitmq-perms: runtime/default + rabbitmq: runtime/default