Set securityContext for deployer and ui
When pod security policies are used, the default restricted policy does not allow root permissions. Even when a more permissive policy is assigned to the service account, we need to inform k8s that we need root permissions so that the correct policy can be selected. Signed-off-by: Aaron Spettl <aaron@spettl.de>
This commit is contained in:
parent
5e67c380a8
commit
1867b85110
@ -79,3 +79,5 @@ spec:
|
|||||||
- name: {{ .Values.defaultSettings.registrySecret }}
|
- name: {{ .Values.defaultSettings.registrySecret }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceAccountName: longhorn-service-account
|
serviceAccountName: longhorn-service-account
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
@ -19,6 +19,8 @@ spec:
|
|||||||
- name: longhorn-ui
|
- name: longhorn-ui
|
||||||
image: "{{ .Values.image.longhorn.ui }}:{{ .Values.image.longhorn.uiTag }}"
|
image: "{{ .Values.image.longhorn.ui }}:{{ .Values.image.longhorn.uiTag }}"
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8000
|
- containerPort: 8000
|
||||||
name: http
|
name: http
|
||||||
|
@ -348,6 +348,8 @@ spec:
|
|||||||
- name: longhorn-ui
|
- name: longhorn-ui
|
||||||
image: longhornio/longhorn-ui:v0.8.1
|
image: longhornio/longhorn-ui:v0.8.1
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8000
|
- containerPort: 8000
|
||||||
name: http
|
name: http
|
||||||
@ -439,6 +441,8 @@ spec:
|
|||||||
#imagePullSecrets:
|
#imagePullSecrets:
|
||||||
#- name:
|
#- name:
|
||||||
serviceAccountName: longhorn-service-account
|
serviceAccountName: longhorn-service-account
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
---
|
---
|
||||||
kind: StorageClass
|
kind: StorageClass
|
||||||
apiVersion: storage.k8s.io/v1
|
apiVersion: storage.k8s.io/v1
|
||||||
|
Loading…
Reference in New Issue
Block a user