++postgres tests
This commit is contained in:
parent
2c27e7f0a2
commit
163317f086
2 changed files with 66 additions and 1 deletions
65
generic/postgres-rbd.yaml
Normal file
65
generic/postgres-rbd.yaml
Normal file
|
@ -0,0 +1,65 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: postgres-config
|
||||
labels:
|
||||
app: postgres
|
||||
data:
|
||||
POSTGRES_PASSWORD: cae8xohrai5I
|
||||
---
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: postgres-pv-claim-rbd
|
||||
labels:
|
||||
app: postgres
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: rook-ceph-block
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: postgres
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: postgres
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: postgres
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:13-alpine
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: postgres-config
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/postgresql
|
||||
name: postgresdb
|
||||
volumes:
|
||||
- name: postgresdb
|
||||
persistentVolumeClaim:
|
||||
claimName: postgres-pv-claim-rbd
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: postgres
|
||||
labels:
|
||||
app: postgres
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 5432
|
||||
selector:
|
||||
app: postgres
|
|
@ -44,7 +44,7 @@ spec:
|
|||
- configMapRef:
|
||||
name: postgres-config
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/postgresql/data
|
||||
- mountPath: /var/lib/postgresql
|
||||
name: postgresdb
|
||||
volumes:
|
||||
- name: postgresdb
|
||||
|
|
Loading…
Reference in a new issue