This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.template.yml
101 lines (101 loc) · 2.6 KB
/
deployment.template.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
apiVersion: apps/v1
kind: Deployment
metadata:
name: truffle-ai-deployment
annotations:
kubernetes.io/change-cause: <CHANGE-CAUSE>
labels:
app: truffle-ai-deployment
spec:
replicas: 1
selector:
matchLabels:
app: truffle-ai-deployment
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
minReadySeconds: 10
template:
metadata:
labels:
app: truffle-ai-deployment
spec:
containers:
- name: truffle-ai-graphql-gateway
image: <GRAPHQL-GATEWAY-IMAGE>
ports:
- containerPort: <GRAPHQL-GATEWAY-PORT>
envFrom:
- configMapRef:
name: graphql-gateway-config
- secretRef:
name: graphql-gateway-secret
- name: truffle-ai-graphql-server
image: <GRAPHQL-SERVER-IMAGE>
ports:
- containerPort: <GRAPHQL-SERVER-PORT>
envFrom:
- configMapRef:
name: graphql-server-config
- secretRef:
name: graphql-server-secret
---
apiVersion: v1
kind: Service
metadata:
name: truffle-ai-load-balancer
annotations:
service.beta.kubernetes.io/do-loadbalancer-name: 'truffle-ai-load-balancer'
service.beta.kubernetes.io/do-loadbalancer-certificate-id: '<CERTIFICATE-ID>'
service.beta.kubernetes.io/do-loadbalancer-protocol: 'https'
service.beta.kubernetes.io/do-loadbalancer-size-unit: '1'
service.beta.kubernetes.io/do-loadbalancer-disable-lets-encrypt-dns-records: 'true'
service.beta.kubernetes.io/do-loadbalancer-redirect-http-to-https: 'true'
spec:
type: LoadBalancer
ports:
- name: http
protocol: TCP
port: 80
targetPort: <GRAPHQL-GATEWAY-PORT>
- name: https
protocol: TCP
port: 443
targetPort: <GRAPHQL-GATEWAY-PORT>
selector:
app: truffle-ai-deployment
---
apiVersion: v1
kind: Service
metadata:
name: truffle-ai-graphql-server-service
spec:
selector:
app: truffle-ai-deployment
ports:
- name: graphql-server
protocol: TCP
port: <GRAPHQL-SERVER-PORT>
targetPort: <GRAPHQL-SERVER-PORT>
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: truffle-ai-repo-cronjob
spec:
timeZone: 'Europe/Berlin'
schedule: '10 * * * *'
jobTemplate:
spec:
template:
spec:
containers:
- name: truffle-ai-repo-cronjob
image: <REPO-JOB-IMAGE>
envFrom:
- configMapRef:
name: repo-job-config
- secretRef:
name: repo-job-secret
restartPolicy: OnFailure