Skip to content

Commit

Permalink
feat: added vpa to avm/res/container-service/managed-cluster (Azure…
Browse files Browse the repository at this point in the history
…#2659)

Signed-off-by: PixelRobots
<[email protected]>

## Description

<!--
>Thank you for your contribution !
> Please include a summary of the change and which issue is fixed.
> Please also include the context.
> List any dependencies that are required for this change.

Fixes Azure#123
Fixes Azure#456
Closes Azure#123
Closes Azure#456
-->
Add VPA as it has now gone GA

## Pipeline Reference

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

| Pipeline |
| -------- |
|
[![avm.res.container-service.managed-cluster](https://github.com/PixelRobots/bicep-registry-modules/actions/workflows/avm.res.container-service.managed-cluster.yml/badge.svg?branch=feat-vpa-rh)](https://github.com/PixelRobots/bicep-registry-modules/actions/workflows/avm.res.container-service.managed-cluster.yml)
|

## Type of Change

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

- [ ] Update to CI Environment or utilities (Non-module affecting
changes)
- [x] Azure Verified Module updates:
- [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] 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 date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->

---------

Signed-off-by: PixelRobots <[email protected]>
  • Loading branch information
PixelRobots authored Sep 6, 2024
1 parent ae50ebb commit d03d954
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
9 changes: 9 additions & 0 deletions avm/res/container-service/managed-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1658,6 +1658,7 @@ module managedCluster 'br/public:avm/res/container-service/managed-cluster:<vers
| [`supportPlan`](#parameter-supportplan) | string | The support plan for the Managed Cluster. |
| [`syslogPort`](#parameter-syslogport) | int | The syslog host port. If not specified, the default port is 28330. |
| [`tags`](#parameter-tags) | object | Tags of the resource. |
| [`vpaAddon`](#parameter-vpaaddon) | bool | Whether to enable VPA add-on in cluster. Default value is false. |
| [`webApplicationRoutingEnabled`](#parameter-webapplicationroutingenabled) | bool | Specifies whether the webApplicationRoutingEnabled add-on is enabled or not. |

### Parameter: `name`
Expand Down Expand Up @@ -3344,6 +3345,14 @@ Tags of the resource.
- Required: No
- Type: object

### Parameter: `vpaAddon`

Whether to enable VPA add-on in cluster. Default value is false.

- Required: No
- Type: bool
- Default: `False`

### Parameter: `webApplicationRoutingEnabled`

Specifies whether the webApplicationRoutingEnabled add-on is enabled or not.
Expand Down
6 changes: 6 additions & 0 deletions avm/res/container-service/managed-cluster/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,9 @@ param identityProfile object?
@description('Optional. Enables Kubernetes Event-driven Autoscaling (KEDA).')
param kedaAddon bool = false

@description('Optional. Whether to enable VPA add-on in cluster. Default value is false.')
param vpaAddon bool = false

@description('Optional. The customer managed key definition.')
param customerManagedKey customerManagedKeyType

Expand Down Expand Up @@ -626,6 +629,9 @@ resource managedCluster 'Microsoft.ContainerService/managedClusters@2024-03-02-p
keda: {
enabled: kedaAddon
}
verticalPodAutoscaler: {
enabled: vpaAddon
}
}
networkProfile: {
networkDataplane: networkDataplane
Expand Down
10 changes: 10 additions & 0 deletions avm/res/container-service/managed-cluster/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1418,6 +1418,13 @@
"description": "Optional. Enables Kubernetes Event-driven Autoscaling (KEDA)."
}
},
"vpaAddon": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "Optional. Whether to enable VPA add-on in cluster. Default value is false."
}
},
"customerManagedKey": {
"$ref": "#/definitions/customerManagedKeyType",
"metadata": {
Expand Down Expand Up @@ -1618,6 +1625,9 @@
"workloadAutoScalerProfile": {
"keda": {
"enabled": "[parameters('kedaAddon')]"
},
"verticalPodAutoscaler": {
"enabled": "[parameters('vpaAddon')]"
}
},
"networkProfile": {
Expand Down

0 comments on commit d03d954

Please sign in to comment.