-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #171 from bcgov/qa
Qa
- Loading branch information
Showing
121 changed files
with
25,201 additions
and
2,174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,383 @@ | ||
apiVersion: template.openshift.io/v1 | ||
kind: Template | ||
parameters: | ||
- name: NAME | ||
description: Module name | ||
required: true | ||
value: bc-emli-pin-mgmt | ||
- name: COMPONENT | ||
description: Component name | ||
value: be | ||
- name: ZONE | ||
description: Deployment zone, e.g. pr-### or prod | ||
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 to promote | ||
value: ghcr.io/bcgov/bc-emli-pin-mgmt-be/bc-emli-pin-mgmt-be:latest | ||
- 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 for the horizontal pod autoscaler. | ||
value: "3" | ||
- name: MAX_REPLICAS | ||
description: The maximum amount of replicas for the horizontal pod autoscaler. | ||
value: "5" | ||
objects: | ||
- apiVersion: v1 | ||
kind: ImageStream | ||
metadata: | ||
labels: | ||
app: "${NAME}-${ZONE}" | ||
name: "${NAME}-${ZONE}-${COMPONENT}" | ||
spec: | ||
lookupPolicy: | ||
local: false | ||
tags: | ||
- name: "${IMAGE_TAG}" | ||
from: | ||
kind: DockerImage | ||
name: "${PROMOTE}" | ||
referencePolicy: | ||
type: Local | ||
- apiVersion: v1 | ||
kind: DeploymentConfig | ||
metadata: | ||
labels: | ||
app: "${NAME}-${ZONE}" | ||
name: "${NAME}-${ZONE}-${COMPONENT}" | ||
spec: | ||
replicas: 1 | ||
triggers: | ||
- type: ConfigChange | ||
- type: ImageChange | ||
imageChangeParams: | ||
automatic: true | ||
containerNames: | ||
- "${NAME}" | ||
from: | ||
kind: ImageStreamTag | ||
name: "${NAME}-${ZONE}-${COMPONENT}:${IMAGE_TAG}" | ||
selector: | ||
deploymentconfig: "${NAME}-${ZONE}-${COMPONENT}" | ||
strategy: | ||
type: Rolling | ||
template: | ||
metadata: | ||
labels: | ||
app: "${NAME}-${ZONE}" | ||
deploymentconfig: "${NAME}-${ZONE}-${COMPONENT}" | ||
spec: | ||
containers: | ||
- image: "${NAME}-${ZONE}-${COMPONENT}:${IMAGE_TAG}" | ||
securityContext: | ||
capabilities: | ||
add: ["NET_BIND_SERVICE"] | ||
imagePullPolicy: Always | ||
name: "${NAME}" | ||
env: | ||
- name: DB_NAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: patroni-ha-postgres-instance | ||
key: app-db-name | ||
- name: DB_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: patroni-ha-postgres-instance | ||
key: app-db-username | ||
- name: DB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: patroni-ha-postgres-instance | ||
key: app-db-password | ||
- name: DB_PORT | ||
valueFrom: | ||
secretKeyRef: | ||
name: patroni-ha-postgres-instance | ||
key: app-db-port | ||
- name: DB_HOST | ||
valueFrom: | ||
secretKeyRef: | ||
name: patroni-ha-postgres-instance | ||
key: app-db-hostname | ||
- name: SERVER_PORT | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: server-port | ||
- name: GEOCODER_API_BASE_URL | ||
valueFrom: | ||
secretKeyRef: | ||
name: bcgeocoder | ||
key: geocoder-test-api-url | ||
- name: GEOCODER_API_ADDRESSES_ENDPOINT | ||
valueFrom: | ||
secretKeyRef: | ||
name: bcgeocoder | ||
key: geocoder-addresses-endpoint-name | ||
- name: FE_APP_URL | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: fe-app-url | ||
- name: BE_APP_URL | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-fe | ||
key: be-app-url | ||
- name: OIDC_CLIENT_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: oidc-client-id | ||
- name: OIDC_CLIENT_SECRET | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: oidc-client-secret | ||
- name: CSS_DOMAIN_NAME_URL | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: css-domain-name-url | ||
- name: OIDC_GRANT_TYPE | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: oidc-grant-type | ||
- name: OIDC_RESPONSE_TYPE | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: oidc-response-type | ||
- name: OIDC_SCOPE | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: oidc-scope | ||
- name: COOKIE_SESSION_NAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: cookie-session-name | ||
- name: COOKIE_SESSION_SECRET | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: cookie-session-secret | ||
- name: DOMAIN_NAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: domain-name | ||
- name: BCGEOCODER_API_KEY_PID | ||
valueFrom: | ||
secretKeyRef: | ||
name: bcgeocoder | ||
key: api-key-pid | ||
- name: GEOCODER_API_PARCELS_ENDPOINT | ||
valueFrom: | ||
secretKeyRef: | ||
name: bcgeocoder | ||
key: geocoder-parcels-endpoint-name | ||
- name: GC_NOTIFY_URL | ||
valueFrom: | ||
secretKeyRef: | ||
name: gc-notify | ||
key: base-url | ||
- name: GC_NOTIFY_API_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: gc-notify | ||
key: gc_notify_api_prod | ||
- name: GC_NOTIFY_RETRY_LIMIT | ||
value: '3' | ||
- name: JWT_SECRET | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: jwt_secret | ||
- name: VHERS_API_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: vhers-api-key | ||
key: api-key | ||
- name: GC_NOTIFY_REGENERATE_EMAIL_TEMPLATE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: gc-notify | ||
key: regenerate-email-template-id | ||
- name: GC_NOTIFY_REGENERATE_PHONE_TEMPLATE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: gc-notify | ||
key: regenerate-phone-template-id | ||
- name: GC_NOTIFY_CREATE_EMAIL_TEMPLATE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: gc-notify | ||
key: create-email-template-id | ||
- name: GC_NOTIFY_CREATE_PHONE_TEMPLATE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: gc-notify | ||
key: create-phone-template-id | ||
- name: GC_NOTIFY_ACCESS_REQUEST_EMAIL_TEMPLATE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: gc-notify | ||
key: access-request-email-template-id | ||
- name: GC_NOTIFY_EXPIRE_EMAIL_TEMPLATE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: gc-notify | ||
key: expire-email-template-id | ||
- name: GC_NOTIFY_EXPIRE_PHONE_TEMPLATE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: gc-notify | ||
key: expire-phone-template-id | ||
- name: GC_NOTIFY_ACCESS_REJECT_EMAIL_TEMPLATE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: gc-notify | ||
key: access-reject-email-template-id | ||
- name: GC_NOTIFY_ACCESS_APPROVE_EMAIL_TEMPLATE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: gc-notify | ||
key: access-approve-email-template-id | ||
- name: GC_NOTIFY_USER_DEACTIVATION_EMAIL_TEMPLATE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: gc-notify | ||
key: user-deactivation-email-template-id | ||
- name: PROPERATE_STAGING_URL | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: PROPERATE_STAGING_URL | ||
- name: PROPERATE_TEST_URL | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: PROPERATE_TEST_URL | ||
- name: GC_NOTIFY_UPDATE_USER_EMAIL_TEMPLATE_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: gc-notify | ||
key: update-user-email-template-id | ||
- name: METABASE_SITE_URL | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: METABASE_SITE_URL | ||
- name: METABASE_SECRET_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: METABASE_SECRET_KEY | ||
- name: METABASE_EXPIRY_MINUTES | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: METABASE_EXPIRY_MINUTES | ||
- name: METABASE_DASHBOARD_NUMBER | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: METABASE_DASHBOARD_NUMBER | ||
- name: GC_NOTIFY_VHERS_ADMIN_EMAIL | ||
valueFrom: | ||
secretKeyRef: | ||
name: bc-emli-pin-mgmt-be | ||
key: gc_notify_vhers_admin_email | ||
ports: | ||
- containerPort: 3000 | ||
protocol: TCP | ||
resources: | ||
requests: | ||
cpu: "${CPU_REQUEST}" | ||
memory: "${MEMORY_REQUEST}" | ||
limits: | ||
cpu: "${CPU_LIMIT}" | ||
memory: "${MEMORY_LIMIT}" | ||
readinessProbe: | ||
tcpSocket: | ||
port: 3000 | ||
initialDelaySeconds: 240 | ||
periodSeconds: 2 | ||
timeoutSeconds: 2 | ||
successThreshold: 1 | ||
failureThreshold: 30 | ||
livenessProbe: | ||
successThreshold: 1 | ||
failureThreshold: 3 | ||
tcpSocket: | ||
port: 3000 | ||
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: 3000 | ||
targetPort: 3000 | ||
selector: | ||
deploymentconfig: "${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: DeploymentConfig | ||
name: "${NAME}-${ZONE}-${COMPONENT}" | ||
minReplicas: "${{MIN_REPLICAS}}" | ||
maxReplicas: "${{MAX_REPLICAS}}" | ||
metrics: | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: 100 |
Oops, something went wrong.