forked from coreos/torus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostgres-oneshot.yaml
More file actions
54 lines (54 loc) · 1.12 KB
/
Copy pathpostgres-oneshot.yaml
File metadata and controls
54 lines (54 loc) · 1.12 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
apiVersion: v1
kind: Service
metadata:
labels:
name: postgres-torus
name: postgres-torus
spec:
type: NodePort
ports:
- port: 5432
targetPort: postgres-client
nodePort: 30432
selector:
app: postgres-torus
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: postgres-torus
labels:
app: postgres-torus
spec:
replicas: 1
template:
metadata:
labels:
app: postgres-torus
spec:
containers:
- image: postgres
name: postgres
ports:
- name: postgres-client
containerPort: 5432
volumeMounts:
- name: data
mountPath: /var/lib/postgresql/data
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: POSTGRES_PASSWORD
value: testtorus
- name: PGDATA
value: "/var/lib/postgresql/data/pgdata"
volumes:
- name: data
flexVolume:
driver: "coreos.com/torus"
fsType: "ext4"
options:
volume: "pg1"
etcd: "10.3.0.100:2379"