From 1323387baa62f8f3e79d9cfd8ca63a8e3f3cfebb Mon Sep 17 00:00:00 2001 From: Michael Pond Date: Mon, 2 Dec 2024 14:57:21 -0500 Subject: [PATCH 01/11] turning on targetgroup bindings and turning on staging for helmfile --- helmfile/helmfile.yaml | 2 +- helmfile/overrides/notify/admin.yaml.gotmpl | 2 +- helmfile/overrides/notify/api.yaml.gotmpl | 2 +- helmfile/overrides/notify/document-download.yaml.gotmpl | 2 +- helmfile/overrides/notify/documentation.yaml.gotmpl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helmfile/helmfile.yaml b/helmfile/helmfile.yaml index 7f2b9730f..872045feb 100644 --- a/helmfile/helmfile.yaml +++ b/helmfile/helmfile.yaml @@ -34,7 +34,7 @@ repositories: url: https://okgolove.github.io/helm-charts releases: -{{ if eq .Environment.Name "dev" }} +{{ if or (eq .Environment.Name "dev") (eq .Environment.Name "staging") }} - name: notify-documentation namespace: notification-canada-ca labels: diff --git a/helmfile/overrides/notify/admin.yaml.gotmpl b/helmfile/overrides/notify/admin.yaml.gotmpl index a7dcf33c8..9aa90ab0f 100644 --- a/helmfile/overrides/notify/admin.yaml.gotmpl +++ b/helmfile/overrides/notify/admin.yaml.gotmpl @@ -34,7 +34,7 @@ serviceAccount: eks.amazonaws.com/role-arn: arn:aws:iam::{{ requiredEnv "AWS_ACCOUNT_ID" }}:role/admin-eks-role targetGroupBinding: - enabled: {{ if eq .Environment.Name "production" }} false {{ else if eq .Environment.Name "staging" }} false {{ else }} false {{ end }} + enabled: {{ if eq .Environment.Name "production" }} false {{ else if eq .Environment.Name "staging" }} true {{ else }} true {{ end }} targetGroupARN: {{requiredEnv "ADMIN_TARGET_GROUP_ARN"}} resources: diff --git a/helmfile/overrides/notify/api.yaml.gotmpl b/helmfile/overrides/notify/api.yaml.gotmpl index bfb8f86d6..eadf201c0 100644 --- a/helmfile/overrides/notify/api.yaml.gotmpl +++ b/helmfile/overrides/notify/api.yaml.gotmpl @@ -27,7 +27,7 @@ serviceAccount: eks.amazonaws.com/role-arn: arn:aws:iam::{{ requiredEnv "AWS_ACCOUNT_ID" }}:role/api-eks-role targetGroupBinding: - enabled: {{ if eq .Environment.Name "production" }} false {{ else if eq .Environment.Name "staging" }} false {{ else }} false {{ end }} + enabled: {{ if eq .Environment.Name "production" }} false {{ else if eq .Environment.Name "staging" }} true {{ else }} true {{ end }} targetGroupARN: {{requiredEnv "API_TARGET_GROUP_ARN"}} resources: diff --git a/helmfile/overrides/notify/document-download.yaml.gotmpl b/helmfile/overrides/notify/document-download.yaml.gotmpl index 27fbbbf4b..8cc61aa16 100644 --- a/helmfile/overrides/notify/document-download.yaml.gotmpl +++ b/helmfile/overrides/notify/document-download.yaml.gotmpl @@ -21,7 +21,7 @@ serviceAccount: eks.amazonaws.com/role-arn: arn:aws:iam::{{ requiredEnv "AWS_ACCOUNT_ID" }}:role/document-download-eks-role targetGroupBinding: - enabled: {{ if eq .Environment.Name "production" }} false {{ else if eq .Environment.Name "staging" }} false {{ else }} false {{ end }} + enabled: {{ if eq .Environment.Name "production" }} false {{ else if eq .Environment.Name "staging" }} true {{ else }} true {{ end }} targetGroupARN: {{requiredEnv "DOCUMENT_DOWNLOAD_API_TARGET_GROUP_ARN"}} resources: diff --git a/helmfile/overrides/notify/documentation.yaml.gotmpl b/helmfile/overrides/notify/documentation.yaml.gotmpl index a91c1f907..24da8cb7c 100644 --- a/helmfile/overrides/notify/documentation.yaml.gotmpl +++ b/helmfile/overrides/notify/documentation.yaml.gotmpl @@ -2,7 +2,7 @@ image: tag: "910f947" targetGroupBinding: - enabled: {{ if eq .Environment.Name "production" }} false {{ else if eq .Environment.Name "staging" }} false {{ else }} false {{ end }} + enabled: {{ if eq .Environment.Name "production" }} false {{ else if eq .Environment.Name "staging" }} true {{ else }} true {{ end }} targetGroupARN: {{requiredEnv "DOCUMENTATION_TARGET_GROUP_ARN"}} pdb: From 87d6b71a1b0625d593847ea52d4244b9a4d95626 Mon Sep 17 00:00:00 2001 From: Michael Pond Date: Tue, 3 Dec 2024 14:44:45 -0500 Subject: [PATCH 02/11] adding dummy services back to celery so that our metrics can read them --- .../notify-celery/templates/service.yaml | 22 +++++++++++++++++++ helmfile/charts/notify-celery/values.yaml | 18 ++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 helmfile/charts/notify-celery/templates/service.yaml diff --git a/helmfile/charts/notify-celery/templates/service.yaml b/helmfile/charts/notify-celery/templates/service.yaml new file mode 100644 index 000000000..56d9e1c9a --- /dev/null +++ b/helmfile/charts/notify-celery/templates/service.yaml @@ -0,0 +1,22 @@ +{{- range $node := .Values.nodes }} +{{- with $ -}} +{{ if $node.service.serviceEnabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "celery.fullname" . }}-{{ $node.name }} + labels: + app: {{ include "celery.fullname" . }}-{{ $node.name }} + namespace: notification-canada-ca +spec: + type: ClusterIP + # Putting a dummy port because we need to specify ports + ports: + - port: 80 + targetPort: 80 + selector: + app: notify-celery-{{ $node.name }} +{{- end }} +{{- end }} +--- +{{- end }} diff --git a/helmfile/charts/notify-celery/values.yaml b/helmfile/charts/notify-celery/values.yaml index c788c27b3..022e9c6c9 100644 --- a/helmfile/charts/notify-celery/values.yaml +++ b/helmfile/charts/notify-celery/values.yaml @@ -58,6 +58,8 @@ nodes: pdbEnabled: false autoscaling: hpaEnabled: false + service: + serviceEnabled: true other-beat: name: beat newRelicAppName: "notification-celery-beat-dev" @@ -72,6 +74,8 @@ nodes: pdbEnabled: false autoscaling: hpaEnabled: false + service: + serviceEnabled: true # PRIMARY CONFIGS primary-main: name: primary @@ -96,6 +100,8 @@ nodes: minAvailable: 2 autoscaling: hpaEnabled: false + service: + serviceEnabled: true primary-email: name: email-send-primary newRelicAppName: "notification-celery-email-send-primary-dev" @@ -119,6 +125,8 @@ nodes: minAvailable: 2 autoscaling: hpaEnabled: false + service: + serviceEnabled: true primary-sms: name: sms-send-primary newRelicAppName: "notification-celery-sms-send-primary-dev" @@ -142,6 +150,8 @@ nodes: minAvailable: 2 autoscaling: hpaEnabled: false + service: + serviceEnabled: true # SCALABLE CONFIGS scalable-main: name: scalable @@ -171,6 +181,8 @@ nodes: pdb: pdbEnabled: true minAvailable: 2 + service: + serviceEnabled: true scalable-email: name: email-send-scalable newRelicAppName: "notification-celery-email-send-scalable-dev" @@ -199,6 +211,8 @@ nodes: pdb: pdbEnabled: true minAvailable: 2 + service: + serviceEnabled: true scalable-sms: name: sms-send-scalable newRelicAppName: "notification-celery-sms-send-scalable-dev" @@ -227,7 +241,9 @@ nodes: pdb: pdbEnabled: true minAvailable: 2 - + service: + serviceEnabled: true + image: repository: public.ecr.aws/cds-snc/notify-api pullPolicy: Always From bcf3e7d1528bce084746a3b53787dd9c482ed66a Mon Sep 17 00:00:00 2001 From: Michael Pond Date: Tue, 3 Dec 2024 15:05:58 -0500 Subject: [PATCH 03/11] just makign this consistent for rollout --- helmfile/overrides/notify/admin.yaml.gotmpl | 2 +- helmfile/overrides/notify/api.yaml.gotmpl | 2 +- helmfile/overrides/notify/document-download.yaml.gotmpl | 2 +- helmfile/overrides/notify/documentation.yaml.gotmpl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/helmfile/overrides/notify/admin.yaml.gotmpl b/helmfile/overrides/notify/admin.yaml.gotmpl index 9aa90ab0f..1bbbb5900 100644 --- a/helmfile/overrides/notify/admin.yaml.gotmpl +++ b/helmfile/overrides/notify/admin.yaml.gotmpl @@ -34,7 +34,7 @@ serviceAccount: eks.amazonaws.com/role-arn: arn:aws:iam::{{ requiredEnv "AWS_ACCOUNT_ID" }}:role/admin-eks-role targetGroupBinding: - enabled: {{ if eq .Environment.Name "production" }} false {{ else if eq .Environment.Name "staging" }} true {{ else }} true {{ end }} + enabled: {{ if eq .Environment.Name "production" }} true {{ else if eq .Environment.Name "staging" }} true {{ else }} true {{ end }} targetGroupARN: {{requiredEnv "ADMIN_TARGET_GROUP_ARN"}} resources: diff --git a/helmfile/overrides/notify/api.yaml.gotmpl b/helmfile/overrides/notify/api.yaml.gotmpl index eadf201c0..3d5bb5fbb 100644 --- a/helmfile/overrides/notify/api.yaml.gotmpl +++ b/helmfile/overrides/notify/api.yaml.gotmpl @@ -27,7 +27,7 @@ serviceAccount: eks.amazonaws.com/role-arn: arn:aws:iam::{{ requiredEnv "AWS_ACCOUNT_ID" }}:role/api-eks-role targetGroupBinding: - enabled: {{ if eq .Environment.Name "production" }} false {{ else if eq .Environment.Name "staging" }} true {{ else }} true {{ end }} + enabled: {{ if eq .Environment.Name "production" }} true {{ else if eq .Environment.Name "staging" }} true {{ else }} true {{ end }} targetGroupARN: {{requiredEnv "API_TARGET_GROUP_ARN"}} resources: diff --git a/helmfile/overrides/notify/document-download.yaml.gotmpl b/helmfile/overrides/notify/document-download.yaml.gotmpl index 8cc61aa16..02e8e8ffb 100644 --- a/helmfile/overrides/notify/document-download.yaml.gotmpl +++ b/helmfile/overrides/notify/document-download.yaml.gotmpl @@ -21,7 +21,7 @@ serviceAccount: eks.amazonaws.com/role-arn: arn:aws:iam::{{ requiredEnv "AWS_ACCOUNT_ID" }}:role/document-download-eks-role targetGroupBinding: - enabled: {{ if eq .Environment.Name "production" }} false {{ else if eq .Environment.Name "staging" }} true {{ else }} true {{ end }} + enabled: {{ if eq .Environment.Name "production" }} true {{ else if eq .Environment.Name "staging" }} true {{ else }} true {{ end }} targetGroupARN: {{requiredEnv "DOCUMENT_DOWNLOAD_API_TARGET_GROUP_ARN"}} resources: diff --git a/helmfile/overrides/notify/documentation.yaml.gotmpl b/helmfile/overrides/notify/documentation.yaml.gotmpl index 24da8cb7c..f8407ae9f 100644 --- a/helmfile/overrides/notify/documentation.yaml.gotmpl +++ b/helmfile/overrides/notify/documentation.yaml.gotmpl @@ -2,7 +2,7 @@ image: tag: "910f947" targetGroupBinding: - enabled: {{ if eq .Environment.Name "production" }} false {{ else if eq .Environment.Name "staging" }} true {{ else }} true {{ end }} + enabled: {{ if eq .Environment.Name "production" }} true {{ else if eq .Environment.Name "staging" }} true {{ else }} true {{ end }} targetGroupARN: {{requiredEnv "DOCUMENTATION_TARGET_GROUP_ARN"}} pdb: From 18f289acf36c5e3f4f520502af8bf2c6cf17f44d Mon Sep 17 00:00:00 2001 From: Michael Pond Date: Tue, 10 Dec 2024 10:49:33 -0500 Subject: [PATCH 04/11] fixing celery hpa --- helmfile/charts/notify-celery/templates/hpa.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helmfile/charts/notify-celery/templates/hpa.yaml b/helmfile/charts/notify-celery/templates/hpa.yaml index 9029fa9e3..bcf9207f1 100644 --- a/helmfile/charts/notify-celery/templates/hpa.yaml +++ b/helmfile/charts/notify-celery/templates/hpa.yaml @@ -27,7 +27,7 @@ spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment - name: celery-{{ $node.name }} + name: notify-celery-{{ $node.name }} {{- end }} --- {{- end }} From 075b794199450d832661cb626a4cfe0519c7ef88 Mon Sep 17 00:00:00 2001 From: Michael Pond Date: Tue, 10 Dec 2024 14:44:52 -0500 Subject: [PATCH 05/11] removing kustomize apply ins staging workflow --- .github/workflows/merge_to_main_staging.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge_to_main_staging.yaml b/.github/workflows/merge_to_main_staging.yaml index 788c29bf7..a91882ad5 100644 --- a/.github/workflows/merge_to_main_staging.yaml +++ b/.github/workflows/merge_to_main_staging.yaml @@ -77,9 +77,9 @@ jobs: run: | aws eks update-kubeconfig --name notification-canada-ca-staging-eks-cluster - - name: Apply changes - run: | - ./scripts/applyKube.sh env/staging --kubeconfig=/home/runner/.kube/config + # - name: Apply changes + # run: | + # ./scripts/applyKube.sh env/staging --kubeconfig=/home/runner/.kube/config - name: Check for env changes working-directory: env/staging From c9fb2c77a7a575fcf155d114addb6d7affb9fa7e Mon Sep 17 00:00:00 2001 From: Michael Pond Date: Tue, 10 Dec 2024 15:02:06 -0500 Subject: [PATCH 06/11] turning off kustomize deployments for our helm migrated components on dev, sandbox and staging --- .github/workflows/merge_to_main_staging.yaml | 6 +- env/dev/kustomization.yaml | 100 +++++++++---------- env/sandbox/kustomization.yaml | 98 +++++++++--------- env/staging/kustomization.yaml | 96 +++++++++--------- 4 files changed, 150 insertions(+), 150 deletions(-) diff --git a/.github/workflows/merge_to_main_staging.yaml b/.github/workflows/merge_to_main_staging.yaml index a91882ad5..788c29bf7 100644 --- a/.github/workflows/merge_to_main_staging.yaml +++ b/.github/workflows/merge_to_main_staging.yaml @@ -77,9 +77,9 @@ jobs: run: | aws eks update-kubeconfig --name notification-canada-ca-staging-eks-cluster - # - name: Apply changes - # run: | - # ./scripts/applyKube.sh env/staging --kubeconfig=/home/runner/.kube/config + - name: Apply changes + run: | + ./scripts/applyKube.sh env/staging --kubeconfig=/home/runner/.kube/config - name: Check for env changes working-directory: env/staging diff --git a/env/dev/kustomization.yaml b/env/dev/kustomization.yaml index 34c168844..75a49f70b 100644 --- a/env/dev/kustomization.yaml +++ b/env/dev/kustomization.yaml @@ -5,23 +5,23 @@ resources: - fluentbit.yaml - cwagent.yaml - cwagent-configmap.yaml - - notification-service-account.yaml - - api-target-group.yaml - - admin-target-group.yaml - - document-download-api-target-group.yaml - - documentation-target-group.yaml + # - notification-service-account.yaml + # - api-target-group.yaml + # - admin-target-group.yaml + # - document-download-api-target-group.yaml + # - documentation-target-group.yaml - ../../base/prometheus-cloudwatch - - ../../base/notify-admin - - ../../base/notify-api - - ../../base/notify-celery-other - - ../../base/notify-celery-main-primary - - ../../base/notify-celery-sms-send-primary - - ../../base/notify-celery-email-send-primary - - ../../base/notify-celery-main-scalable - - ../../base/notify-celery-sms-send-scalable - - ../../base/notify-celery-email-send-scalable - - ../../base/notify-document-download - - ../../base/notify-documentation + # - ../../base/notify-admin + # - ../../base/notify-api + # - ../../base/notify-celery-other + # - ../../base/notify-celery-main-primary + # - ../../base/notify-celery-sms-send-primary + # - ../../base/notify-celery-email-send-primary + # - ../../base/notify-celery-main-scalable + # - ../../base/notify-celery-sms-send-scalable + # - ../../base/notify-celery-email-send-scalable + # - ../../base/notify-document-download + # - ../../base/notify-documentation - ../../base/notify-system images: @@ -34,45 +34,45 @@ images: - name: documentation newName: public.ecr.aws/cds-snc/notify-documentation:latest -patches: - - path: performance/admin-hpa-patch.yaml - - path: performance/api-hpa-patch.yaml - - path: performance/celery-email-send-primary-deployment-patch.yaml - - path: performance/celery-email-send-scalable-deployment-patch.yaml - - path: performance/celery-email-send-scalable-hpa-patch.yaml - - path: performance/celery-primary-deployment-patch.yaml - - path: performance/celery-scalable-deployment-patch.yaml - - path: performance/celery-scalable-hpa-patch.yaml - - path: performance/celery-sms-send-primary-deployment-patch.yaml - - path: performance/celery-sms-send-scalable-deployment-patch.yaml - - path: performance/celery-sms-send-scalable-hpa-patch.yaml +# patches: +# - path: performance/admin-hpa-patch.yaml +# - path: performance/api-hpa-patch.yaml +# - path: performance/celery-email-send-primary-deployment-patch.yaml +# - path: performance/celery-email-send-scalable-deployment-patch.yaml +# - path: performance/celery-email-send-scalable-hpa-patch.yaml +# - path: performance/celery-primary-deployment-patch.yaml +# - path: performance/celery-scalable-deployment-patch.yaml +# - path: performance/celery-scalable-hpa-patch.yaml +# - path: performance/celery-sms-send-primary-deployment-patch.yaml +# - path: performance/celery-sms-send-scalable-deployment-patch.yaml +# - path: performance/celery-sms-send-scalable-hpa-patch.yaml - - path: services/admin-service-patch.yaml - - path: services/api-service-patch.yaml - - path: services/document-download-api-service-patch.yaml - - path: services/documentation-service-patch.yaml +# - path: services/admin-service-patch.yaml +# - path: services/api-service-patch.yaml +# - path: services/document-download-api-service-patch.yaml +# - path: services/documentation-service-patch.yaml - path: cwagent/cwagent-deployment-patch.yaml - - path: nodeselectors/admin-node-selector-patch.yaml - - path: nodeselectors/celery-api-node-selector-patch.yaml - - path: nodeselectors/celery-beat-node-selector-patch.yaml - - path: nodeselectors/celery-email-send-node-selector-patch.yaml - - path: nodeselectors/celery-email-send-scalable-node-selector-patch.yaml - - path: nodeselectors/celery-primary-node-selector-patch.yaml - - path: nodeselectors/celery-scalable-node-selector-patch.yaml - - path: nodeselectors/celery-sms-node-selector-patch.yaml - - path: nodeselectors/celery-sms-send-node-selector-patch.yaml - - path: nodeselectors/celery-sms-send-scalable-node-selector-patch.yaml - - path: nodeselectors/document-download-api-node-selector-patch.yaml - - path: nodeselectors/documentation-node-selector-patch.yaml +# - path: nodeselectors/admin-node-selector-patch.yaml +# - path: nodeselectors/celery-api-node-selector-patch.yaml +# - path: nodeselectors/celery-beat-node-selector-patch.yaml +# - path: nodeselectors/celery-email-send-node-selector-patch.yaml +# - path: nodeselectors/celery-email-send-scalable-node-selector-patch.yaml +# - path: nodeselectors/celery-primary-node-selector-patch.yaml +# - path: nodeselectors/celery-scalable-node-selector-patch.yaml +# - path: nodeselectors/celery-sms-node-selector-patch.yaml +# - path: nodeselectors/celery-sms-send-node-selector-patch.yaml +# - path: nodeselectors/celery-sms-send-scalable-node-selector-patch.yaml +# - path: nodeselectors/document-download-api-node-selector-patch.yaml +# - path: nodeselectors/documentation-node-selector-patch.yaml - - path: celery-init-delete/celery-email-send-primary-init-delete-patch.yaml - - path: celery-init-delete/celery-email-send-scalable-init-delete-patch.yaml - - path: celery-init-delete/celery-primary-init-delete-patch.yaml - - path: celery-init-delete/celery-scalable-init-delete-patch.yaml - - path: celery-init-delete/celery-sms-send-primary-init-delete-patch.yaml - - path: celery-init-delete/celery-sms-send-scalable-init-delete-patch.yaml +# - path: celery-init-delete/celery-email-send-primary-init-delete-patch.yaml +# - path: celery-init-delete/celery-email-send-scalable-init-delete-patch.yaml +# - path: celery-init-delete/celery-primary-init-delete-patch.yaml +# - path: celery-init-delete/celery-scalable-init-delete-patch.yaml +# - path: celery-init-delete/celery-sms-send-primary-init-delete-patch.yaml +# - path: celery-init-delete/celery-sms-send-scalable-init-delete-patch.yaml configMapGenerator: - envs: diff --git a/env/sandbox/kustomization.yaml b/env/sandbox/kustomization.yaml index defee7a36..6c63d171b 100644 --- a/env/sandbox/kustomization.yaml +++ b/env/sandbox/kustomization.yaml @@ -5,24 +5,24 @@ resources: - fluentbit.yaml - cwagent.yaml - cwagent-configmap.yaml - - notification-service-account.yaml - - api-target-group.yaml - - admin-target-group.yaml - - document-download-api-target-group.yaml - - documentation-target-group.yaml + # - notification-service-account.yaml + # - api-target-group.yaml + # - admin-target-group.yaml + # - document-download-api-target-group.yaml + # - documentation-target-group.yaml - aws-auth-configmap.yaml - ../../base/prometheus-cloudwatch - - ../../base/notify-admin - - ../../base/notify-api - - ../../base/notify-celery-other - - ../../base/notify-celery-main-primary - - ../../base/notify-celery-sms-send-primary - - ../../base/notify-celery-email-send-primary - - ../../base/notify-celery-main-scalable - - ../../base/notify-celery-sms-send-scalable - - ../../base/notify-celery-email-send-scalable - - ../../base/notify-document-download - - ../../base/notify-documentation + # - ../../base/notify-admin + # - ../../base/notify-api + # - ../../base/notify-celery-other + # - ../../base/notify-celery-main-primary + # - ../../base/notify-celery-sms-send-primary + # - ../../base/notify-celery-email-send-primary + # - ../../base/notify-celery-main-scalable + # - ../../base/notify-celery-sms-send-scalable + # - ../../base/notify-celery-email-send-scalable + # - ../../base/notify-document-download + # - ../../base/notify-documentation - ../../base/notify-system images: @@ -36,44 +36,44 @@ images: newName: public.ecr.aws/cds-snc/notify-documentation:latest patches: - - path: performance/admin-hpa-patch.yaml - - path: performance/api-hpa-patch.yaml - - path: performance/celery-email-send-primary-deployment-patch.yaml - - path: performance/celery-email-send-scalable-deployment-patch.yaml - - path: performance/celery-email-send-scalable-hpa-patch.yaml - - path: performance/celery-primary-deployment-patch.yaml - - path: performance/celery-scalable-deployment-patch.yaml - - path: performance/celery-scalable-hpa-patch.yaml - - path: performance/celery-sms-send-primary-deployment-patch.yaml - - path: performance/celery-sms-send-scalable-deployment-patch.yaml - - path: performance/celery-sms-send-scalable-hpa-patch.yaml + # - path: performance/admin-hpa-patch.yaml + # - path: performance/api-hpa-patch.yaml + # - path: performance/celery-email-send-primary-deployment-patch.yaml + # - path: performance/celery-email-send-scalable-deployment-patch.yaml + # - path: performance/celery-email-send-scalable-hpa-patch.yaml + # - path: performance/celery-primary-deployment-patch.yaml + # - path: performance/celery-scalable-deployment-patch.yaml + # - path: performance/celery-scalable-hpa-patch.yaml + # - path: performance/celery-sms-send-primary-deployment-patch.yaml + # - path: performance/celery-sms-send-scalable-deployment-patch.yaml + # - path: performance/celery-sms-send-scalable-hpa-patch.yaml - - path: services/admin-service-patch.yaml - - path: services/api-service-patch.yaml - - path: services/document-download-api-service-patch.yaml - - path: services/documentation-service-patch.yaml + # - path: services/admin-service-patch.yaml + # - path: services/api-service-patch.yaml + # - path: services/document-download-api-service-patch.yaml + # - path: services/documentation-service-patch.yaml - path: cwagent/cwagent-deployment-patch.yaml - - path: nodeselectors/admin-node-selector-patch.yaml - - path: nodeselectors/celery-api-node-selector-patch.yaml - - path: nodeselectors/celery-beat-node-selector-patch.yaml - - path: nodeselectors/celery-email-send-node-selector-patch.yaml - - path: nodeselectors/celery-email-send-scalable-node-selector-patch.yaml - - path: nodeselectors/celery-primary-node-selector-patch.yaml - - path: nodeselectors/celery-scalable-node-selector-patch.yaml - - path: nodeselectors/celery-sms-node-selector-patch.yaml - - path: nodeselectors/celery-sms-send-node-selector-patch.yaml - - path: nodeselectors/celery-sms-send-scalable-node-selector-patch.yaml - - path: nodeselectors/document-download-api-node-selector-patch.yaml - - path: nodeselectors/documentation-node-selector-patch.yaml + # - path: nodeselectors/admin-node-selector-patch.yaml + # - path: nodeselectors/celery-api-node-selector-patch.yaml + # - path: nodeselectors/celery-beat-node-selector-patch.yaml + # - path: nodeselectors/celery-email-send-node-selector-patch.yaml + # - path: nodeselectors/celery-email-send-scalable-node-selector-patch.yaml + # - path: nodeselectors/celery-primary-node-selector-patch.yaml + # - path: nodeselectors/celery-scalable-node-selector-patch.yaml + # - path: nodeselectors/celery-sms-node-selector-patch.yaml + # - path: nodeselectors/celery-sms-send-node-selector-patch.yaml + # - path: nodeselectors/celery-sms-send-scalable-node-selector-patch.yaml + # - path: nodeselectors/document-download-api-node-selector-patch.yaml + # - path: nodeselectors/documentation-node-selector-patch.yaml - - path: celery-init-delete/celery-email-send-primary-init-delete-patch.yaml - - path: celery-init-delete/celery-email-send-scalable-init-delete-patch.yaml - - path: celery-init-delete/celery-primary-init-delete-patch.yaml - - path: celery-init-delete/celery-scalable-init-delete-patch.yaml - - path: celery-init-delete/celery-sms-send-primary-init-delete-patch.yaml - - path: celery-init-delete/celery-sms-send-scalable-init-delete-patch.yaml + # - path: celery-init-delete/celery-email-send-primary-init-delete-patch.yaml + # - path: celery-init-delete/celery-email-send-scalable-init-delete-patch.yaml + # - path: celery-init-delete/celery-primary-init-delete-patch.yaml + # - path: celery-init-delete/celery-scalable-init-delete-patch.yaml + # - path: celery-init-delete/celery-sms-send-primary-init-delete-patch.yaml + # - path: celery-init-delete/celery-sms-send-scalable-init-delete-patch.yaml configMapGenerator: - envs: diff --git a/env/staging/kustomization.yaml b/env/staging/kustomization.yaml index b12e4f64b..9c91d395c 100644 --- a/env/staging/kustomization.yaml +++ b/env/staging/kustomization.yaml @@ -5,64 +5,64 @@ resources: - fluentbit.yaml - cwagent.yaml - cwagent-configmap.yaml - - notification-service-account.yaml - - api-target-group.yaml - - admin-target-group.yaml - - document-download-api-target-group.yaml - - documentation-target-group.yaml + # - notification-service-account.yaml + # - api-target-group.yaml + # - admin-target-group.yaml + # - document-download-api-target-group.yaml + # - documentation-target-group.yaml - aws-auth-configmap.yaml - ../../base/prometheus-cloudwatch - - ../../base/notify-admin - - ../../base/notify-api - - ../../base/notify-celery-other - - ../../base/notify-celery-main-primary - - ../../base/notify-celery-sms-send-primary - - ../../base/notify-celery-email-send-primary - - ../../base/notify-celery-main-scalable - - ../../base/notify-celery-sms-send-scalable - - ../../base/notify-celery-email-send-scalable - - ../../base/notify-document-download - - ../../base/notify-documentation + # - ../../base/notify-admin + # - ../../base/notify-api + # - ../../base/notify-celery-other + # - ../../base/notify-celery-main-primary + # - ../../base/notify-celery-sms-send-primary + # - ../../base/notify-celery-email-send-primary + # - ../../base/notify-celery-main-scalable + # - ../../base/notify-celery-sms-send-scalable + # - ../../base/notify-celery-email-send-scalable + # - ../../base/notify-document-download + # - ../../base/notify-documentation - ../../base/notify-system patches: - - path: performance/admin-hpa-patch.yaml - - path: performance/admin-deployment-patch.yaml - - path: performance/api-hpa-patch.yaml - - path: performance/api-deployment-patch.yaml - - path: performance/celery-email-send-primary-deployment-patch.yaml - - path: performance/celery-email-send-scalable-deployment-patch.yaml - - path: performance/celery-email-send-scalable-hpa-patch.yaml - - path: performance/celery-primary-deployment-patch.yaml - - path: performance/celery-scalable-deployment-patch.yaml - - path: performance/celery-scalable-hpa-patch.yaml - - path: performance/celery-sms-send-primary-deployment-patch.yaml - - path: performance/celery-sms-send-scalable-deployment-patch.yaml - - path: performance/celery-sms-send-scalable-hpa-patch.yaml - - path: performance/document-download-api-hpa-patch.yaml - - path: performance/documentation-deployment-patch.yaml + # - path: performance/admin-hpa-patch.yaml + # - path: performance/admin-deployment-patch.yaml + # - path: performance/api-hpa-patch.yaml + # - path: performance/api-deployment-patch.yaml + # - path: performance/celery-email-send-primary-deployment-patch.yaml + # - path: performance/celery-email-send-scalable-deployment-patch.yaml + # - path: performance/celery-email-send-scalable-hpa-patch.yaml + # - path: performance/celery-primary-deployment-patch.yaml + # - path: performance/celery-scalable-deployment-patch.yaml + # - path: performance/celery-scalable-hpa-patch.yaml + # - path: performance/celery-sms-send-primary-deployment-patch.yaml + # - path: performance/celery-sms-send-scalable-deployment-patch.yaml + # - path: performance/celery-sms-send-scalable-hpa-patch.yaml + # - path: performance/document-download-api-hpa-patch.yaml + # - path: performance/documentation-deployment-patch.yaml - - path: services/admin-service-patch.yaml - - path: services/api-service-patch.yaml - - path: services/document-download-api-service-patch.yaml - - path: services/documentation-service-patch.yaml + # - path: services/admin-service-patch.yaml + # - path: services/api-service-patch.yaml + # - path: services/document-download-api-service-patch.yaml + # - path: services/documentation-service-patch.yaml - path: cwagent/cwagent-deployment-patch.yaml - - path: nodeselectors/admin-node-selector-patch.yaml - - path: nodeselectors/api-node-selector-patch.yaml - - path: nodeselectors/celery-api-node-selector-patch.yaml - - path: nodeselectors/celery-beat-node-selector-patch.yaml - - path: nodeselectors/celery-email-send-node-selector-patch.yaml - - path: nodeselectors/celery-email-send-scalable-node-selector-patch.yaml - - path: nodeselectors/celery-primary-node-selector-patch.yaml - - path: nodeselectors/celery-scalable-node-selector-patch.yaml - - path: nodeselectors/celery-sms-node-selector-patch.yaml - - path: nodeselectors/celery-sms-send-node-selector-patch.yaml - - path: nodeselectors/celery-sms-send-scalable-node-selector-patch.yaml - - path: nodeselectors/document-download-api-node-selector-patch.yaml - - path: nodeselectors/documentation-node-selector-patch.yaml + # - path: nodeselectors/admin-node-selector-patch.yaml + # - path: nodeselectors/api-node-selector-patch.yaml + # - path: nodeselectors/celery-api-node-selector-patch.yaml + # - path: nodeselectors/celery-beat-node-selector-patch.yaml + # - path: nodeselectors/celery-email-send-node-selector-patch.yaml + # - path: nodeselectors/celery-email-send-scalable-node-selector-patch.yaml + # - path: nodeselectors/celery-primary-node-selector-patch.yaml + # - path: nodeselectors/celery-scalable-node-selector-patch.yaml + # - path: nodeselectors/celery-sms-node-selector-patch.yaml + # - path: nodeselectors/celery-sms-send-node-selector-patch.yaml + # - path: nodeselectors/celery-sms-send-scalable-node-selector-patch.yaml + # - path: nodeselectors/document-download-api-node-selector-patch.yaml + # - path: nodeselectors/documentation-node-selector-patch.yaml images: - name: admin From f08f30f0622c069f4bb9a28081bd51f320ea029a Mon Sep 17 00:00:00 2001 From: Ben Larabie Date: Thu, 12 Dec 2024 11:40:56 -0500 Subject: [PATCH 07/11] fixing xray url --- helmfile/charts/notify-celery/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helmfile/charts/notify-celery/values.yaml b/helmfile/charts/notify-celery/values.yaml index 022e9c6c9..199742e35 100644 --- a/helmfile/charts/notify-celery/values.yaml +++ b/helmfile/charts/notify-celery/values.yaml @@ -21,7 +21,7 @@ celeryCommon: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED: true NEW_RELIC_MONITOR_MODE: false AWS_XRAY_CONTEXT_MISSING: "LOG_WARNING" - AWS_XRAY_DAEMON_ADDRESS: "xray-daemon.notification-canada-ca.svc.cluster.local:2000" + AWS_XRAY_DAEMON_ADDRESS: "xray-daemon.xray.svc.cluster.local:2000" AWS_XRAY_SDK_ENABLED: true ASSET_DOMAIN: "assets.dev.notification.cdssandbox.xyz" BATCH_INSERTION_CHUNK_SIZE: "10" From 9cbdebdef3836af0271d322187241ae6f1f097cc Mon Sep 17 00:00:00 2001 From: Ben Larabie Date: Thu, 12 Dec 2024 11:43:46 -0500 Subject: [PATCH 08/11] cleaning up env vars thing --- .github/workflows/test_env_vars.yaml | 35 ++++------------------------ 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/.github/workflows/test_env_vars.yaml b/.github/workflows/test_env_vars.yaml index 56024d0dc..ea235652b 100644 --- a/.github/workflows/test_env_vars.yaml +++ b/.github/workflows/test_env_vars.yaml @@ -4,9 +4,13 @@ on: pull_request: branches: - main + paths: + - "VERSION" push: branches: - main + paths: + - "VERSION" defaults: run: @@ -32,20 +36,6 @@ jobs: aws-secret-access-key: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }} aws-region: ca-central-1 - - name: Get staging env var keys - run: | - make decrypt-staging - ENV_KEYS_STAGING="$(make env-keys-staging)" - echo "::add-mask::$ENV_KEYS_STAGING" - echo "ENV_KEYS_STAGING=$ENV_KEYS_STAGING" >> $GITHUB_ENV - - - name: Configure AWS production credentials - uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0 - with: - aws-access-key-id: ${{ secrets.PRODUCTION_AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.PRODUCTION_AWS_SECRET_ACCESS_KEY }} - aws-region: ca-central-1 - - name: Get production env var keys run: | make decrypt-production @@ -53,14 +43,6 @@ jobs: echo "::add-mask::$ENV_KEYS_PRODUCTION" echo "ENV_KEYS_PRODUCTION=$ENV_KEYS_PRODUCTION" >> $GITHUB_ENV - - name: Test example and staging env vars - uses: ./.github/actions/diff-env-vars - with: - env1-name: EXAMPLE - env1-vars: ${{ env.ENV_KEYS_EXAMPLE }} - env2-name: STAGING - env2-vars: ${{ env.ENV_KEYS_STAGING }} - - name: Test example and production env vars uses: ./.github/actions/diff-env-vars if: always() @@ -69,12 +51,3 @@ jobs: env1-vars: ${{ env.ENV_KEYS_EXAMPLE }} env2-name: PRODUCTION env2-vars: ${{ env.ENV_KEYS_PRODUCTION }} - - - name: Test staging and production env vars - uses: ./.github/actions/diff-env-vars - if: always() - with: - env1-name: STAGING - env1-vars: ${{ env.ENV_KEYS_STAGING }} - env2-name: PRODUCTION - env2-vars: ${{ env.ENV_KEYS_PRODUCTION }} From c22dbbd0fa22ff2ed7698a5d16635795eec4c135 Mon Sep 17 00:00:00 2001 From: Ben Larabie Date: Thu, 12 Dec 2024 11:45:15 -0500 Subject: [PATCH 09/11] removing syntax check since helmfile auto does it --- .github/workflows/syntax_check.yaml | 30 ----------------------------- 1 file changed, 30 deletions(-) delete mode 100644 .github/workflows/syntax_check.yaml diff --git a/.github/workflows/syntax_check.yaml b/.github/workflows/syntax_check.yaml deleted file mode 100644 index cd82011bc..000000000 --- a/.github/workflows/syntax_check.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: Testing Staging Manifest - -on: - - pull_request - -jobs: - testing_manifest: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - - # I'm cheating and using this action to install kubectl - - name: Setup helmfile - uses: mamezou-tech/setup-helmfile@03233e1cd9b19b2ba320e431f7bcc0618db4248d # v2.0.0 - with: - install-kubectl: yes - install-helm: yes - - - name: Add fake .env - run: | - cp env.example env/staging/.env - - - name: Test staging manifest build - uses: ./.github/actions/test-manifest - if: always() - with: - build-target: staging-debug - echo-manifest: true \ No newline at end of file From beca1fa324789ca258bffcf5b7b140447c99b425 Mon Sep 17 00:00:00 2001 From: Ben Larabie Date: Thu, 12 Dec 2024 11:54:18 -0500 Subject: [PATCH 10/11] switch to helmfile sync --- .github/workflows/helmfile_production_apply.yaml | 2 +- .github/workflows/helmfile_staging_apply.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/helmfile_production_apply.yaml b/.github/workflows/helmfile_production_apply.yaml index cfe8de348..e74a08815 100644 --- a/.github/workflows/helmfile_production_apply.yaml +++ b/.github/workflows/helmfile_production_apply.yaml @@ -84,7 +84,7 @@ jobs: id: helmfile_apply run: | pushd helmfile - helmfile --environment production apply + helmfile --environment production sync popd - name: Notify Slack channel if this job failed diff --git a/.github/workflows/helmfile_staging_apply.yaml b/.github/workflows/helmfile_staging_apply.yaml index 354a2a760..aeb336160 100644 --- a/.github/workflows/helmfile_staging_apply.yaml +++ b/.github/workflows/helmfile_staging_apply.yaml @@ -82,7 +82,7 @@ jobs: id: helmfile_apply run: | pushd helmfile - helmfile --environment staging apply + helmfile --environment staging sync popd - name: Notify Slack channel if this job failed From 15dcb8b56a7b41a2651add2a46182173e8a4bbc7 Mon Sep 17 00:00:00 2001 From: Ben Larabie Date: Thu, 12 Dec 2024 12:00:47 -0500 Subject: [PATCH 11/11] xray url fix again --- helmfile/charts/notify-celery/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helmfile/charts/notify-celery/values.yaml b/helmfile/charts/notify-celery/values.yaml index 199742e35..972cb1518 100644 --- a/helmfile/charts/notify-celery/values.yaml +++ b/helmfile/charts/notify-celery/values.yaml @@ -21,7 +21,7 @@ celeryCommon: NEW_RELIC_DISTRIBUTED_TRACING_ENABLED: true NEW_RELIC_MONITOR_MODE: false AWS_XRAY_CONTEXT_MISSING: "LOG_WARNING" - AWS_XRAY_DAEMON_ADDRESS: "xray-daemon.xray.svc.cluster.local:2000" + AWS_XRAY_DAEMON_ADDRESS: "xray-daemon-aws-xray.xray.svc.cluster.local:2000" AWS_XRAY_SDK_ENABLED: true ASSET_DOMAIN: "assets.dev.notification.cdssandbox.xyz" BATCH_INSERTION_CHUNK_SIZE: "10"