diff --git a/kustomize/base/deployment.yaml b/kustomize/base/deployment.yaml index 41e897b..5f99d00 100644 --- a/kustomize/base/deployment.yaml +++ b/kustomize/base/deployment.yaml @@ -2,53 +2,62 @@ apiVersion: apps/v1 kind: Deployment metadata: name: healthcheck-deployment + labels: + app: healthcheck-deployment spec: + selector: + matchLabels: + app: healthcheck-deployment strategy: type: RollingUpdate template: + metadata: + labels: + app: healthcheck-deployment spec: containers: - - name: healthcheck - image: ghcr.io/dbca-wa/healthcheck - env: - - name: TZ - value: "Australia/Perth" - resources: - requests: - memory: "64Mi" - cpu: "5m" - limits: - memory: "2048Mi" - cpu: "500m" - livenessProbe: - httpGet: - path: /liveness - port: 8080 - scheme: HTTP - periodSeconds: 15 - successThreshold: 1 - failureThreshold: 3 - timeoutSeconds: 10 - readinessProbe: - httpGet: - path: /readiness - port: 8080 - scheme: HTTP - periodSeconds: 15 - successThreshold: 1 - failureThreshold: 3 - timeoutSeconds: 10 - securityContext: - runAsNonRoot: true - privileged: false - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - readOnlyRootFilesystem: true - volumeMounts: - - mountPath: /tmp - name: tmpfs-ram + - name: healthcheck + image: ghcr.io/dbca-wa/healthcheck + imagePullPolicy: Always + env: + - name: TZ + value: "Australia/Perth" + resources: + requests: + memory: "64Mi" + cpu: "5m" + limits: + memory: "2048Mi" + cpu: "500m" + livenessProbe: + httpGet: + path: /liveness + port: 8080 + scheme: HTTP + periodSeconds: 15 + successThreshold: 1 + failureThreshold: 3 + timeoutSeconds: 10 + readinessProbe: + httpGet: + path: /readiness + port: 8080 + scheme: HTTP + periodSeconds: 15 + successThreshold: 1 + failureThreshold: 3 + timeoutSeconds: 10 + securityContext: + runAsNonRoot: true + privileged: false + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + volumeMounts: + - mountPath: /tmp + name: tmpfs-ram volumes: - name: tmpfs-ram emptyDir: diff --git a/kustomize/base/service.yaml b/kustomize/base/service.yaml index 62f6252..2660ddf 100644 --- a/kustomize/base/service.yaml +++ b/kustomize/base/service.yaml @@ -5,7 +5,7 @@ metadata: spec: type: ClusterIP ports: - - name: wsgi - port: 8080 - protocol: TCP - targetPort: 8080 + - name: wsgi + port: 8080 + protocol: TCP + targetPort: 8080 diff --git a/kustomize/overlays/prod/deployment_patch.yaml b/kustomize/overlays/prod/deployment_patch.yaml index d94a022..48b3702 100644 --- a/kustomize/overlays/prod/deployment_patch.yaml +++ b/kustomize/overlays/prod/deployment_patch.yaml @@ -2,128 +2,120 @@ apiVersion: apps/v1 kind: Deployment metadata: name: healthcheck-deployment - labels: - app: healthcheck-prod spec: - selector: - matchLabels: - app: healthcheck-prod template: - metadata: - labels: - app: healthcheck-prod spec: containers: - - name: healthcheck - imagePullPolicy: IfNotPresent - env: - - name: BFRS_URL - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: BFRS_URL - - name: CSW_API - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: CSW_API - - name: KMI_URL - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: KMI_URL - - name: RT_URL - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: RT_URL - - name: USER_SSO - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: USER_SSO - - name: PASS_SSO - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: PASS_SSO - - name: TRACKING_POINTS_MAX_DELAY - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: TRACKING_POINTS_MAX_DELAY - - name: DBCA_GOING_BUSHFIRES_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: DBCA_GOING_BUSHFIRES_LAYER - - name: DBCA_CONTROL_LINES_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: DBCA_CONTROL_LINES_LAYER - - name: DFES_GOING_BUSHFIRES_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: DFES_GOING_BUSHFIRES_LAYER - - name: ALL_CURRENT_HOTSPOTS_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: ALL_CURRENT_HOTSPOTS_LAYER - - name: LIGHTNING_24H_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: LIGHTNING_24H_LAYER - - name: LIGHTNING_24_48H_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: LIGHTNING_24_48H_LAYER - - name: LIGHTNING_48_72H_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: LIGHTNING_48_72H_LAYER - - name: FUEL_AGE_1_6Y_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: FUEL_AGE_1_6Y_LAYER - - name: FUEL_AGE_NONFOREST_1_6Y_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: FUEL_AGE_NONFOREST_1_6Y_LAYER - - name: COG_BASEMAP_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: COG_BASEMAP_LAYER - - name: STATE_BASEMAP_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: STATE_BASEMAP_LAYER - - name: DBCA_BURN_PROGRAM_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: DBCA_BURN_PROGRAM_LAYER - - name: DAILY_ACTIVE_BURNS_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: DAILY_ACTIVE_BURNS_LAYER - - name: DBCA_LANDS_WATERS_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: DBCA_LANDS_WATERS_LAYER - - name: DBCA_LANDS_WATERS_INTEREST_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-prod - key: DBCA_LANDS_WATERS_INTEREST_LAYER + - name: healthcheck + imagePullPolicy: IfNotPresent + env: + - name: BFRS_URL + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: BFRS_URL + - name: CSW_API + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: CSW_API + - name: KMI_URL + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: KMI_URL + - name: RT_URL + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: RT_URL + - name: USER_SSO + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: USER_SSO + - name: PASS_SSO + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: PASS_SSO + - name: TRACKING_POINTS_MAX_DELAY + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: TRACKING_POINTS_MAX_DELAY + - name: DBCA_GOING_BUSHFIRES_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: DBCA_GOING_BUSHFIRES_LAYER + - name: DBCA_CONTROL_LINES_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: DBCA_CONTROL_LINES_LAYER + - name: DFES_GOING_BUSHFIRES_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: DFES_GOING_BUSHFIRES_LAYER + - name: ALL_CURRENT_HOTSPOTS_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: ALL_CURRENT_HOTSPOTS_LAYER + - name: LIGHTNING_24H_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: LIGHTNING_24H_LAYER + - name: LIGHTNING_24_48H_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: LIGHTNING_24_48H_LAYER + - name: LIGHTNING_48_72H_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: LIGHTNING_48_72H_LAYER + - name: FUEL_AGE_1_6Y_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: FUEL_AGE_1_6Y_LAYER + - name: FUEL_AGE_NONFOREST_1_6Y_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: FUEL_AGE_NONFOREST_1_6Y_LAYER + - name: COG_BASEMAP_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: COG_BASEMAP_LAYER + - name: STATE_BASEMAP_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: STATE_BASEMAP_LAYER + - name: DBCA_BURN_PROGRAM_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: DBCA_BURN_PROGRAM_LAYER + - name: DAILY_ACTIVE_BURNS_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: DAILY_ACTIVE_BURNS_LAYER + - name: DBCA_LANDS_WATERS_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: DBCA_LANDS_WATERS_LAYER + - name: DBCA_LANDS_WATERS_INTEREST_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-prod + key: DBCA_LANDS_WATERS_INTEREST_LAYER diff --git a/kustomize/overlays/prod/ingress.yaml b/kustomize/overlays/prod/ingress.yaml index 6da32de..cbeac2a 100644 --- a/kustomize/overlays/prod/ingress.yaml +++ b/kustomize/overlays/prod/ingress.yaml @@ -5,13 +5,13 @@ metadata: spec: ingressClassName: nginx rules: - - host: healthcheck.dbca.wa.gov.au - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: healthcheck-clusterip-prod - port: - number: 8080 + - host: healthcheck.dbca.wa.gov.au + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: healthcheck-clusterip-prod + port: + number: 8080 diff --git a/kustomize/overlays/prod/kustomization.yaml b/kustomize/overlays/prod/kustomization.yaml index 7c015ae..4363a92 100644 --- a/kustomize/overlays/prod/kustomization.yaml +++ b/kustomize/overlays/prod/kustomization.yaml @@ -9,7 +9,9 @@ secretGenerator: - name: healthcheck-env type: Opaque envs: - - .env + - .env +generatorOptions: + disableNameSuffixHash: true labels: - includeSelectors: true pairs: diff --git a/kustomize/overlays/prod/service_patch.yaml b/kustomize/overlays/prod/service_patch.yaml index ab340f3..543eb97 100644 --- a/kustomize/overlays/prod/service_patch.yaml +++ b/kustomize/overlays/prod/service_patch.yaml @@ -5,5 +5,5 @@ metadata: spec: type: ClusterIP selector: - app: healthcheck-prod + app: healthcheck-deployment variant: prod diff --git a/kustomize/overlays/uat/deployment_patch.yaml b/kustomize/overlays/uat/deployment_patch.yaml index 1e6eeb8..4eee3bf 100644 --- a/kustomize/overlays/uat/deployment_patch.yaml +++ b/kustomize/overlays/uat/deployment_patch.yaml @@ -2,128 +2,119 @@ apiVersion: apps/v1 kind: Deployment metadata: name: healthcheck-deployment - labels: - app: healthcheck-uat spec: - selector: - matchLabels: - app: healthcheck-uat template: - metadata: - labels: - app: healthcheck-uat spec: containers: - - name: healthcheck - imagePullPolicy: Always - env: - - name: BFRS_URL - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: BFRS_URL - - name: CSW_API - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: CSW_API - - name: KMI_URL - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: KMI_URL - - name: RT_URL - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: RT_URL - - name: USER_SSO - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: USER_SSO - - name: PASS_SSO - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: PASS_SSO - - name: TRACKING_POINTS_MAX_DELAY - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: TRACKING_POINTS_MAX_DELAY - - name: DBCA_GOING_BUSHFIRES_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: DBCA_GOING_BUSHFIRES_LAYER - - name: DBCA_CONTROL_LINES_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: DBCA_CONTROL_LINES_LAYER - - name: DFES_GOING_BUSHFIRES_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: DFES_GOING_BUSHFIRES_LAYER - - name: ALL_CURRENT_HOTSPOTS_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: ALL_CURRENT_HOTSPOTS_LAYER - - name: LIGHTNING_24H_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: LIGHTNING_24H_LAYER - - name: LIGHTNING_24_48H_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: LIGHTNING_24_48H_LAYER - - name: LIGHTNING_48_72H_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: LIGHTNING_48_72H_LAYER - - name: FUEL_AGE_1_6Y_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: FUEL_AGE_1_6Y_LAYER - - name: FUEL_AGE_NONFOREST_1_6Y_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: FUEL_AGE_NONFOREST_1_6Y_LAYER - - name: COG_BASEMAP_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: COG_BASEMAP_LAYER - - name: STATE_BASEMAP_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: STATE_BASEMAP_LAYER - - name: DBCA_BURN_PROGRAM_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: DBCA_BURN_PROGRAM_LAYER - - name: DAILY_ACTIVE_BURNS_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: DAILY_ACTIVE_BURNS_LAYER - - name: DBCA_LANDS_WATERS_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: DBCA_LANDS_WATERS_LAYER - - name: DBCA_LANDS_WATERS_INTEREST_LAYER - valueFrom: - secretKeyRef: - name: healthcheck-env-uat - key: DBCA_LANDS_WATERS_INTEREST_LAYER + - name: healthcheck + env: + - name: BFRS_URL + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: BFRS_URL + - name: CSW_API + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: CSW_API + - name: KMI_URL + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: KMI_URL + - name: RT_URL + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: RT_URL + - name: USER_SSO + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: USER_SSO + - name: PASS_SSO + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: PASS_SSO + - name: TRACKING_POINTS_MAX_DELAY + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: TRACKING_POINTS_MAX_DELAY + - name: DBCA_GOING_BUSHFIRES_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: DBCA_GOING_BUSHFIRES_LAYER + - name: DBCA_CONTROL_LINES_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: DBCA_CONTROL_LINES_LAYER + - name: DFES_GOING_BUSHFIRES_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: DFES_GOING_BUSHFIRES_LAYER + - name: ALL_CURRENT_HOTSPOTS_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: ALL_CURRENT_HOTSPOTS_LAYER + - name: LIGHTNING_24H_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: LIGHTNING_24H_LAYER + - name: LIGHTNING_24_48H_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: LIGHTNING_24_48H_LAYER + - name: LIGHTNING_48_72H_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: LIGHTNING_48_72H_LAYER + - name: FUEL_AGE_1_6Y_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: FUEL_AGE_1_6Y_LAYER + - name: FUEL_AGE_NONFOREST_1_6Y_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: FUEL_AGE_NONFOREST_1_6Y_LAYER + - name: COG_BASEMAP_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: COG_BASEMAP_LAYER + - name: STATE_BASEMAP_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: STATE_BASEMAP_LAYER + - name: DBCA_BURN_PROGRAM_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: DBCA_BURN_PROGRAM_LAYER + - name: DAILY_ACTIVE_BURNS_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: DAILY_ACTIVE_BURNS_LAYER + - name: DBCA_LANDS_WATERS_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: DBCA_LANDS_WATERS_LAYER + - name: DBCA_LANDS_WATERS_INTEREST_LAYER + valueFrom: + secretKeyRef: + name: healthcheck-env-uat + key: DBCA_LANDS_WATERS_INTEREST_LAYER diff --git a/kustomize/overlays/uat/ingress.yaml b/kustomize/overlays/uat/ingress.yaml index 020ed6e..b26bf28 100644 --- a/kustomize/overlays/uat/ingress.yaml +++ b/kustomize/overlays/uat/ingress.yaml @@ -5,13 +5,13 @@ metadata: spec: ingressClassName: nginx rules: - - host: healthcheck-uat.dbca.wa.gov.au - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: healthcheck-clusterip-uat - port: - number: 8080 + - host: healthcheck-uat.dbca.wa.gov.au + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: healthcheck-clusterip-uat + port: + number: 8080 diff --git a/kustomize/overlays/uat/kustomization.yaml b/kustomize/overlays/uat/kustomization.yaml index b6dedb8..3cba279 100644 --- a/kustomize/overlays/uat/kustomization.yaml +++ b/kustomize/overlays/uat/kustomization.yaml @@ -9,7 +9,9 @@ secretGenerator: - name: healthcheck-env type: Opaque envs: - - .env + - .env +generatorOptions: + disableNameSuffixHash: true labels: - includeSelectors: true pairs: diff --git a/kustomize/overlays/uat/service_patch.yaml b/kustomize/overlays/uat/service_patch.yaml index 58fa035..6222688 100644 --- a/kustomize/overlays/uat/service_patch.yaml +++ b/kustomize/overlays/uat/service_patch.yaml @@ -5,5 +5,5 @@ metadata: spec: type: ClusterIP selector: - app: healthcheck-uat + app: healthcheck-deployment variant: uat