From 8ad1c56cadf9ad7004b790a7dd606eb95966db5b Mon Sep 17 00:00:00 2001 From: Matthew Mattox Date: Thu, 24 Feb 2022 04:04:19 -0600 Subject: [PATCH] adding cache-volume to longhorn-ui Signed-off-by: Matthew Mattox (cherry picked from commit c7ed614cbc7939c2eacbb88935e2664b2db212ea) --- chart/templates/deployment-ui.yaml | 16 +++++++++++++++- deploy/longhorn.yaml | 16 +++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/chart/templates/deployment-ui.yaml b/chart/templates/deployment-ui.yaml index 772f875..0c56630 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: