Skip to content

Commit

Permalink
Merge branch 'dev' into bcbox-comsapi
Browse files Browse the repository at this point in the history
  • Loading branch information
acoard-aot authored Apr 17, 2024
2 parents eeade16 + edf8128 commit 5135154
Show file tree
Hide file tree
Showing 168 changed files with 209,730 additions and 134,558 deletions.
608 changes: 304 additions & 304 deletions .github/openshift/deploy.backend-applications.yml

Large diffs are not rendered by default.

448 changes: 225 additions & 223 deletions .github/openshift/deploy.backend-gateway.yml

Large diffs are not rendered by default.

597 changes: 299 additions & 298 deletions .github/openshift/deploy.backend-users.yml

Large diffs are not rendered by default.

381 changes: 183 additions & 198 deletions .github/openshift/deploy.frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,204 +10,189 @@ labels:
app: ${NAME}-${COMPONENT}
app.kubernetes.io/part-of: ${NAME}-${COMPONENT}
parameters:
- name: NAME
description: Module name
value: epd
- name: COMPONENT
description: Component name
value: frontend
- name: IMAGE_TAG
description: Image tag to use
value: latest
- name: DOMAIN
value: apps.silver.devops.gov.bc.ca
- name: CPU_REQUEST
value: "25m"
- name: MEMORY_REQUEST
value: "50Mi"
- name: CPU_LIMIT
value: "75m"
- name: MEMORY_LIMIT
value: "150Mi"
- name: MIN_REPLICAS
description: The minimum amount of replicas
value: "1"
- name: MAX_REPLICAS
description: The maximum amount of replicas
value: "3"
- name: CONTAINER_PORT
description: The port on which the application will be accessible
required: true
- name: REGISTRY
description: Container registry to import from (internal is image-registry.openshift-image-registry.svc:5000)
value: ghcr.io
- name: PROMOTE
description: Image (namespace/name:tag) to promote/import
value: bcgov/nr-epd-digital-services/frontend
- name: ENV
description: The Environment on which it is deployed
required: true
- name: REACT_APP_AUTH_CLIENT_ID
description: "The keycloak client id"
value: epd-web
- name: NAME
description: Module name
value: epd
- name: COMPONENT
description: Component name
value: frontend
- name: IMAGE_TAG
description: Image tag to use
value: latest
- name: DOMAIN
value: apps.silver.devops.gov.bc.ca
- name: CPU_REQUEST
value: "25m"
- name: MEMORY_REQUEST
value: "50Mi"
- name: CPU_LIMIT
value: "75m"
- name: MEMORY_LIMIT
value: "150Mi"
- name: MIN_REPLICAS
description: The minimum amount of replicas
value: "1"
- name: MAX_REPLICAS
description: The maximum amount of replicas
value: "3"
- name: CONTAINER_PORT
description: The port on which the application will be accessible
required: true
- name: REGISTRY
description: Container registry to import from (internal is image-registry.openshift-image-registry.svc:5000)
value: ghcr.io
- name: PROMOTE
description: Image (namespace/name:tag) to promote/import
value: bcgov/nr-epd-digital-services/frontend
- name: ENV
description: The Environment on which it is deployed
required: true
- name: REACT_APP_AUTH_CLIENT_ID
description: "The keycloak client id"
value: epd-web
objects:
# ConfigMap created by sakthi for testing - DONOT push
- apiVersion: v1
kind: ConfigMap
metadata:
name: ${NAME}-config
data:
config.js: |-
// runtime-config.js vars
window["_env_"] = {
"REACT_APP_NODE_ENV": "production",
"REACT_APP_AUTH_AUTHORITY": "https://epd-keycloak-${ENV}.apps.silver.devops.gov.bc.ca/auth/realms/forms-flow-ai/",
"REACT_APP_AUTH_CLIENT_ID": "${REACT_APP_AUTH_CLIENT_ID}",
"REACT_APP_AUTH_REDIRECT_URI": "https://forms-flow-web-root-config-${ENV}.apps.silver.devops.gov.bc.ca/",
"REACT_APP_AUTH_LOGOUT_REDIRECT_URI": "https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://epd-keycloak-${ENV}.apps.silver.devops.gov.bc.ca/auth/realms/forms-flow-ai/protocol/openid-connect/logout?post_logout_redirect_uri=https://epd-frontend-${ENV}.apps.silver.devops.gov.bc.ca",
"REACT_APP_AUTH_RESPONSE_TYPE": "code",
"REACT_APP_AUTH_SCOPE": "openid profile",
"REACT_APP_BACKEND_API": "https://epd-backend-gateway-${ENV}.apps.silver.devops.gov.bc.ca",
"REACT_APP_AUTH_FILTER_PROTOCOL_CLAIMS": "true",
"REACT_APP_AUTH_LOAD_USER_INFO": "true",
"REACT_APP_AUTH_REVOKE_TOKENS_ON_SIGNOUT": "true",
"REACT_APP_FORMSFLOW_WEB_URL": "https://forms-flow-web-root-config-${ENV}.apps.silver.devops.gov.bc.ca/",
"REACT_APP_CUSTOM_MAP_URL": "https://epd-frontend-${ENV}.apps.silver.devops.gov.bc.ca/map"
}
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: ${NAME}-${COMPONENT}
# ConfigMap created by sakthi for testing - DONOT push
- apiVersion: v1
kind: ConfigMap
metadata:
name: ${NAME}-config
data:
config.js: "// runtime-config.js vars\n window[\"_env_\"] = {\n \"REACT_APP_NODE_ENV\": \"production\",\n \"REACT_APP_AUTH_AUTHORITY\": \"https://epd-keycloak-${ENV}.apps.silver.devops.gov.bc.ca/auth/realms/forms-flow-ai/\",\n \"REACT_APP_AUTH_CLIENT_ID\": \"${REACT_APP_AUTH_CLIENT_ID}\",\n \"REACT_APP_AUTH_REDIRECT_URI\": \"https://forms-flow-web-root-config-${ENV}.apps.silver.devops.gov.bc.ca/\", \n \"REACT_APP_AUTH_LOGOUT_REDIRECT_URI\": \"https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://epd-keycloak-${ENV}.apps.silver.devops.gov.bc.ca/auth/realms/forms-flow-ai/protocol/openid-connect/logout?post_logout_redirect_uri=https://epd-frontend-${ENV}.apps.silver.devops.gov.bc.ca\",\n \"REACT_APP_AUTH_RESPONSE_TYPE\": \"code\",\n \"REACT_APP_AUTH_SCOPE\": \"openid profile\",\n \"REACT_APP_BACKEND_API\": \"https://epd-backend-gateway-${ENV}.apps.silver.devops.gov.bc.ca\", \n \"REACT_APP_AUTH_FILTER_PROTOCOL_CLAIMS\": \"true\",\n \"REACT_APP_AUTH_LOAD_USER_INFO\": \"true\", \n \"REACT_APP_AUTH_REVOKE_TOKENS_ON_SIGNOUT\": \"true\",\n \"REACT_APP_FORMSFLOW_WEB_URL\": \"https://forms-flow-web-root-config-${ENV}.apps.silver.devops.gov.bc.ca/\",\n \"REACT_APP_CUSTOM_MAP_URL\": \"https://epd-frontend-${ENV}.apps.silver.devops.gov.bc.ca/map\"\n }"
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: ${NAME}-${COMPONENT}
name: ${NAME}-${COMPONENT}
spec:
lookupPolicy:
local: false
tags:
- name: ${IMAGE_TAG}
from:
kind: DockerImage
name: ${REGISTRY}/${PROMOTE}:${IMAGE_TAG}
referencePolicy:
type: Local
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: ${NAME}-${COMPONENT}
name: ${NAME}-${COMPONENT}
spec:
replicas: 1
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- ${NAME}-${COMPONENT}
from:
kind: ImageStreamTag
name: ${NAME}-${COMPONENT}:${IMAGE_TAG}
selector:
deploymentconfig: ${NAME}-${COMPONENT}
strategy:
type: Rolling
template:
metadata:
labels:
app: ${NAME}-${COMPONENT}
deploymentconfig: ${NAME}-${COMPONENT}
spec:
containers:
- image: " "
imagePullPolicy: Always
name: ${NAME}-${COMPONENT}
env:
- name: REACT_APP_AUTH_REDIRECT_URI
value: https://${NAME}-frontend-${ENV}.${DOMAIN}
ports:
- containerPort: ${{CONTAINER_PORT}}
protocol: TCP
resources:
requests:
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
limits:
cpu: ${CPU_LIMIT}
memory: ${MEMORY_LIMIT}
readinessProbe:
httpGet:
port: ${{CONTAINER_PORT}}
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 30
successThreshold: 1
livenessProbe:
successThreshold: 1
failureThreshold: 3
httpGet:
path: /
port: ${{CONTAINER_PORT}}
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 5
#Added for configMap mount
volumeMounts:
- name: ${NAME}-config
#readOnly: true
mountPath: /usr/share/nginx/html/config/
volumes:
- name: ${NAME}-config
configMap:
name: ${NAME}-config
- apiVersion: v1
kind: Service
metadata:
labels:
app: ${NAME}-${COMPONENT}
name: ${NAME}-${COMPONENT}
spec:
ports:
- name: ${CONTAINER_PORT}-tcp
protocol: TCP
port: 80
targetPort: ${{CONTAINER_PORT}}
selector:
deploymentconfig: ${NAME}-${COMPONENT}
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
labels:
app: ${NAME}-${COMPONENT}
name: ${NAME}-${COMPONENT}
spec:
host: ${NAME}-${COMPONENT}-${ENV}.${DOMAIN}
port:
targetPort: ${CONTAINER_PORT}-tcp
to:
kind: Service
name: ${NAME}-${COMPONENT}
spec:
lookupPolicy:
local: false
tags:
- name: ${IMAGE_TAG}
from:
kind: DockerImage
name: ${REGISTRY}/${PROMOTE}:${IMAGE_TAG}
referencePolicy:
type: Local
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: ${NAME}-${COMPONENT}
name: ${NAME}-${COMPONENT}
spec:
replicas: 1
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- ${NAME}-${COMPONENT}
from:
kind: ImageStreamTag
name: ${NAME}-${COMPONENT}:${IMAGE_TAG}
selector:
deploymentconfig: ${NAME}-${COMPONENT}
strategy:
type: Rolling
template:
metadata:
labels:
app: ${NAME}-${COMPONENT}
deploymentconfig: ${NAME}-${COMPONENT}
spec:
containers:
- image: " "
imagePullPolicy: Always
name: ${NAME}-${COMPONENT}
env:
- name: REACT_APP_AUTH_REDIRECT_URI
value: https://${NAME}-frontend-${ENV}.${DOMAIN}
ports:
- containerPort: ${{CONTAINER_PORT}}
protocol: TCP
resources:
requests:
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
limits:
cpu: ${CPU_LIMIT}
memory: ${MEMORY_LIMIT}
readinessProbe:
tcpSocket:
port: ${{CONTAINER_PORT}}
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 30
successThreshold: 1
livenessProbe:
successThreshold: 1
failureThreshold: 3
httpGet:
path: /
port: ${{CONTAINER_PORT}}
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 5
#Added for configMap mount
volumeMounts:
- name: ${NAME}-config
#readOnly: true
mountPath: /usr/share/nginx/html/config/
volumes:
- name: ${NAME}-config
configMap:
name: ${NAME}-config
- apiVersion: v1
kind: Service
metadata:
labels:
app: ${NAME}-${COMPONENT}
name: ${NAME}-${COMPONENT}
spec:
ports:
- name: ${CONTAINER_PORT}-tcp
protocol: TCP
port: 80
targetPort: ${{CONTAINER_PORT}}
selector:
deploymentconfig: ${NAME}-${COMPONENT}
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
labels:
app: ${NAME}-${COMPONENT}
name: ${NAME}-${COMPONENT}
spec:
host: ${NAME}-${COMPONENT}-${ENV}.${DOMAIN}
port:
targetPort: ${CONTAINER_PORT}-tcp
to:
kind: Service
name: ${NAME}-${COMPONENT}
weight: 100
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
- apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
weight: 100
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
- apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: "${NAME}-${COMPONENT}"
spec:
scaleTargetRef:
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
name: "${NAME}-${COMPONENT}"
spec:
scaleTargetRef:
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
name: "${NAME}-${COMPONENT}"
minReplicas: ${{MIN_REPLICAS}}
maxReplicas: ${{MAX_REPLICAS}}
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 100
minReplicas: ${{MIN_REPLICAS}}
maxReplicas: ${{MAX_REPLICAS}}
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 100
1 change: 0 additions & 1 deletion backend/applications/src/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export class AppService {
return 'Hello World!';
}
confirmFormSubmission(formRequest: Request): any {

return formRequest;
}
}
Loading

0 comments on commit 5135154

Please sign in to comment.