Skip to content

Commit

Permalink
fix: Align container-app to WAF Reliability requirements (#1689)
Browse files Browse the repository at this point in the history
## Description

For container-apps, set the scaleMinReplicas to 3 & set scaleMaxReplicas
to 10 to align to WAF Reliability Review.

Closes #1188 

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.app.container-app](https://github.com/oZakari/bicep-registry-modules/actions/workflows/avm.res.app.container-app.yml/badge.svg?branch=container-app-reliability-review)](https://github.com/oZakari/bicep-registry-modules/actions/workflows/avm.res.app.container-app.yml)
|

## Type of Change

<!-- Use the check-boxes [x] on the options that are relevant. -->

- [ ] Update to CI Environment or utlities (Non-module effecting
changes)
- [x] Azure Verified Module updates:
- [x] Bugfix containing backwards compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [x] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation

## Checklist

- [x] I'm sure there are no other open Pull Requests for the same
update/change
- [x] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [x] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to day with the contribution guide at
https://aka.ms/avm/contribute/bicep -->

---------

Co-authored-by: Maher Aldineh <[email protected]>
Co-authored-by: Maher Aldineh <[email protected]>
  • Loading branch information
3 people authored Apr 17, 2024
1 parent a616f64 commit b5d76b9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions avm/res/app/container-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ module containerApp 'br/public:avm/res/app/container-app:<version>' = {
| [`revisionSuffix`](#parameter-revisionsuffix) | string | User friendly suffix that is appended to the revision name. |
| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
| [`scaleMaxReplicas`](#parameter-scalemaxreplicas) | int | Maximum number of container replicas. Defaults to 10 if not set. |
| [`scaleMinReplicas`](#parameter-scaleminreplicas) | int | Minimum number of container replicas. |
| [`scaleMinReplicas`](#parameter-scaleminreplicas) | int | Minimum number of container replicas. Defaults to 3 if not set. |
| [`scaleRules`](#parameter-scalerules) | array | Scaling rules. |
| [`secrets`](#parameter-secrets) | secureObject | The secrets of the Container App. |
| [`tags`](#parameter-tags) | object | Tags of the resource. |
Expand Down Expand Up @@ -808,15 +808,15 @@ Maximum number of container replicas. Defaults to 10 if not set.

- Required: No
- Type: int
- Default: `1`
- Default: `10`

### Parameter: `scaleMinReplicas`

Minimum number of container replicas.
Minimum number of container replicas. Defaults to 3 if not set.

- Required: No
- Type: int
- Default: `0`
- Default: `3`

### Parameter: `scaleRules`

Expand Down
6 changes: 3 additions & 3 deletions avm/res/app/container-app/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ param ingressAllowInsecure bool = true
param ingressTargetPort int = 80

@description('Optional. Maximum number of container replicas. Defaults to 10 if not set.')
param scaleMaxReplicas int = 1
param scaleMaxReplicas int = 10

@description('Optional. Minimum number of container replicas.')
param scaleMinReplicas int = 0
@description('Optional. Minimum number of container replicas. Defaults to 3 if not set.')
param scaleMinReplicas int = 3

@description('Optional. Scaling rules.')
param scaleRules array = []
Expand Down
10 changes: 5 additions & 5 deletions avm/res/app/container-app/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "2491578115600463169"
"version": "0.26.170.59819",
"templateHash": "11829581770848647649"
},
"name": "Container Apps",
"description": "This module deploys a Container App.",
Expand Down Expand Up @@ -178,16 +178,16 @@
},
"scaleMaxReplicas": {
"type": "int",
"defaultValue": 1,
"defaultValue": 10,
"metadata": {
"description": "Optional. Maximum number of container replicas. Defaults to 10 if not set."
}
},
"scaleMinReplicas": {
"type": "int",
"defaultValue": 0,
"defaultValue": 3,
"metadata": {
"description": "Optional. Minimum number of container replicas."
"description": "Optional. Minimum number of container replicas. Defaults to 3 if not set."
}
},
"scaleRules": {
Expand Down
2 changes: 1 addition & 1 deletion avm/res/app/container-app/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "0.1",
"version": "0.2",
"pathFilters": [
"./main.json"
]
Expand Down

0 comments on commit b5d76b9

Please sign in to comment.