From fbf1f3d26bfe5128e323d83eced7e98783b4f7d6 Mon Sep 17 00:00:00 2001 From: Ella Bronson <111298136+ebronson68@users.noreply.github.com> Date: Tue, 18 Jun 2024 11:04:45 -0500 Subject: [PATCH] [DEVOPS-467] Fix maxReplicas override from values.yaml (#131) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
DEVOPS-467
Summary AKS deploy workflows don't respect `maximumReplicas` config in `values.yaml` file
Type Bug Bug
Status In Progress
Points N/A
Labels -
--- ## Description - Fix maxReplicas override from values.yaml Result: ### MaxReplicas in Autoscalers After setting the `maxReplicas` to `75` in the `values.yaml` file. | Environment | Screenshot | | --- | --- | | Staging | ![image](https://github.com/Andrews-McMeel-Universal/reusable_workflows/assets/111298136/a019bcd4-4428-44bc-9417-356436739f49) | | Development (Testing Branch) | ![image](https://github.com/Andrews-McMeel-Universal/reusable_workflows/assets/111298136/f5965f0c-cb83-4bb9-ae33-62a74878f22d) | ## Related Links - Jira Issue: DEVOPS-467 - Testing environment: [![🚀 Deploy](https://github.com/Andrews-McMeel-Universal/reusable_workflows-test/actions/workflows/deploy.yml/badge.svg?branch=bug%2FDEVOPS-467%2Ffix-maximumreplicas-override)](https://github.com/Andrews-McMeel-Universal/reusable_workflows-test/actions/workflows/deploy.yml) --- .github/workflows/aks-deploy.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/aks-deploy.yaml b/.github/workflows/aks-deploy.yaml index bffcbcc8..057448d8 100644 --- a/.github/workflows/aks-deploy.yaml +++ b/.github/workflows/aks-deploy.yaml @@ -131,6 +131,7 @@ jobs: $appVersion = $chartConfig.appVersion $appHealthCheck = $appconfig.deployment.healthCheckPath $configMap = $appConfig.deployment.configMap + $maxReplicas = $appConfig.autoscaling.maxReplicas $configSecret = $appConfig.deployment.secret $imagePullSecret = "$appName-pull-secret" $release = "$appName-${{ github.sha }}" -replace '(^.{53})(.*$)', '$1' @@ -180,6 +181,7 @@ jobs: Write-Output "ingressWhitelist=$ingressWhitelist" >> $env:GITHUB_ENV Write-Output "adminIngressWhitelist=$adminIngressWhitelist" >> $env:GITHUB_ENV Write-Output "release=$release" >> $env:GITHUB_ENV + Write-Output "maxReplicas=$maxReplicas" >> $env:GITHUB_ENV - name: Generate .env file from Azure Key Vaults id: get-envs @@ -244,6 +246,7 @@ jobs: ingressWhitelist: ${{ env.ingressWhitelist }} adminIngressWhitelist: ${{ env.adminIngressWhitelist }} release: ${{ env.release }} + maxReplicas: ${{ env.maxReplicas }} deploy: name: AKS Deploy @@ -329,7 +332,7 @@ jobs: image.repository:${{ secrets.registryHostName }}/${{ github.event.repository.name }} image.tag:${{ github.sha }}-${{ inputs.environment }} ingress.host:${{ needs.build.outputs.ingress }} - autoscaling.maxReplicas:${{ inputs.maximumReplicas }} + autoscaling.maxReplicas:${{ needs.build.outputs.maxReplicas || inputs.maximumReplicas }} - name: Generate .env file from Azure Key Vaults uses: Andrews-McMeel-Universal/get-envs@v1