Removing runAsUser and securityContext, as the image will run as Longhorn instead of root

Signed-off-by: Matthew Mattox <Matt.Mattox@suse.com>
(cherry picked from commit fa6ec17cfb)
This commit is contained in:
Matthew Mattox 2022-02-26 19:57:08 -06:00 committed by David Ko
parent 8ad1c56cad
commit b267caddd9
2 changed files with 22 additions and 26 deletions

View File

@ -19,28 +19,26 @@ spec:
- name: longhorn-ui
image: {{ template "registry_url" . }}{{ .Values.image.longhorn.ui.repository }}:{{ .Values.image.longhorn.ui.tag }}
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 1000
volumeMounts:
- mountPath: /var/cache/nginx/
name: cache-volume
- mountPath: /var/config/nginx/
name: cache-volume
- mountPath: /var/run/
name: cache-volume
- name : nginx-cache
mountPath: /var/cache/nginx/
- name : nginx-config
mountPath: /var/config/nginx/
- name: var-run
mountPath: /var/run/
ports:
- containerPort: 8000
name: http
env:
- name: LONGHORN_MANAGER_IP
value: "http://longhorn-backend:9500"
securityContext:
fsGroup: 2000
runAsGroup: 3000
runAsUser: 1000
volumes:
- emptyDir: {}
name: cache-volume
name: nginx-cache
- emptyDir: {}
name: nginx-config
- emptyDir: {}
name: var-run
{{- if .Values.privateRegistry.registrySecret }}
imagePullSecrets:
- name: {{ .Values.privateRegistry.registrySecret }}

View File

@ -1125,28 +1125,26 @@ spec:
- name: longhorn-ui
image: longhornio/longhorn-ui:v1.2.3
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 1000
volumeMounts:
- mountPath: /var/cache/nginx/
name: cache-volume
- mountPath: /var/config/nginx/
name: cache-volume
- mountPath: /var/run/
name: cache-volume
- name : nginx-cache
mountPath: /var/cache/nginx/
- name : nginx-config
mountPath: /var/config/nginx/
- name: var-run
mountPath: /var/run/
ports:
- containerPort: 8000
name: http
env:
- name: LONGHORN_MANAGER_IP
value: "http://longhorn-backend:9500"
securityContext:
fsGroup: 2000
runAsGroup: 3000
runAsUser: 1000
volumes:
- emptyDir: {}
name: cache-volume
name: nginx-cache
- emptyDir: {}
name: nginx-config
- emptyDir: {}
name: var-run
# imagePullSecrets:
# - name: ""
# priorityClassName: