86 lines
1.8 KiB
YAML
86 lines
1.8 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: env-gui
|
|
namespace: {{ .Release.Namespace }}
|
|
data:
|
|
VUE_APP_API_URL: "{{.Values.gui.backendURL}}"
|
|
---
|
|
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}}
|
|
image: {{.Values.gui.container}}:{{.Values.gui.version}}
|
|
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
|
|
commonName: '{{ .Values.gui.url }}'
|
|
dnsNames:
|
|
- {{ .Values.gui.url }}
|
|
{{ end }}
|
|
{{ if .Values.api.ingress }}
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Ingress
|
|
metadata:
|
|
name: gui
|
|
namespace: {{ .Release.Namespace }}
|
|
spec:
|
|
rules:
|
|
- host: {{ .Values.gui.url }}
|
|
http:
|
|
paths:
|
|
- backend:
|
|
serviceName: ingress-gui
|
|
servicePort: 80
|
|
path: /
|
|
{{ if .Values.gui.ssl }}
|
|
tls:
|
|
- secretName: gui-tls
|
|
{{ end }}
|
|
{{ end }}
|