Skip to content

Commit

Permalink
More openshift.deploy edits
Browse files Browse the repository at this point in the history
  • Loading branch information
raarielgrace committed Dec 5, 2024
1 parent 9cff51f commit ddd4d8b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 17 deletions.
47 changes: 31 additions & 16 deletions backend/openshift.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ objects:
apiVersion: v1
metadata:
labels:
app: nr-nmp${NAME_SUFFIX}
name: nr-nmp-backend${NAME_SUFFIX}
app: ${APP}${NAME_SUFFIX}
name: ${APP}-${COMPONENT}${NAME_SUFFIX}
spec:
type: ClusterIP
ports:
Expand All @@ -38,30 +38,30 @@ objects:
protocol: TCP
name: http-3000
selector:
service: nr-nmp-backend${NAME_SUFFIX}
service: ${APP}-${COMPONENT}${NAME_SUFFIX}
- kind: Deployment
apiVersion: apps/v1
metadata:
labels:
app: nr-nmp${NAME_SUFFIX}
deployment: nr-nmp-backend${NAME_SUFFIX}
name: nr-nmp-backend${NAME_SUFFIX}
app: ${APP}${NAME_SUFFIX}
deployment: ${APP}-${COMPONENT}${NAME_SUFFIX}
name: ${APP}-${COMPONENT}${NAME_SUFFIX}
spec:
strategy:
type: Recreate
selector:
matchLabels:
deployment: nr-nmp-backend${NAME_SUFFIX}
deployment: ${APP}-${COMPONENT}${NAME_SUFFIX}
template:
metadata:
labels:
app: nr-nmp${NAME_SUFFIX}
deployment: nr-nmp-backend${NAME_SUFFIX}
service: nr-nmp-backend${NAME_SUFFIX}
app: ${APP}${NAME_SUFFIX}
deployment: ${APP}-${COMPONENT}${NAME_SUFFIX}
service: ${APP}-${COMPONENT}${NAME_SUFFIX}
spec:
containers:
- name: nr-nmp-backend${NAME_SUFFIX}
image: ghcr.io/bcgov/nr-nmp/backend:${IMAGE_TAG}
- name: ${APP}-${COMPONENT}${NAME_SUFFIX}
image: ghcr.io/${ORG}/${APP}/${COMPONENT}:${IMAGE_TAG}
imagePullPolicy: Always
env:
- name: LOG_LEVEL
Expand All @@ -83,6 +83,21 @@ objects:
secretKeyRef:
name: nr-nmp-database${NAME_SUFFIX}
key: database-user
- name: SSO_CLIENT_ID
valueFrom:
secretKeyRef:
name: nr-nmp-keycloak
key: SSO_CLIENT_ID
- name: SSO_CLIENT_SECRET
valueFrom:
secretKeyRef: nr-nmp-keycloak
key: SSO_CLIENT_SECRET
- name: SSO_REDIRECT_URL
value: http://${APP}-${TARGET}-${COMPONENT}/auth/callback
- name: FRONTEND_URL
value: http://${APP}-${TARGET}
- name: BACKEND_URL
value: http://${APP}-${TARGET}-${COMPONENT}
ports:
- containerPort: 3000
protocol: TCP
Expand Down Expand Up @@ -117,15 +132,15 @@ objects:
apiVersion: route.openshift.io/v1
metadata:
labels:
app: nr-nmp${NAME_SUFFIX}
name: nr-nmp-backend${NAME_SUFFIX}
app: ${APP}${NAME_SUFFIX}
name: ${APP}-${COMPONENT}${NAME_SUFFIX}
spec:
host: nr-nmp-backend${NAME_SUFFIX}.apps.silver.devops.gov.bc.ca
host: ${APP}-${COMPONENT}${NAME_SUFFIX}.apps.silver.devops.gov.bc.ca
port:
targetPort: http-3000
to:
kind: Service
name: nr-nmp-backend${NAME_SUFFIX}
name: ${APP}-${COMPONENT}${NAME_SUFFIX}
weight: 100
tls:
termination: edge
Expand Down
13 changes: 12 additions & 1 deletion frontend/openshift.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ objects:
value: info
- name: VITE_BACKEND_URL
value: http://${APP}-${TARGET}-backend
- name: VITE_PORT
value: 5173
- name: SSO_CLIENT_ID
valueFrom:
secretKeyRef:
name: nr-nmp-keycloak
key: SSO_CLIENT_ID
- name: SSO_CLIENT_SECRET
valueFrom:
secretKeyRef: nr-nmp-keycloak
key: SSO_CLIENT_SECRET
ports:
- name: http
containerPort: 5173
Expand Down Expand Up @@ -103,7 +114,7 @@ objects:
app: ${APP}-${TARGET}
name: ${APP}-${TARGET}-${COMPONENT}
spec:
host: nr-nmp-${TARGET}.apps.silver.devops.gov.bc.ca
host: ${APP}-${TARGET}.apps.silver.devops.gov.bc.ca
port:
targetPort: http-3000
to:
Expand Down

0 comments on commit ddd4d8b

Please sign in to comment.