Skip to content

Commit

Permalink
[DEVOPS-467] Fix maxReplicas override from values.yaml (#131)
Browse files Browse the repository at this point in the history
<details open>
<summary><a href="https://amuniversal.atlassian.net/browse/DEVOPS-467"
title="DEVOPS-467" target="_blank">DEVOPS-467</a></summary>
  <br />
  <table>
    <tr>
      <th>Summary</th>
<td>AKS deploy workflows don't respect `maximumReplicas` config in
`values.yaml` file</td>
    </tr>
    <tr>
      <th>Type</th>
      <td>
<img alt="Bug"
src="https://amuniversal.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10308?size=medium"
/>
        Bug
      </td>
    </tr>
    <tr>
      <th>Status</th>
      <td>In Progress</td>
    </tr>
    <tr>
      <th>Points</th>
      <td>N/A</td>
    </tr>
    <tr>
      <th>Labels</th>
      <td>-</td>
    </tr>
  </table>
</details>
<!--
do not remove this marker as it will break action-jira-linter's
functionality.
  added_by_jira_lint
-->
---

<!-- Please make sure you read the contribution guidelines and then fill
out the blanks below.

Please format the PR title appropriately based on the type of change:
  [JIRA-XXX]: <description>
-->

## 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

<!-- List any links related to this pull request here

Replace "JIRA-XXX" with the your Jira issue key -->

- 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)
  • Loading branch information
ebronson68 authored Jun 18, 2024
1 parent 80891c4 commit fbf1f3d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/aks-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -244,6 +246,7 @@ jobs:
ingressWhitelist: ${{ env.ingressWhitelist }}
adminIngressWhitelist: ${{ env.adminIngressWhitelist }}
release: ${{ env.release }}
maxReplicas: ${{ env.maxReplicas }}

deploy:
name: AKS Deploy
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fbf1f3d

Please sign in to comment.