forked from LinkToResearch/teable-fork
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-teabia.yaml
More file actions
96 lines (96 loc) · 2.05 KB
/
Copy pathtest-teabia.yaml
File metadata and controls
96 lines (96 loc) · 2.05 KB
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
apiVersion: v1
kind: Namespace
metadata:
name: teabia-dev
---
apiVersion: v1
kind: Secret
metadata:
name: teable-postgres-secret
namespace: teabia-dev
type: Opaque
stringData:
POSTGRES_DB: teable
POSTGRES_USER: teable
POSTGRES_PASSWORD: teable
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: teable-postgres-data
namespace: teabia-dev
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: 20Gi
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: teable-postgres
namespace: teabia-dev
spec:
serviceName: teable-postgres
replicas: 1
selector:
matchLabels:
app: teable-postgres
template:
metadata:
labels:
app: teable-postgres
spec:
containers:
- name: postgres
image: postgres:15.4
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5432
name: postgres
envFrom:
- secretRef:
name: teable-postgres-secret
volumeMounts:
- name: pgdata
mountPath: /var/lib/postgresql/data
readinessProbe:
exec:
command:
- sh
- -c
- pg_isready -U "$POSTGRES_USER" -d "$POSTGRES_DB"
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 6
livenessProbe:
exec:
command:
- sh
- -c
- pg_isready -U "$POSTGRES_USER" -d "$POSTGRES_DB"
initialDelaySeconds: 30
periodSeconds: 20
timeoutSeconds: 3
failureThreshold: 6
volumes:
- name: pgdata
persistentVolumeClaim:
claimName: teable-postgres-data
---
apiVersion: v1
kind: Service
metadata:
name: teable-postgres
namespace: teabia-dev
spec:
type: ClusterIP
selector:
app: teable-postgres
ports:
- name: postgres
port: 5432
targetPort: postgres