forked from GoogleCloudPlatform/bank-of-anthos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
accounts-db.yaml
95 lines (95 loc) · 2.19 KB
/
accounts-db.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
95
apiVersion: v1
data:
ACCOUNTS_DB_URI: postgresql://accounts-admin:accounts-pwd@accounts-db:5432/accounts-db
POSTGRES_DB: accounts-db
POSTGRES_PASSWORD: accounts-pwd
POSTGRES_USER: accounts-admin
kind: ConfigMap
metadata:
labels:
app: accounts-db
application: bank-of-splunk
environment: development
team: accounts
tier: db
name: accounts-db-config
---
apiVersion: v1
kind: Service
metadata:
labels:
application: bank-of-splunk
environment: development
team: accounts
tier: db
name: accounts-db
spec:
ports:
- name: tcp
port: 5432
protocol: TCP
targetPort: 5432
selector:
app: accounts-db
application: bank-of-splunk
environment: development
team: accounts
tier: db
type: ClusterIP
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
application: bank-of-splunk
environment: development
team: accounts
tier: db
name: accounts-db
spec:
replicas: 1
selector:
matchLabels:
app: accounts-db
application: bank-of-splunk
environment: development
team: accounts
tier: db
serviceName: accounts-db
template:
metadata:
labels:
app: accounts-db
application: bank-of-splunk
environment: development
team: accounts
tier: db
spec:
containers:
- envFrom:
- configMapRef:
name: environment-config
- configMapRef:
name: accounts-db-config
- configMapRef:
name: demo-data-config
image: ghcr.io/splunk/bank-of-splunk/accounts-db:v1.5.3@sha256:60acf1383d6fd8d5ba3a689268a258171c8d2d240c59cee1ae636aef3f1e8d72
name: accounts-db
ports:
- containerPort: 5432
resources:
limits:
cpu: 250m
memory: 512Mi
requests:
cpu: 100m
memory: 128Mi
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgresdb
subPath: postgres
serviceAccount: bank-of-anthos
serviceAccountName: default
volumes:
- emptyDir: {}
name: postgresdb