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

Commit

Permalink
Fixing deployement on ocp
Browse files Browse the repository at this point in the history
This pr fixes postgresql issue on ocp by adding postgres container,
map, service and pvc so notification and workflow service can use it.
  • Loading branch information
pkliczewski authored and openshift-merge-robot committed May 31, 2023
1 parent e7044b6 commit ae5ac64
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 1 deletion.
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

0 comments on commit ae5ac64

Please sign in to comment.