2019-09-20 20:45:56 +00:00
|
|
|
apiVersion: apps/v1
|
2019-05-08 17:21:58 +00:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2020-07-08 23:56:34 +00:00
|
|
|
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
2019-05-08 17:21:58 +00:00
|
|
|
app: longhorn-ui
|
|
|
|
name: longhorn-ui
|
2020-12-03 15:02:28 +00:00
|
|
|
namespace: {{ include "release_namespace" . }}
|
2019-05-08 17:21:58 +00:00
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: longhorn-ui
|
|
|
|
template:
|
|
|
|
metadata:
|
2020-07-08 23:56:34 +00:00
|
|
|
labels: {{- include "longhorn.labels" . | nindent 8 }}
|
2019-05-08 17:21:58 +00:00
|
|
|
app: longhorn-ui
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: longhorn-ui
|
2020-09-29 09:16:09 +00:00
|
|
|
image: {{ template "registry_url" . }}{{ .Values.image.longhorn.ui.repository }}:{{ .Values.image.longhorn.ui.tag }}
|
2020-06-26 20:24:30 +00:00
|
|
|
imagePullPolicy: IfNotPresent
|
2022-02-24 10:04:19 +00:00
|
|
|
volumeMounts:
|
2022-02-27 01:57:08 +00:00
|
|
|
- name : nginx-cache
|
|
|
|
mountPath: /var/cache/nginx/
|
|
|
|
- name : nginx-config
|
|
|
|
mountPath: /var/config/nginx/
|
|
|
|
- name: var-run
|
|
|
|
mountPath: /var/run/
|
2019-05-08 17:21:58 +00:00
|
|
|
ports:
|
|
|
|
- containerPort: 8000
|
|
|
|
name: http
|
|
|
|
env:
|
|
|
|
- name: LONGHORN_MANAGER_IP
|
|
|
|
value: "http://longhorn-backend:9500"
|
2022-02-24 10:04:19 +00:00
|
|
|
volumes:
|
|
|
|
- emptyDir: {}
|
2022-02-27 01:57:08 +00:00
|
|
|
name: nginx-cache
|
|
|
|
- emptyDir: {}
|
|
|
|
name: nginx-config
|
|
|
|
- emptyDir: {}
|
|
|
|
name: var-run
|
2020-11-21 06:38:04 +00:00
|
|
|
{{- if .Values.privateRegistry.registrySecret }}
|
2020-03-19 22:20:09 +00:00
|
|
|
imagePullSecrets:
|
2020-11-21 06:38:04 +00:00
|
|
|
- name: {{ .Values.privateRegistry.registrySecret }}
|
2020-03-19 22:20:09 +00:00
|
|
|
{{- end }}
|
2021-03-15 19:12:28 +00:00
|
|
|
{{- if .Values.longhornUI.priorityClass }}
|
|
|
|
priorityClassName: {{ .Values.longhornUI.priorityClass | quote}}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.longhornUI.tolerations }}
|
|
|
|
tolerations:
|
2021-08-06 15:42:48 +00:00
|
|
|
{{ toYaml .Values.longhornUI.tolerations | indent 6 }}
|
2021-03-15 19:12:28 +00:00
|
|
|
{{- end }}
|
2021-04-13 22:50:25 +00:00
|
|
|
{{- if .Values.longhornUI.nodeSelector }}
|
|
|
|
nodeSelector:
|
2021-08-06 15:42:48 +00:00
|
|
|
{{ toYaml .Values.longhornUI.nodeSelector | indent 8 }}
|
2021-04-13 22:50:25 +00:00
|
|
|
{{- end }}
|
2019-05-08 17:21:58 +00:00
|
|
|
---
|
|
|
|
kind: Service
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
2020-07-08 23:56:34 +00:00
|
|
|
labels: {{- include "longhorn.labels" . | nindent 4 }}
|
2019-05-08 17:21:58 +00:00
|
|
|
app: longhorn-ui
|
|
|
|
{{- if eq .Values.service.ui.type "Rancher-Proxy" }}
|
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
{{- end }}
|
|
|
|
name: longhorn-frontend
|
2020-12-03 15:02:28 +00:00
|
|
|
namespace: {{ include "release_namespace" . }}
|
2019-05-08 17:21:58 +00:00
|
|
|
spec:
|
|
|
|
{{- if eq .Values.service.ui.type "Rancher-Proxy" }}
|
|
|
|
type: ClusterIP
|
|
|
|
{{- else }}
|
|
|
|
type: {{ .Values.service.ui.type }}
|
|
|
|
{{- end }}
|
|
|
|
selector:
|
|
|
|
app: longhorn-ui
|
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
port: 80
|
|
|
|
targetPort: http
|
|
|
|
{{- if .Values.service.ui.nodePort }}
|
|
|
|
nodePort: {{ .Values.service.ui.nodePort }}
|
2020-02-26 23:16:36 +00:00
|
|
|
{{- else }}
|
|
|
|
nodePort: null
|
2019-05-08 17:21:58 +00:00
|
|
|
{{- end }}
|