Enable Docker default Apparmor for Postgresql and prometheus-postgresql.

Change-Id: I013ca5f99e5032c44f0d679e467da9e928c02a6b
This commit is contained in:
dt241s@att.com 2020-01-28 13:26:26 -06:00 committed by diwakar thyagaraj
parent 88b419d133
commit f633555f16
5 changed files with 14 additions and 0 deletions

View File

@ -34,6 +34,9 @@ spec:
labels:
{{ tuple $envAll "prometheus_postgresql_exporter" "exporter" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
namespace: {{ .Values.endpoints.prometheus_postgresql_exporter.namespace }}
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
{{ dict "envAll" $envAll "podName" "prometheus-postgresql-exporter" "containerNames" (list "postgresql-exporter") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
spec:
{{ dict "envAll" $envAll "application" "prometheus_postgresql_exporter" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
serviceAccountName: {{ $serviceAccountName }}

View File

@ -122,6 +122,7 @@ spec:
{{ 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" "postgresql" "containerNames" (list "postgresql" "set-volume-perms") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
configmap-admin-hash: {{ tuple "secret-admin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-replica-hash: {{ tuple "secret-replica.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-secrets-etc-hash: {{ tuple "secrets-etc.yaml" . | include "helm-toolkit.utils.hash" }}

View File

@ -0,0 +1,8 @@
pod:
mandatory_access_control:
type: apparmor
postgresql:
postgresql: runtime/default
set-volume-perms: runtime/default
prometheus-postgresql-exporter:
postgresql-exporter: runtime/default

View File

@ -0,0 +1 @@
../osh-infra-monitoring/130-postgresql.sh

View File

@ -286,6 +286,7 @@
- ./tools/deployment/apparmor/100-fluentbit.sh
- ./tools/deployment/apparmor/110-fluentd-daemonset.sh
- ./tools/deployment/apparmor/120-openvswitch.sh
- ./tools/deployment/apparmor/130-postgresql.sh
- job:
name: openstack-helm-infra-openstack-support