This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountHelm/templates/gui.yml

85 lines
1.8 KiB
YAML
Raw Normal View History

2019-11-26 18:17:21 +00:00
apiVersion: v1
kind: ConfigMap
metadata:
name: env-gui
namespace: {{ .Release.Namespace }}
data:
VUE_APP_API_URL: "{{.Values.apiUrl}}"
---
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: docker.keks.cloud/keksaccount/gui:{{.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.guiURL }}'
dnsNames:
- {{ .Values.guiURL }}
{{ end }}
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: gui
namespace: {{ .Release.Namespace }}
spec:
rules:
- host: {{ .Values.guiURL }}
http:
paths:
- backend:
serviceName: ingress-gui
servicePort: 80
path: /
{{ if .Values.gui.ssl }}
tls:
- secretName: account-keks-cloud-tls
{{ end }}