diff --git a/backend/openshift.deploy.yml b/backend/openshift.deploy.yml deleted file mode 100644 index 4c32698a..00000000 --- a/backend/openshift.deploy.yml +++ /dev/null @@ -1,217 +0,0 @@ -apiVersion: template.openshift.io/v1 -kind: Template -parameters: - - name: NAME - description: Module name - value: nr-results-exam - - name: COMPONENT - description: Component name - value: backend - - name: ZONE - description: Deployment zone, e.g. pr-### or prod - required: true - - name: TAG - description: Image tag; e.g. PR number, latest or prod - required: true - - 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: CPU_REQUEST_INIT - value: "125m" - - name: MEMORY_REQUEST_INIT - value: "100Mi" - - name: CPU_LIMIT_INIT - value: "250m" - - name: MEMORY_LIMIT_INIT - value: "250Mi" - - name: MIN_REPLICAS - description: The minimum amount of replicas for the horizontal pod autoscaler. - value: "3" - - name: MAX_REPLICAS - description: The maximum amount of replicas for the horizontal pod autoscaler. - value: "5" - - name: REGISTRY - description: Container registry to import from (internal is image-registry.openshift-image-registry.svc:5000) - value: ghcr.io - - name: ORG - description: Organization name, e.g. bcgov - value: bcgov - - name: CHES_TOKEN_URL - value: "https://test.loginproxy.gov.bc.ca/auth/realms/comsvcauth/protocol/openid-connect/token" - - name: CHES_CLIENT_ID - value: "09C5071A-ACE9B6FACF6" - - name: CHES_CLIENT_SECRET - value: "9c82d5fc-1d34-4a0c-97f2-c0c756791c34" - - name: VITE_QUESTIONS_API_KEY - description: Dummy param to satisfy workflow - - name: S3_ACCESSKEY - description: Access key for S3 - value: nr-fsa-tst - - name: S3_ENDPOINT - description: Endpoint for S3 - value: nrs.objectstore.gov.bc.ca - - name: S3_BUCKETNAME - description: Bucket name for S3 - value: tivpth - - name: S3_SECRETKEY - description: Secret key for S3 - required: true - - name: RANDOM_EXPRESSION - description: Random expression to make sure deployments update - from: "[a-zA-Z0-9]{32}" - generate: expression -objects: - - apiVersion: networking.k8s.io/v1 - kind: NetworkPolicy - metadata: - name: allow-from-openshift-ingress - labels: - template: openshift-test - spec: - podSelector: {} - ingress: - - from: - - namespaceSelector: - matchLabels: - network.openshift.io/policy-group: ingress - policyTypes: - - Ingress - - apiVersion: networking.k8s.io/v1 - kind: NetworkPolicy - metadata: - name: allow-same-namespace - labels: - template: network-security-policy - spec: - podSelector: {} - ingress: - - from: - - podSelector: {} - policyTypes: - - Ingress - - kind: Deployment - apiVersion: apps/v1 - metadata: - labels: - app: "${NAME}-${ZONE}" - name: "${NAME}-${ZONE}-${COMPONENT}" - spec: - replicas: 1 - selector: - matchLabels: - deployment: "${NAME}-${ZONE}-${COMPONENT}" - strategy: - type: RollingUpdate - template: - metadata: - labels: - app: "${NAME}-${ZONE}" - deployment: "${NAME}-${ZONE}-${COMPONENT}" - spec: - containers: - - image: ${REGISTRY}/${ORG}/${NAME}/${COMPONENT}:${TAG} - imagePullPolicy: Always - name: "${NAME}" - env: - - name: CHES_CLIENT_ID - value: ${CHES_CLIENT_ID} - - name: CHES_CLIENT_SECRET - value: ${CHES_CLIENT_SECRET} - - name: CHES_TOKEN_URL - value: ${CHES_TOKEN_URL} - - name: S3_ACCESSKEY - value: ${S3_ACCESSKEY} - - name: S3_BUCKETNAME - value: ${S3_BUCKETNAME} - - name: S3_ENDPOINT - value: ${S3_ENDPOINT} - - name: S3_SECRETKEY - value: ${S3_SECRETKEY} - - name: RANDOM_EXPRESSION - value: ${RANDOM_EXPRESSION} - ports: - - containerPort: 5000 - protocol: TCP - resources: - requests: - cpu: "${CPU_REQUEST}" - memory: "${MEMORY_REQUEST}" - limits: - cpu: "${CPU_LIMIT}" - memory: "${MEMORY_LIMIT}" - readinessProbe: - httpGet: - path: /health - port: 5000 - scheme: HTTP - initialDelaySeconds: 5 - periodSeconds: 2 - timeoutSeconds: 2 - successThreshold: 1 - failureThreshold: 30 - livenessProbe: - successThreshold: 1 - failureThreshold: 3 - httpGet: - path: /health - port: 5000 - scheme: HTTP - initialDelaySeconds: 60 - periodSeconds: 30 - timeoutSeconds: 5 - - apiVersion: v1 - kind: Service - metadata: - labels: - app: "${NAME}-${ZONE}" - name: "${NAME}-${ZONE}-${COMPONENT}" - spec: - ports: - - name: 5000-tcp - protocol: TCP - port: 80 - targetPort: 5000 - selector: - deployment: "${NAME}-${ZONE}-${COMPONENT}" - - apiVersion: route.openshift.io/v1 - kind: Route - metadata: - labels: - app: "${NAME}-${ZONE}" - name: "${NAME}-${ZONE}-${COMPONENT}" - spec: - host: "${NAME}-${ZONE}-${COMPONENT}.${DOMAIN}" - port: - targetPort: 5000-tcp - to: - kind: Service - name: "${NAME}-${ZONE}-${COMPONENT}" - weight: 100 - tls: - termination: edge - insecureEdgeTerminationPolicy: Redirect - - apiVersion: autoscaling/v2 - kind: HorizontalPodAutoscaler - metadata: - name: "${NAME}-${ZONE}-${COMPONENT}" - spec: - scaleTargetRef: - apiVersion: apps.openshift.io/v1 - kind: Deployment - name: "${NAME}-${ZONE}-${COMPONENT}" - minReplicas: "${{MIN_REPLICAS}}" - maxReplicas: "${{MAX_REPLICAS}}" - metrics: - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: 100 diff --git a/frontend/openshift.deploy.yml b/frontend/openshift.deploy.yml deleted file mode 100644 index 87d5f4d0..00000000 --- a/frontend/openshift.deploy.yml +++ /dev/null @@ -1,169 +0,0 @@ -apiVersion: template.openshift.io/v1 -kind: Template -parameters: - - name: NAME - description: Module name - value: nr-results-exam - - name: COMPONENT - description: Component name - value: frontend - - name: ZONE - description: Deployment zone, e.g. pr-### or prod - required: true - - name: TAG - description: Image tag; e.g. PR number, latest or prod - required: true - - 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 for the horizontal pod autoscaler. - value: "3" - - name: MAX_REPLICAS - description: The maximum amount of replicas for the horizontal pod autoscaler. - value: "5" - - name: REGISTRY - description: Container registry to import from (internal is image-registry.openshift-image-registry.svc:5000) - value: ghcr.io - - name: ORG - description: Organization name, e.g. bcgov - value: bcgov - - name: LOG_LEVEL - description: Caddy logging level DEBUG, INFO, WARN, ERROR, PANIC, and FATAL (https://github.com/caddyserver/caddy/blob/master/logging.go) - value: "info" - - name: VITE_USER_POOLS_WEB_CLIENT_ID - - name: VITE_QUESTIONS_API_KEY - - name: VITE_ZONE - value: DEV - - name: S3_SECRETKEY - description: Dummy param to satisfy workflow - - name: RANDOM_EXPRESSION - description: Random expression to make sure deployments update - from: "[a-zA-Z0-9]{32}" - generate: expression -objects: - - kind: Deployment - apiVersion: apps/v1 - metadata: - labels: - app: "${NAME}-${ZONE}" - name: "${NAME}-${ZONE}-${COMPONENT}" - spec: - replicas: 1 - selector: - matchLabels: - deployment: "${NAME}-${ZONE}-${COMPONENT}" - strategy: - type: RollingUpdate - template: - metadata: - labels: - app: "${NAME}-${ZONE}" - deployment: "${NAME}-${ZONE}-${COMPONENT}" - spec: - containers: - - image: ${REGISTRY}/${ORG}/${NAME}/${COMPONENT}:${TAG} - securityContext: - capabilities: - add: ["NET_BIND_SERVICE"] - imagePullPolicy: Always - name: ${NAME} - env: - - name: LOG_LEVEL - value: "${LOG_LEVEL}" - - name: VITE_BACKEND_URL - value: "https://${NAME}-${ZONE}-backend.${DOMAIN}:443" - - name: VITE_USER_POOLS_WEB_CLIENT_ID - value: "${VITE_USER_POOLS_WEB_CLIENT_ID}" - - name: VITE_QUESTIONS_API_KEY - value: "${VITE_QUESTIONS_API_KEY}" - - name: VITE_ZONE - value: "${ZONE}" - - name: RANDOM_EXPRESSION - value: ${RANDOM_EXPRESSION} - ports: - - containerPort: 3000 - protocol: TCP - resources: - requests: - cpu: "${CPU_REQUEST}" - memory: "${MEMORY_REQUEST}" - limits: - cpu: "${CPU_LIMIT}" - memory: "${MEMORY_LIMIT}" - readinessProbe: - httpGet: - path: / - port: 3000 - scheme: HTTP - initialDelaySeconds: 5 - periodSeconds: 2 - timeoutSeconds: 2 - successThreshold: 1 - failureThreshold: 30 - livenessProbe: - successThreshold: 1 - failureThreshold: 3 - httpGet: - path: / - port: 3000 - scheme: HTTP - initialDelaySeconds: 15 - periodSeconds: 30 - timeoutSeconds: 5 - - apiVersion: v1 - kind: Service - metadata: - labels: - app: "${NAME}-${ZONE}" - name: "${NAME}-${ZONE}-${COMPONENT}" - spec: - ports: - - name: 3000-tcp - protocol: TCP - port: 80 - targetPort: 3000 - selector: - deployment: "${NAME}-${ZONE}-${COMPONENT}" - - apiVersion: route.openshift.io/v1 - kind: Route - metadata: - labels: - app: "${NAME}-${ZONE}" - name: "${NAME}-${ZONE}-${COMPONENT}" - spec: - host: "${NAME}-${ZONE}-${COMPONENT}.${DOMAIN}" - port: - targetPort: 3000-tcp - to: - kind: Service - name: "${NAME}-${ZONE}-${COMPONENT}" - weight: 100 - tls: - termination: edge - insecureEdgeTerminationPolicy: Redirect - - apiVersion: autoscaling/v2 - kind: HorizontalPodAutoscaler - metadata: - name: "${NAME}-${ZONE}-${COMPONENT}" - spec: - scaleTargetRef: - apiVersion: apps.openshift.io/v1 - kind: Deployment - name: "${NAME}-${ZONE}-${COMPONENT}" - minReplicas: "${{MIN_REPLICAS}}" - maxReplicas: "${{MAX_REPLICAS}}" - metrics: - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: 100 diff --git a/frontend/package-lock.json b/frontend/package-lock.json index a54d2607..fb3fabeb 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -28,7 +28,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-redux": "^8.1.3", - "react-router-dom": "^6.22.3", + "react-router-dom": "^7.0.0", "redux": "^4.2.1", "redux-thunk": "^2.4.2", "vite": "^5.2.11", @@ -10552,15 +10552,6 @@ "redux": "^3.1.0 || ^4.0.0 || ^5.0.0" } }, - "node_modules/@remix-run/router": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.19.2.tgz", - "integrity": "sha512-baiMx18+IMuD1yyvOGaHM9QrVUPGGG0jC+z+IPHnRJWUAUvaKuWKyE8gjDj2rzv3sz9zOGoRSPgeBVHRhZnBlA==", - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@rollup/pluginutils": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.2.tgz", @@ -19569,35 +19560,58 @@ } }, "node_modules/react-router": { - "version": "6.26.2", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.26.2.tgz", - "integrity": "sha512-tvN1iuT03kHgOFnLPfLJ8V95eijteveqdOSk+srqfePtQvqCExB8eHOYnlilbOcyJyKnYkr1vJvf7YqotAJu1A==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.1.3.tgz", + "integrity": "sha512-EezYymLY6Guk/zLQ2vRA8WvdUhWFEj5fcE3RfWihhxXBW7+cd1LsIiA3lmx+KCmneAGQuyBv820o44L2+TtkSA==", "license": "MIT", "dependencies": { - "@remix-run/router": "1.19.2" + "@types/cookie": "^0.6.0", + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0", + "turbo-stream": "2.4.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=20.0.0" }, "peerDependencies": { - "react": ">=16.8" + "react": ">=18", + "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } } }, "node_modules/react-router-dom": { - "version": "6.26.2", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.26.2.tgz", - "integrity": "sha512-z7YkaEW0Dy35T3/QKPYB1LjMK2R1fxnHO8kWpUMTBdfVzZrWOiY9a7CtN8HqdWtDUWd5FY6Dl8HFsqVwH4uOtQ==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.1.3.tgz", + "integrity": "sha512-qQGTE+77hleBzv9SIUIkGRvuFBQGagW+TQKy53UTZAO/3+YFNBYvRsNIZ1GT17yHbc63FylMOdS+m3oUriF1GA==", "license": "MIT", "dependencies": { - "@remix-run/router": "1.19.2", - "react-router": "6.26.2" + "react-router": "7.1.3" }, "engines": { - "node": ">=14.0.0" + "node": ">=20.0.0" }, "peerDependencies": { - "react": ">=16.8", - "react-dom": ">=16.8" + "react": ">=18", + "react-dom": ">=18" + } + }, + "node_modules/react-router/node_modules/@types/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", + "license": "MIT" + }, + "node_modules/react-router/node_modules/cookie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", + "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", + "license": "MIT", + "engines": { + "node": ">=18" } }, "node_modules/react-style-singleton": { @@ -20294,6 +20308,12 @@ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "license": "ISC" }, + "node_modules/set-cookie-parser": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "license": "MIT" + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -21335,6 +21355,12 @@ "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", "license": "0BSD" }, + "node_modules/turbo-stream": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz", + "integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==", + "license": "ISC" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index d757e5be..620519cb 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -23,7 +23,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-redux": "^8.1.3", - "react-router-dom": "^6.22.3", + "react-router-dom": "^7.0.0", "redux": "^4.2.1", "redux-thunk": "^2.4.2", "vite": "^5.2.11",