2019-11-26 18:17:21 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: env-gui
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
data:
|
2019-11-27 16:13:24 +00:00
|
|
|
VUE_APP_API_URL: "{{.Values.gui.backendURL}}"
|
2019-11-26 18:17:21 +00:00
|
|
|
---
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: gui
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
spec:
|
|
|
|
replicas: {{.Values.gui.replicas}}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: gui
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: gui
|
|
|
|
imagePullPolicy: {{.Values.gui.imagePullPolicy}}
|
2019-11-27 16:13:24 +00:00
|
|
|
image: {{.Values.gui.container}}:{{.Values.gui.version}}
|
2019-11-26 18:17:21 +00:00
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
|
|
|
envFrom:
|
|
|
|
- configMapRef:
|
|
|
|
name: env-gui
|
|
|
|
{{ if .Values.dockerHub.enabled }}
|
|
|
|
imagePullSecrets:
|
|
|
|
- name: {{.Values.dockerHub.secret}}
|
|
|
|
{{ end }}
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
annotations:
|
|
|
|
field.cattle.io/targetWorkloadIds: '["deployment:{{ .Release.Namespace }}:gui"]'
|
|
|
|
name: ingress-gui
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
spec:
|
|
|
|
ports:
|
|
|
|
- port: 80
|
|
|
|
protocol: TCP
|
|
|
|
targetPort: 8080
|
|
|
|
type: ClusterIP
|
|
|
|
status:
|
|
|
|
loadBalancer: {}
|
|
|
|
{{ if .Values.gui.ssl }}
|
|
|
|
---
|
|
|
|
apiVersion: cert-manager.io/v1alpha2
|
|
|
|
kind: Certificate
|
|
|
|
metadata:
|
|
|
|
name: gui-tls
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
spec:
|
|
|
|
secretName: gui-tls
|
|
|
|
issuerRef:
|
|
|
|
name: letsencrypt-prod
|
|
|
|
kind: ClusterIssuer
|
2019-11-27 16:13:24 +00:00
|
|
|
commonName: '{{ .Values.gui.url }}'
|
2019-11-26 18:17:21 +00:00
|
|
|
dnsNames:
|
2019-11-27 16:13:24 +00:00
|
|
|
- {{ .Values.gui.url }}
|
2019-11-26 18:17:21 +00:00
|
|
|
{{ end }}
|
2019-11-27 16:13:24 +00:00
|
|
|
{{ if .Values.api.ingress }}
|
2019-11-26 18:17:21 +00:00
|
|
|
---
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: gui
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
spec:
|
|
|
|
rules:
|
2019-11-27 16:13:24 +00:00
|
|
|
- host: {{ .Values.gui.url }}
|
2019-11-26 18:17:21 +00:00
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- backend:
|
|
|
|
serviceName: ingress-gui
|
|
|
|
servicePort: 80
|
|
|
|
path: /
|
|
|
|
{{ if .Values.gui.ssl }}
|
|
|
|
tls:
|
2019-11-27 16:13:24 +00:00
|
|
|
- secretName: gui-tls
|
|
|
|
{{ end }}
|
2019-11-26 18:17:21 +00:00
|
|
|
{{ end }}
|