This commit is contained in:
Kekskurse 2019-11-27 17:13:24 +01:00
parent 1432bab3c0
commit dbff63ef0e
6 changed files with 98 additions and 27 deletions

View File

@ -18,4 +18,4 @@ version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 1.16.0
appVersion: 0.1.0

View File

@ -13,7 +13,7 @@ data:
DB_PASSWORD: "{{.Values.mysql.password}}"
SAVE_TOKEN_TO_SESSION: "false"
NEW_GUI: "1"
GUI_URL: "{{.Values.guiURL}}"
GUI_URL: "{{.Values.api.frontendURL}}"
S3_ACCESS_KEY: "{{.Values.s3.accessKey}}"
S3_SECRET: "{{.Values.s3.secret}}"
S3_Bucket: "{{.Values.s3.bucket}}"
@ -33,7 +33,7 @@ spec:
initContainers:
- name: init-migration
imagePullPolicy: {{.Values.api.imagePullPolicy}}
image: docker.keks.cloud/keksaccount/web:{{.Values.api.version}}
image: {{.Values.api.container}}:{{.Values.api.version}}
command: ['php', 'artisan', 'migrate', '--force']
envFrom:
- configMapRef:
@ -41,7 +41,7 @@ spec:
containers:
- name: api
imagePullPolicy: {{.Values.api.imagePullPolicy}}
image: docker.keks.cloud/keksaccount/web:{{.Values.api.version}}
image: {{.Values.api.container}}:{{.Values.api.version}}
ports:
- containerPort: 80
envFrom:
@ -79,10 +79,11 @@ spec:
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer
commonName: '{{ .Values.apiUrl }}'
commonName: '{{ .Values.api.url }}'
dnsNames:
- {{ .Values.apiUrl }}
- {{ .Values.api.url }}
{{ end }}
{{ if .Values.api.ingress }}
---
apiVersion: extensions/v1beta1
kind: Ingress
@ -91,7 +92,7 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
rules:
- host: {{ .Values.apiUrl }}
- host: {{ .Values.api.url }}
http:
paths:
- backend:
@ -100,5 +101,6 @@ spec:
path: /
{{ if .Values.api.ssl }}
tls:
- secretName: account-keks-cloud-tls
- secretName: api-tls
{{ end }}
{{ end }}

View File

@ -4,7 +4,7 @@ metadata:
name: env-gui
namespace: {{ .Release.Namespace }}
data:
VUE_APP_API_URL: "{{.Values.apiUrl}}"
VUE_APP_API_URL: "{{.Values.gui.backendURL}}"
---
apiVersion: extensions/v1beta1
kind: Deployment
@ -21,7 +21,7 @@ spec:
containers:
- name: gui
imagePullPolicy: {{.Values.gui.imagePullPolicy}}
image: docker.keks.cloud/keksaccount/gui:{{.Values.gui.version}}
image: {{.Values.gui.container}}:{{.Values.gui.version}}
ports:
- containerPort: 8080
envFrom:
@ -59,10 +59,11 @@ spec:
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer
commonName: '{{ .Values.guiURL }}'
commonName: '{{ .Values.gui.url }}'
dnsNames:
- {{ .Values.guiURL }}
- {{ .Values.gui.url }}
{{ end }}
{{ if .Values.api.ingress }}
---
apiVersion: extensions/v1beta1
kind: Ingress
@ -71,7 +72,7 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
rules:
- host: {{ .Values.guiURL }}
- host: {{ .Values.gui.url }}
http:
paths:
- backend:
@ -80,5 +81,6 @@ spec:
path: /
{{ if .Values.gui.ssl }}
tls:
- secretName: account-keks-cloud-tls
- secretName: gui-tls
{{ end }}
{{ end }}

56
templates/ingress.yml Normal file
View File

@ -0,0 +1,56 @@
{{ if .Values.ingress.enabled }}
{{ if .Values.ingress.ssl }}
---
apiVersion: cert-manager.io/v1alpha2
kind: Certificate
metadata:
name: ingress-tls
namespace: {{ .Release.Namespace }}
spec:
secretName: ingress-tls
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer
commonName: '{{ .Values.ingress.url }}'
dnsNames:
- {{ .Values.ingress.url }}
{{ end }}
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
namespace: {{ .Release.Namespace }}
spec:
rules:
- host: {{ .Values.ingress.url }}
http:
paths:
- path: /gitlab/
backend:
serviceName: ingress-api
servicePort: 80
- path: /oauth/
backend:
serviceName: ingress-api
servicePort: 80
- path: /api/
backend:
serviceName: ingress-api
servicePort: 80
{{ if .Values.ingress.oldGui }}
- path: /gui/
backend:
serviceName: ingress-api
servicePort: 80
{{ end }}
- path: /
backend:
serviceName: ingress-gui
servicePort: 80
{{ if .Values.ingress.ssl }}
tls:
- secretName: ingress-tls
{{ end }}
{{ end }}

View File

@ -13,7 +13,7 @@ spec:
containers:
- name: app
imagePullPolicy: {{.Values.queueworker.imagePullPolicy}}
image: docker.keks.cloud/keksaccount/app:{{.Values.queueworker.version}}
image: {{.Values.queueworker.container}}:{{.Values.queueworker.version}}
envFrom:
- configMapRef:
name: env-api

View File

@ -1,9 +1,5 @@
apiUrl: api.account.helm.keks.cloud
guiURL: account.helm.keks.cloud
mysql:
ownServer: true # Just used for development stuff
ownServer: false # Just used for development stuff
host: mysql
port: 3306
username: account
@ -17,24 +13,39 @@ s3:
bucket: ""
api:
ingress: false
url: api.account.helm.keks.cloud
frontendURL: https://account-stg.keks.cloud
replicas: 3
newGui: "1"
tls: true
version: latest
imagePullPolicy: Always
version: 0.2.0-pre1
container: kekscloud/keksaccount-api
imagePullPolicy: IfNotPresent
ssl: false
queueworker:
replicas: 2
version: latest
imagePullPolicy: Always
container: kekscloud/keksaccount-api
version: 0.2.0-pre1
imagePullPolicy: IfNotPresent
gui:
ingress: false
url: gui.account.helm.keks.cloud
backendURL: https://account-stg.keks.cloud/
replicas: 2
version: latest
imagePullPolicy: Always
version: 0.2.0-pre1.1
container: kekscloud/keksaccount-gui
imagePullPolicy: IfNotPresent
ssl: false
dockerHub:
enabled: true
enabled: false
secret: docker-keks-cloud
ingress:
enabled: true
ssl: false
url: account-stg.keks.cloud
oldGui: true #Used until all features are migrated to v0.2.0