-
Notifications
You must be signed in to change notification settings - Fork 0
/
01_glvd-deployment.yaml
95 lines (94 loc) · 2.49 KB
/
01_glvd-deployment.yaml
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
apiVersion: v1
kind: ConfigMap
metadata:
name: glvd-config
labels:
app.kubernetes.io/name: glvd
gardenlinux.io/glvd-component: glvd-tracker
data:
connectionString: jdbc:postgresql://glvd-database-0.glvd-database:5432/glvd
databaseName: glvd
---
apiVersion: v1
kind: Service
metadata:
name: glvd
labels:
app.kubernetes.io/name: glvd
gardenlinux.io/glvd-component: glvd-tracker
spec:
ports:
- port: 8080
protocol: TCP
targetPort: glvd
selector:
app.kubernetes.io/name: glvd
gardenlinux.io/glvd-component: glvd-tracker
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: glvd
labels:
app.kubernetes.io/name: glvd
gardenlinux.io/glvd-component: glvd-tracker
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: glvd
gardenlinux.io/glvd-component: glvd-tracker
template:
metadata:
labels:
app.kubernetes.io/name: glvd
gardenlinux.io/glvd-component: glvd-tracker
spec:
containers:
- image: ghcr.io/gardenlinux/glvd-api:latest
name: glvd-api
# resources:
# requests:
# cpu: "1"
# memory: "2Gi"
# limits:
# cpu: "2"
# memory: "4Gi"
ports:
- containerPort: 8080
protocol: TCP
name: glvd
env:
# cf https://github.com/spring-projects/spring-lifecycle-smoke-tests/tree/main/data/data-jpa#prevent-early-database-interaction
- name: SPRING_DATASOURCE_URL
valueFrom:
configMapKeyRef:
name: glvd-config
key: connectionString
- name: SPRING_DATASOURCE_USERNAME
valueFrom:
secretKeyRef:
name: postgres-credentials
key: username
- name: SPRING_DATASOURCE_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-credentials
key: password
- name: SPRING_JPA_DATABASEPLATFORM
value: "org.hibernate.dialect.PostgreSQLDialect"
- name: SPRING_JPA_PROPERTIES_HIBERNATE_BOOT_ALLOW_JDBC_METADATA_ACCESS
value: "false"
- name: SPRING_JPA_HIBERNATE_DDLAUTO
value: "none"
- name: SPRING_SQL_INIT_MODE
value: "never"
livenessProbe:
httpGet:
path: "/actuator/health/liveness"
port: 8080
readinessProbe:
httpGet:
path: "/actuator/health/readiness"
port: 8080