bullish/k8s/app/postgres.yaml
Ameya Shenoy d1e5d96fcf
fix: move secrets to a k8s secret
Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
2021-02-13 09:37:06 +05:30

55 lines
995 B
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: bullish-database
spec:
selector:
matchLabels:
app: bullish-database
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
template:
metadata:
labels:
app: bullish-database
spec:
volumes:
- name: postgres-data
hostPath:
path: "/var/k8s-pv/bullish/postgres"
type: DirectoryOrCreate
containers:
- name: postgres
image: postgres:13.1-alpine
envFrom:
- secretRef:
name: bullish-secret
volumeMounts:
- name: postgres-data
mountPath: /var/lib/postgresql/data/pgdata
---
apiVersion: v1
kind: Service
metadata:
name: bullish-database
labels:
app: bullish-database
spec:
type: ClusterIP
selector:
app: bullish-database
ports:
- port: 5432
targetPort: 5432
protocol: TCP
...