diff --git a/chart/templates/deployment-ui.yaml b/chart/templates/deployment-ui.yaml index 1a7ea1c..78ae267 100644 --- a/chart/templates/deployment-ui.yaml +++ b/chart/templates/deployment-ui.yaml @@ -20,13 +20,27 @@ spec: image: {{ template "registry_url" . }}{{ .Values.image.longhorn.ui.repository }}:{{ .Values.image.longhorn.ui.tag }} imagePullPolicy: IfNotPresent securityContext: - runAsUser: 0 + runAsUser: 1000 + volumeMounts: + - mountPath: /var/cache/nginx/ + name: cache-volume + - mountPath: /var/config/nginx/ + name: cache-volume + - mountPath: /var/run/ + name: cache-volume 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 {{- if .Values.privateRegistry.registrySecret }} imagePullSecrets: - name: {{ .Values.privateRegistry.registrySecret }} diff --git a/deploy/longhorn.yaml b/deploy/longhorn.yaml index 4a11caa..92a8547 100644 --- a/deploy/longhorn.yaml +++ b/deploy/longhorn.yaml @@ -1126,13 +1126,27 @@ spec: image: longhornio/longhorn-ui:v1.2.3 imagePullPolicy: IfNotPresent securityContext: - runAsUser: 0 + runAsUser: 1000 + volumeMounts: + - mountPath: /var/cache/nginx/ + name: cache-volume + - mountPath: /var/config/nginx/ + name: cache-volume + - mountPath: /var/run/ + name: cache-volume 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 # imagePullSecrets: # - name: "" # priorityClassName: