mirror of
https://github.com/clearlinux/dockerfiles.git
synced 2026-04-28 19:13:48 +00:00
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: postgres
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: postgres
|
|
spec:
|
|
containers:
|
|
- name: postgres
|
|
image: docker.io/clearlinux/postgres
|
|
imagePullPolicy: "IfNotPresent"
|
|
ports:
|
|
- containerPort: 5432
|
|
env:
|
|
- name: POSTGRES_DB
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgres-config
|
|
key: POSTGRES_DB
|
|
- name: POSTGRES_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgres-config
|
|
key: POSTGRES_PASSWORD
|
|
- name: POSTGRES_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgres-config
|
|
key: POSTGRES_USER
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: postgres
|
|
labels:
|
|
app: postgres
|
|
spec:
|
|
type: NodePort
|
|
ports:
|
|
- port: 5432
|
|
targetPort: 5432
|
|
nodePort: 30001
|
|
selector:
|
|
app: postgres
|
|
|