From 5b7fbafc84976fd65bbb49763910c846af51a683 Mon Sep 17 00:00:00 2001 From: ranchodeluxe Date: Mon, 2 Oct 2023 15:23:58 -0700 Subject: [PATCH 1/3] adjust cpu --- helm-chart/eoapi/CHANGELOG.md | 6 +++++- helm-chart/eoapi/Chart.yaml | 4 ++-- helm-chart/eoapi/values.yaml | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/helm-chart/eoapi/CHANGELOG.md b/helm-chart/eoapi/CHANGELOG.md index 35d82f58..f62fd4be 100644 --- a/helm-chart/eoapi/CHANGELOG.md +++ b/helm-chart/eoapi/CHANGELOG.md @@ -1,6 +1,10 @@ ##### version numbers below correspond to helm chart `appVersion`: see ./helm-chart/eoapi/Chart.yaml --- -### 0.1.7 (2023-10-01) +### 0.1.8 (2023-10-02) + +* adjust cpu limits so if autoscaling is enabled it doesn't immediately scaleup + +### 0.1.7 (2023-10-02) * adds `autoscaling` options to each service for HPA diff --git a/helm-chart/eoapi/Chart.yaml b/helm-chart/eoapi/Chart.yaml index c7aa5c13..2ff69ff9 100644 --- a/helm-chart/eoapi/Chart.yaml +++ b/helm-chart/eoapi/Chart.yaml @@ -17,10 +17,10 @@ kubeVersion: ">=1.23.0-0" # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: "0.1.9" +version: "0.1.10" # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.1.7" +appVersion: "0.1.8" diff --git a/helm-chart/eoapi/values.yaml b/helm-chart/eoapi/values.yaml index e2599f2c..b90c041e 100644 --- a/helm-chart/eoapi/values.yaml +++ b/helm-chart/eoapi/values.yaml @@ -108,7 +108,7 @@ raster: # https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ resources: limits: - cpu: "512m" + cpu: "768m" memory: "4096Mi" requests: cpu: "256m" @@ -156,7 +156,7 @@ stac: # https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ resources: limits: - cpu: "512m" + cpu: "768m" memory: "1024Mi" requests: cpu: "256m" @@ -191,7 +191,7 @@ vector: # https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ resources: limits: - cpu: "512m" + cpu: "768m" memory: "1024Mi" requests: cpu: "256m" From 88e2351231a73b49bc5b3cb09aedfa1821291c72 Mon Sep 17 00:00:00 2001 From: ranchodeluxe Date: Mon, 2 Oct 2023 15:28:48 -0700 Subject: [PATCH 2/3] do the thing --- helm-chart/eoapi/tests/deploy_tests.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helm-chart/eoapi/tests/deploy_tests.yaml b/helm-chart/eoapi/tests/deploy_tests.yaml index e653035b..4865789a 100644 --- a/helm-chart/eoapi/tests/deploy_tests.yaml +++ b/helm-chart/eoapi/tests/deploy_tests.yaml @@ -18,7 +18,7 @@ tests: value: "RollingUpdate" - equal: path: spec.template.spec.containers[0].resources.limits.cpu - value: "512m" + value: "768m" - equal: path: spec.template.spec.containers[0].resources.requests.cpu value: "256m" @@ -47,7 +47,7 @@ tests: value: "RollingUpdate" - equal: path: spec.template.spec.containers[0].resources.limits.cpu - value: "512m" + value: "768m" - equal: path: spec.template.spec.containers[0].resources.requests.cpu value: "256m" @@ -76,7 +76,7 @@ tests: value: "RollingUpdate" - equal: path: spec.template.spec.containers[0].resources.limits.cpu - value: "512m" + value: "768m" - equal: path: spec.template.spec.containers[0].resources.requests.cpu value: "256m" From 0cdd0305b001a59bdbb83bf3d39e8a7fd0b9e5ab Mon Sep 17 00:00:00 2001 From: ranchodeluxe Date: Mon, 2 Oct 2023 15:39:30 -0700 Subject: [PATCH 3/3] try this --- .github/workflows/helm-tests.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/helm-tests.yml b/.github/workflows/helm-tests.yml index 62d677a5..5b993a66 100644 --- a/.github/workflows/helm-tests.yml +++ b/.github/workflows/helm-tests.yml @@ -142,6 +142,8 @@ jobs: # uses: lhotari/action-upterm@v1 - name: run the tests + id: testrunner + continue-on-error: true run: | kubectl config set-context --current --namespace=eoapitest PUBLICIP='http://'$(kubectl -n ingress-nginx get svc/ingress-nginx-controller -o jsonpath='{.spec.loadBalancerIP}') @@ -165,6 +167,14 @@ jobs: head -n 5 .github/workflows/tests/test_raster.py pytest .github/workflows/tests/test_raster.py + - name: cleanup if tests faile + if: steps.testrunner.outcome == 'failure' + run: | + echo "The previous step failed or timed out. Running cleanup logic..." + helm uninstall $RELEASE_NAME + # force GH action to show failed result + exit 128 + - name: helm uinstall eoapi templates run: | helm uninstall $RELEASE_NAME