Initial commit
This commit is contained in:
58
templates/postgresql_deployment.yaml
Normal file
58
templates/postgresql_deployment.yaml
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: job-orchestrator-postgres-pvc
|
||||
spec:
|
||||
storageClassName: longhorn
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: job-orchestrator-postgres
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: job-orchestrator-postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: job-orchestrator-postgres
|
||||
spec:
|
||||
containers:
|
||||
- name: job-orchestrator-postgres
|
||||
image: postgresql:13
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: job-orchestrator-postgres-config
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/postgresql/data
|
||||
name: job-orchestrator-postgres-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: job-orchestrator-postgres-service
|
||||
spec:
|
||||
selector:
|
||||
app: job-orchestrator-postgres
|
||||
ports:
|
||||
- name: job-orchestrator-postgres
|
||||
protocol: TCP
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: job-orchestrator-postgres-config
|
||||
data:
|
||||
POSTGRES_PASSWORD: "joborchestratorpostgressupersecret"
|
||||
POSTGRES_USER: "joborchestrator"
|
||||
POSTGRES_DB: "joborchestrator"
|
||||
Reference in New Issue
Block a user