-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathtest.yaml
77 lines (77 loc) · 1.9 KB
/
test.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
## This is test deployment for Kubernetes platforms.
## This is _not_ intended to be used in producction.
##
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test-postgresql-repmgr
labels:
app.kubernetes.io/name: test-postgresql-repmgr
spec:
serviceName: test-postgresql-repmgr-headless
replicas: 1
selector:
matchLabels:
app: test-postgresql-repmgr
template:
metadata:
labels:
app: test-postgresql-repmgr
spec:
containers:
- image: bitnami/postgresql-repmgr
name: postgresql-repmgr
env:
- name: POSTGRESQL_POSTGRES_PASSWORD
value: "adminpassword"
- name: POSTGRESQL_USERNAME
value: "customuser"
- name: POSTGRESQL_PASSWORD
value: "custompassword"
- name: POSTGRESQL_DATABASE
value: "customdatabase"
- name: REPMGR_PASSWORD
value: "repmgrpassword"
- name: REPMGR_PRIMARY_HOST
value: "test-postgresql-repmgr-0"
- name: REPMGR_NODE_NAME
value: "test-postgresql-repmgr-0"
- name: REPMGR_NODE_NETWORK_NAME
value: "test-postgresql-repmgr-0"
- name: REPMGR_PARTNER_NODES
value: "test-postgresql-repmgr-0"
ports:
- name: postgresql
containerPort: 5432
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: test-postgresql-repmgr
labels:
app.kubernetes.io/name: test-postgresql-repmgr
spec:
type: ClusterIP
ports:
- port: 5432
protocol: TCP
targetPort: postgresql
selector:
app.kubernetes.io/name: test-postgresql-repmgr
---
apiVersion: v1
kind: Service
metadata:
name: test-postgresql-repmgr-headless
labels:
app.kubernetes.io/name: test-postgresql-repmgr
spec:
ClusterIP: None
type: ClusterIP
ports:
- port: 5432
protocol: TCP
targetPort: postgresql
selector:
app.kubernetes.io/name: test-postgresql-repmgr