@@ -15,11 +15,16 @@ spec:
15
15
labels :
16
16
app : {{ .Values.global.appName }}
17
17
tier : rabbitmq
18
+ kubeaudit.io/allow-disabled-apparmor : " apparmor-needs-to-be-installed-on-host"
19
+ kubeaudit.io/allow-read-only-root-filesystem-false : " required-to-write-log-files"
20
+ kubeaudit.io/allow-capability-setgid : " required-by-raabitmq-to-set-group-identitys"
21
+ kubeaudit.io/allow-capability-setuid : " required-by-raabitmq-to-set-user-identity"
18
22
annotations :
19
23
rollme : {{ randAlphaNum 5 | quote }}
20
24
{{- with include "resc.mqAnnotations" .}}
21
25
{{- nindent 8 .}}
22
26
{{- end }}
27
+ container.apparmor.security.beta.kubernetes.io/resc-mq : unconfined
23
28
spec :
24
29
{{ if .Values.global.serviceAccountName }}
25
30
serviceAccountName : {{ .Values.global.serviceAccountName }}
63
68
- mountPath : " /var/lib/rabbitmq/mnesia"
64
69
subPath : " var/lib/rabbitmq/mnesia"
65
70
name : {{ .Values.global.appName }}-mq-pv-storage
71
+ securityContext :
72
+ allowPrivilegeEscalation : false
73
+ readOnlyRootFilesystem : false
74
+ privileged : false
75
+ capabilities :
76
+ drop :
77
+ - ALL
78
+ add :
79
+ - SETGID
80
+ - SETUID
81
+ seccompProfile :
82
+ type : RuntimeDefault
83
+ runAsNonRoot : true
84
+ runAsUser : 10001
85
+ {{ if eq .Values.useKubernetesSecret "true"}}
86
+ readinessProbe :
87
+ initialDelaySeconds : 15
88
+ periodSeconds : 300
89
+ httpGet :
90
+ path : /api/health/checks/alarms
91
+ port : {{ .Values.rabbitMQ.config.mgmtPort}}
92
+ httpHeaders :
93
+ - name : Authorization
94
+ value : Basic {{ printf "%s:%s" .Values.rabbitMQ.config.admin_username .Values.rabbitMQ.config.admin_password | b64enc }}
95
+ {{ end }}
66
96
{{ if .Values.global.imagePullSecret_proxy }}
67
97
imagePullSecrets :
68
98
- name : {{ .Values.global.imagePullSecret_proxy }}
69
99
{{ end }}
100
+ {{ if .Values.global.serviceAccountName }}
101
+ automountServiceAccountToken : true
102
+ {{ else }}
103
+ automountServiceAccountToken : false
104
+ {{ end }}
0 commit comments