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
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
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-07-31 02:31:47 +00:00
|
|
|
{{- if .Values.privateRegistry.registryUrl }}
|
|
|
|
image: "{{ .Values.privateRegistry.registryUrl }}/{{ .Values.image.longhorn.ui }}:{{ .Values.image.longhorn.uiTag }}"
|
|
|
|
{{- else }}
|
2019-05-08 17:21:58 +00:00
|
|
|
image: "{{ .Values.image.longhorn.ui }}:{{ .Values.image.longhorn.uiTag }}"
|
2020-07-31 02:31:47 +00:00
|
|
|
{{- end }}
|
2020-06-26 20:24:30 +00:00
|
|
|
imagePullPolicy: IfNotPresent
|
2020-05-01 10:03:54 +00:00
|
|
|
securityContext:
|
|
|
|
runAsUser: 0
|
2019-05-08 17:21:58 +00:00
|
|
|
ports:
|
|
|
|
- containerPort: 8000
|
|
|
|
name: http
|
|
|
|
env:
|
|
|
|
- name: LONGHORN_MANAGER_IP
|
|
|
|
value: "http://longhorn-backend:9500"
|
2020-03-19 22:20:09 +00:00
|
|
|
{{- if .Values.defaultSettings.registrySecret }}
|
|
|
|
imagePullSecrets:
|
|
|
|
- name: {{ .Values.defaultSettings.registrySecret }}
|
|
|
|
{{- 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
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
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 }}
|