rancher-charts/charts/longhorn/1.0.201/templates/deployment-ui.yaml

62 lines
1.6 KiB
YAML
Raw Normal View History

2020-09-30 23:34:22 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
labels: {{- include "longhorn.labels" . | nindent 4 }}
app: longhorn-ui
name: longhorn-ui
namespace: {{ .Release.Namespace }}
2020-09-30 23:34:22 +00:00
spec:
replicas: 1
selector:
matchLabels:
app: longhorn-ui
template:
metadata:
labels: {{- include "longhorn.labels" . | nindent 8 }}
app: longhorn-ui
spec:
containers:
- name: longhorn-ui
image: {{ template "system_default_registry" . }}{{ .Values.image.longhorn.ui.repository }}:{{ .Values.image.longhorn.ui.tag }}
2020-09-30 23:34:22 +00:00
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0
ports:
- containerPort: 8000
name: http
env:
- name: LONGHORN_MANAGER_IP
value: "http://longhorn-backend:9500"
{{- if .Values.defaultSettings.registrySecret }}
2020-09-30 23:34:22 +00:00
imagePullSecrets:
- name: {{ .Values.defaultSettings.registrySecret }}
2020-09-30 23:34:22 +00:00
{{- end }}
---
kind: Service
apiVersion: v1
metadata:
labels: {{- include "longhorn.labels" . | nindent 4 }}
app: longhorn-ui
{{- if eq .Values.service.ui.type "Rancher-Proxy" }}
kubernetes.io/cluster-service: "true"
{{- end }}
name: longhorn-frontend
namespace: {{ .Release.Namespace }}
2020-09-30 23:34:22 +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 }}
{{- else }}
nodePort: null
{{- end }}