From 2eb632d94a1302173503a0ad75172ab0eeb7b975 Mon Sep 17 00:00:00 2001 From: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:45:20 -0700 Subject: [PATCH 01/11] Adjust CPU limit to reduce throttling Signed-off-by: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> --- openshift/templates/issuer-agent/issuer-agent-deploy.a2a.param | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openshift/templates/issuer-agent/issuer-agent-deploy.a2a.param b/openshift/templates/issuer-agent/issuer-agent-deploy.a2a.param index 893b172..d4a5e0a 100644 --- a/openshift/templates/issuer-agent/issuer-agent-deploy.a2a.param +++ b/openshift/templates/issuer-agent/issuer-agent-deploy.a2a.param @@ -54,6 +54,6 @@ ACAPY_TAILS_SERVER_BASE_URL=https://tails-dev.vonx.io MIN_REPLICAS=1 MAX_REPLICAS=2 CPU_REQUEST=10m -CPU_LIMIT=500m +CPU_LIMIT=800m MEMORY_REQUEST=10Mi MEMORY_LIMIT=512Mi From a7a0b30522338e9e8a611684e4475f3d09be907a Mon Sep 17 00:00:00 2001 From: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:21:12 -0700 Subject: [PATCH 02/11] Adjust resources Signed-off-by: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> --- services/traction/charts/dev/values.yaml | 2 +- services/traction/charts/prod/values.yaml | 4 ++-- services/traction/charts/test/values.yaml | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/services/traction/charts/dev/values.yaml b/services/traction/charts/dev/values.yaml index 9280a2d..88d57a9 100644 --- a/services/traction/charts/dev/values.yaml +++ b/services/traction/charts/dev/values.yaml @@ -75,7 +75,7 @@ traction: network.openshift.io/policy-group: ingress resources: limits: - cpu: 500m + cpu: 800m tenant_proxy: image: tag: sha-c6abd7a diff --git a/services/traction/charts/prod/values.yaml b/services/traction/charts/prod/values.yaml index 13ae0af..f91777d 100644 --- a/services/traction/charts/prod/values.yaml +++ b/services/traction/charts/prod/values.yaml @@ -38,10 +38,10 @@ traction: network.openshift.io/policy-group: ingress resources: limits: - cpu: 400m + cpu: 1 memory: 500Mi requests: - cpu: 120m + cpu: 250m memory: 250Mi autoscaling: enabled: true diff --git a/services/traction/charts/test/values.yaml b/services/traction/charts/test/values.yaml index fc8f45e..a38699e 100644 --- a/services/traction/charts/test/values.yaml +++ b/services/traction/charts/test/values.yaml @@ -62,6 +62,9 @@ traction: maxReplicas: 5 targetCPUUtilizationPercentage: 80 targetMemoryUtilizationPercentage: 80 + resources: + limits: + cpu: 800m tenant_proxy: image: pullPolicy: Always From 30054f6937ccdad93836ab98d6992bbcd57f7228 Mon Sep 17 00:00:00 2001 From: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:26:29 -0700 Subject: [PATCH 03/11] adjust cpu limits Signed-off-by: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> --- helm-values/vc-authn-oidc/dev.yaml | 5 +++++ services/vc-authn-oidc/charts/dev/values.yaml | 3 +++ 2 files changed, 8 insertions(+) diff --git a/helm-values/vc-authn-oidc/dev.yaml b/helm-values/vc-authn-oidc/dev.yaml index 35ecff5..03eda56 100644 --- a/helm-values/vc-authn-oidc/dev.yaml +++ b/helm-values/vc-authn-oidc/dev.yaml @@ -111,3 +111,8 @@ mongodb: livenessProbe: enabled: true timeoutSeconds: 10 +postgresql: + primary: + resources: + limits: + cpu: 800m diff --git a/services/vc-authn-oidc/charts/dev/values.yaml b/services/vc-authn-oidc/charts/dev/values.yaml index b719709..6249359 100644 --- a/services/vc-authn-oidc/charts/dev/values.yaml +++ b/services/vc-authn-oidc/charts/dev/values.yaml @@ -138,3 +138,6 @@ vc-authn-oidc: primary: persistence: size: 5Gi + resources: + limits: + cpu: 800m From 72926d93bcc83d9a5b2a8da60e1f6eae1bbbc2e6 Mon Sep 17 00:00:00 2001 From: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:23:10 -0700 Subject: [PATCH 04/11] adjust cpu limit, enable metrics Signed-off-by: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> --- helm-values/vc-authn-oidc/prod.yaml | 4 +++- services/vc-authn-oidc/charts/prod/values.yaml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/helm-values/vc-authn-oidc/prod.yaml b/helm-values/vc-authn-oidc/prod.yaml index fcd7233..2fa2852 100644 --- a/helm-values/vc-authn-oidc/prod.yaml +++ b/helm-values/vc-authn-oidc/prod.yaml @@ -94,11 +94,13 @@ acapy: mongodb: resources: limits: - cpu: 1 + cpu: 1600 memory: 1000Mi requests: cpu: 400m memory: 450Mi + metrics: + enabled: true readinessProbe: enabled: true timeoutSeconds: 10 diff --git a/services/vc-authn-oidc/charts/prod/values.yaml b/services/vc-authn-oidc/charts/prod/values.yaml index 34f7781..380d356 100644 --- a/services/vc-authn-oidc/charts/prod/values.yaml +++ b/services/vc-authn-oidc/charts/prod/values.yaml @@ -112,11 +112,13 @@ vc-authn-oidc: existingSecret: "vc-authn-oidc-mongodb" resources: limits: - cpu: 1 + cpu: 1600 memory: 1000Mi requests: cpu: 400m memory: 450Mi + metrics: + enabled: true readinessProbe: enabled: true timeoutSeconds: 10 From 5a54a8ff36afc2e5512cb1fe216142256b877ceb Mon Sep 17 00:00:00 2001 From: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:28:06 -0700 Subject: [PATCH 05/11] adjust cpu limits Signed-off-by: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> --- helm-values/vc-authn-oidc/prod.yaml | 7 +++++++ services/vc-authn-oidc/charts/prod/values.yaml | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/helm-values/vc-authn-oidc/prod.yaml b/helm-values/vc-authn-oidc/prod.yaml index 2fa2852..c172f3b 100644 --- a/helm-values/vc-authn-oidc/prod.yaml +++ b/helm-values/vc-authn-oidc/prod.yaml @@ -107,3 +107,10 @@ mongodb: livenessProbe: enabled: true timeoutSeconds: 10 + +postgresql: + primary: + resources: + limits: + cpu: 700m + memory: 2600Mi diff --git a/services/vc-authn-oidc/charts/prod/values.yaml b/services/vc-authn-oidc/charts/prod/values.yaml index 380d356..78d69d7 100644 --- a/services/vc-authn-oidc/charts/prod/values.yaml +++ b/services/vc-authn-oidc/charts/prod/values.yaml @@ -132,3 +132,7 @@ vc-authn-oidc: primary: persistence: size: 5Gi + resources: + limits: + cpu: 700m + memory: 2600Mi From 7991dbe89a5281f84c1bf61c06750ac0c55656a2 Mon Sep 17 00:00:00 2001 From: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> Date: Wed, 24 Jul 2024 09:45:14 -0700 Subject: [PATCH 06/11] adjust cpu limits Signed-off-by: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> --- services/vc-authn-oidc/charts/test/values.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/vc-authn-oidc/charts/test/values.yaml b/services/vc-authn-oidc/charts/test/values.yaml index fa7ecfc..d43f70a 100644 --- a/services/vc-authn-oidc/charts/test/values.yaml +++ b/services/vc-authn-oidc/charts/test/values.yaml @@ -137,6 +137,9 @@ vc-authn-oidc: auth: existingSecret: "vc-authn-oidc-postgresql" primary: + resources: + limits: + cpu: 600m persistence: size: 5Gi metrics: From 1bd28230ca384a04f2cd0680485909e3c7d6fde9 Mon Sep 17 00:00:00 2001 From: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> Date: Fri, 26 Jul 2024 01:07:36 -0700 Subject: [PATCH 07/11] Add list all changes step for debugging Signed-off-by: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> --- .github/workflows/gitops_sync.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gitops_sync.yaml b/.github/workflows/gitops_sync.yaml index 1ddcc63..b44dfc7 100644 --- a/.github/workflows/gitops_sync.yaml +++ b/.github/workflows/gitops_sync.yaml @@ -18,12 +18,19 @@ jobs: uses: tj-actions/changed-files@v44 with: files: services/*.* + - name: List all changed files + env: + ALL_CHANGED_FILES: ${{ steps.gitops-changes.outputs.all_changed_files }} + run: | + for file in ${ALL_CHANGED_FILES}; do + echo "$file was changed" + done sync_changes: runs-on: ubuntu-latest needs: - changed_files - if: needs.changed_files.outputs.any_changed == 'true' && (github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch') + if: needs.changed_files.outputs.any_changed == 'true' steps: - uses: actions/checkout@v4 From 8aba9d70d9f969f6d28cf0b1fedf799fb9f6d344 Mon Sep 17 00:00:00 2001 From: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> Date: Fri, 26 Jul 2024 01:08:54 -0700 Subject: [PATCH 08/11] remove image tag from test values Signed-off-by: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> --- services/vc-authn-oidc/charts/test/values.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/services/vc-authn-oidc/charts/test/values.yaml b/services/vc-authn-oidc/charts/test/values.yaml index d43f70a..063c4c6 100644 --- a/services/vc-authn-oidc/charts/test/values.yaml +++ b/services/vc-authn-oidc/charts/test/values.yaml @@ -4,7 +4,6 @@ vc-authn-oidc: image: repository: ghcr.io/bcgov/vc-authn-oidc pullPolicy: IfNotPresent - tag: sha-46e31f6 acapyTenancyMode: single setNonRevoked: true From 9c7710775f0f95714602263dbe457937c55b5a48 Mon Sep 17 00:00:00 2001 From: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> Date: Fri, 26 Jul 2024 01:17:13 -0700 Subject: [PATCH 09/11] modify step for debugging Signed-off-by: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> --- .github/workflows/gitops_sync.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gitops_sync.yaml b/.github/workflows/gitops_sync.yaml index b44dfc7..4ae066c 100644 --- a/.github/workflows/gitops_sync.yaml +++ b/.github/workflows/gitops_sync.yaml @@ -13,11 +13,13 @@ jobs: any_changed: ${{ steps.gitops-changes.outputs.any_changed }} steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Scan services directory id: gitops-changes uses: tj-actions/changed-files@v44 with: - files: services/*.* + path: services - name: List all changed files env: ALL_CHANGED_FILES: ${{ steps.gitops-changes.outputs.all_changed_files }} From 5e85692887b17c97a982660624b0449df04e3554 Mon Sep 17 00:00:00 2001 From: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> Date: Fri, 26 Jul 2024 01:17:13 -0700 Subject: [PATCH 10/11] modify step for debugging Signed-off-by: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> --- .github/workflows/gitops_sync.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gitops_sync.yaml b/.github/workflows/gitops_sync.yaml index b44dfc7..4ae066c 100644 --- a/.github/workflows/gitops_sync.yaml +++ b/.github/workflows/gitops_sync.yaml @@ -13,11 +13,13 @@ jobs: any_changed: ${{ steps.gitops-changes.outputs.any_changed }} steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Scan services directory id: gitops-changes uses: tj-actions/changed-files@v44 with: - files: services/*.* + path: services - name: List all changed files env: ALL_CHANGED_FILES: ${{ steps.gitops-changes.outputs.all_changed_files }} From 2db517d75f6ff2971cc8f79c9a0a90b120de7e94 Mon Sep 17 00:00:00 2001 From: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> Date: Fri, 26 Jul 2024 01:40:12 -0700 Subject: [PATCH 11/11] Remove check for changes step Signed-off-by: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> --- .github/workflows/gitops_sync.yaml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/.github/workflows/gitops_sync.yaml b/.github/workflows/gitops_sync.yaml index 69ff834..cc8b34d 100644 --- a/.github/workflows/gitops_sync.yaml +++ b/.github/workflows/gitops_sync.yaml @@ -6,33 +6,8 @@ on: workflow_dispatch: jobs: - changed_files: - runs-on: ubuntu-latest - name: Check for file changes - outputs: - any_changed: ${{ steps.gitops-changes.outputs.any_changed }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 2 - - name: Scan services directory - id: gitops-changes - uses: tj-actions/changed-files@v44 - with: - path: services - - name: List all changed files - env: - ALL_CHANGED_FILES: ${{ steps.gitops-changes.outputs.all_changed_files }} - run: | - for file in ${ALL_CHANGED_FILES}; do - echo "$file was changed" - done - sync_changes: runs-on: ubuntu-latest - needs: - - changed_files - if: needs.changed_files.outputs.any_changed == 'true' steps: - uses: actions/checkout@v4