Merge "Implement Security Context for Cinder"

This commit is contained in:
Zuul 2019-03-22 21:18:29 +00:00 committed by Gerrit Code Review
commit ee477d4562
5 changed files with 20 additions and 8 deletions

View File

@ -73,8 +73,7 @@ spec:
- name: cinder-api
{{ tuple $envAll "cinder_api" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext:
allowPrivilegeEscalation: false
{{ dict "envAll" $envAll "application" "cinder" "container" "cinder-api" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
command:
- /tmp/cinder-api.sh
- start

View File

@ -130,6 +130,7 @@ spec:
- name: cinder-backup
{{ tuple $envAll "cinder_backup" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.backup | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" $envAll "application" "cinder" "container" "cinder-backup" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
securityContext:
capabilities:
add:

View File

@ -72,8 +72,7 @@ spec:
- name: cinder-scheduler
{{ tuple $envAll "cinder_scheduler" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.scheduler | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext:
allowPrivilegeEscalation: false
{{ dict "envAll" $envAll "application" "cinder" "container" "cinder-scheduler" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
command:
- /tmp/cinder-scheduler.sh
volumeMounts:

View File

@ -94,8 +94,7 @@ spec:
- name: cinder-volume
{{ tuple $envAll "cinder_volume" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.volume | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext:
allowPrivilegeEscalation: true
{{ dict "envAll" $envAll "application" "cinder" "container" "cinder-volume" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
command:
- /tmp/cinder-volume.sh
volumeMounts:

View File

@ -77,9 +77,23 @@ jobs:
failed: 1
pod:
user:
security_context:
cinder:
uid: 42424
pod:
runAsUser: 42424
container:
cinder_api:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
cinder_backup:
redOnlyRootFilesystem: true
allowPrivilegeEscalation: false
cinder_scheduler:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
cinder_volume:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
affinity:
anti:
type: