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

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

View File

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

View File

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