tp2
This commit is contained in:
commit
cbfc0a53b3
15 changed files with 214 additions and 0 deletions
35
tp2/db-statefulset.yaml
Normal file
35
tp2/db-statefulset.yaml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: db
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: db
|
||||
serviceName: db
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: db
|
||||
spec:
|
||||
volumes:
|
||||
- name: db-users-sql-vol
|
||||
configMap:
|
||||
name: db-users-sql
|
||||
containers:
|
||||
- name: postgresql
|
||||
image: postgres:alpine
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: postgres
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: r209
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: r209
|
||||
- name: POSTGRES_DB
|
||||
value: r209
|
||||
volumeMounts:
|
||||
- mountPath: /docker-entrypoint-initdb.d
|
||||
name: db-users-sql-vol
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue