Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

NO-ISSUE: Fixing deployement on ocp #393

Merged
merged 1 commit into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hack/manifests/openshift/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
bases:
- ../base
resources:
- postgres.yaml
- ingress.yaml
- oauth.yaml
# - postgres.yaml

patchesStrategicMerge:
- parodos-patch.yaml
75 changes: 75 additions & 0 deletions hack/manifests/openshift/postgres.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
---
apiVersion: v1
kind: ConfigMap
metadata:
name: postgres-service-config
data:
POSTGRES_PASSWORD: parodos
POSTGRES_DB: parodos
POSTGRES_USER: parodos
PGDATA: /var/lib/postgresql/data/mydata
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres-deployment
spec:
selector:
matchLabels:
app: postgres-service
template:
metadata:
labels:
app: postgres-service
spec:
containers:
- name: postgres-service
image: docker.io/postgres:15.2
ports:
- containerPort: 5432
name: insecure
volumeMounts:
- name: storage
mountPath: /var/lib/postgresql/data
envFrom:
- configMapRef:
name: postgres-service-config
readinessProbe:
exec:
command: ["pg_isready"]
initialDelaySeconds: 15
timeoutSeconds: 2
livenessProbe:
exec:
command: ["pg_isready"]
initialDelaySeconds: 15
timeoutSeconds: 2
volumes:
- name: storage
persistentVolumeClaim:
claimName: postgres-pvc
---
apiVersion: v1
kind: Service
metadata:
labels:
app: postgres-service
name: postgres
spec:
selector:
app: postgres-service
ports:
- protocol: TCP
name: insecure
port: 5432
targetPort: 5432