Skip to content

Commit

Permalink
fix: Update avm/res/container-service/managed-cluster - Latest cros…
Browse files Browse the repository at this point in the history
…s-referenced modules (#4372)

## Description

Common types update
Cross reference to latest kubernetes-configuration resources

## Pipeline Reference

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

| Pipeline |
| -------- |
|
[![avm.res.container-service.managed-cluster](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.container-service.managed-cluster.yml/badge.svg?branch=users%2Ferikag%2Faks_types_kube&event=workflow_dispatch)](https://github.com/Azure/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)
- [ ] 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

- [ ] I'm sure there are no other open Pull Requests for the same
update/change
- [ ] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [ ] 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 -->
  • Loading branch information
eriqua authored Feb 4, 2025
1 parent f836d25 commit 27faefd
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 40 deletions.
21 changes: 18 additions & 3 deletions avm/res/container-service/managed-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This module deploys an Azure Kubernetes Service (AKS) Managed Cluster.
| `Microsoft.ContainerService/managedClusters/maintenanceConfigurations` | [2023-10-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2023-10-01/managedClusters/maintenanceConfigurations) |
| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
| `Microsoft.KubernetesConfiguration/extensions` | [2022-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KubernetesConfiguration/2022-03-01/extensions) |
| `Microsoft.KubernetesConfiguration/fluxConfigurations` | [2022-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KubernetesConfiguration/2022-03-01/fluxConfigurations) |
| `Microsoft.KubernetesConfiguration/fluxConfigurations` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KubernetesConfiguration/2023-05-01/fluxConfigurations) |

## Usage examples

Expand Down Expand Up @@ -416,6 +416,11 @@ module managedCluster 'br/public:avm/res/container-service/managed-cluster:<vers
timeoutInSeconds: 180
url: 'https://github.com/mspnp/aks-baseline'
}
kustomizations: {
unified: {
path: './cluster-manifests'
}
}
namespace: 'flux-system'
scope: 'cluster'
}
Expand Down Expand Up @@ -705,6 +710,11 @@ module managedCluster 'br/public:avm/res/container-service/managed-cluster:<vers
"timeoutInSeconds": 180,
"url": "https://github.com/mspnp/aks-baseline"
},
"kustomizations": {
"unified": {
"path": "./cluster-manifests"
}
},
"namespace": "flux-system",
"scope": "cluster"
},
Expand Down Expand Up @@ -982,6 +992,11 @@ param fluxExtension = {
timeoutInSeconds: 180
url: 'https://github.com/mspnp/aks-baseline'
}
kustomizations: {
unified: {
path: './cluster-manifests'
}
}
namespace: 'flux-system'
scope: 'cluster'
}
Expand Down Expand Up @@ -5089,8 +5104,8 @@ This section gives you an overview of all local-referenced module files (i.e., o

| Reference | Type |
| :-- | :-- |
| `br/public:avm/res/kubernetes-configuration/extension:0.2.0` | Remote reference |
| `br/public:avm/utl/types/avm-common-types:0.4.1` | Remote reference |
| `br/public:avm/res/kubernetes-configuration/extension:0.3.5` | Remote reference |
| `br/public:avm/utl/types/avm-common-types:0.5.1` | Remote reference |

## Data Collection

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "17003976301716291586"
"version": "0.33.13.18514",
"templateHash": "3772142304849625200"
},
"name": "Azure Kubernetes Service (AKS) Managed Cluster Agent Pools",
"description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster Agent Pool."
Expand Down
10 changes: 5 additions & 5 deletions avm/res/container-service/managed-cluster/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ param location string = resourceGroup().location
@description('Optional. Specifies the DNS prefix specified when creating the managed cluster.')
param dnsPrefix string = name

import { managedIdentityAllType } from 'br/public:avm/utl/types/avm-common-types:0.4.1'
import { managedIdentityAllType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
@description('Optional. The managed identity definition for this resource. Only one type of identity is supported: system-assigned or user-assigned, but not both.')
param managedIdentities managedIdentityAllType?

Expand Down Expand Up @@ -337,7 +337,7 @@ param enableStorageProfileSnapshotController bool = false
@description('Optional. The support plan for the Managed Cluster.')
param supportPlan string = 'KubernetesOfficial'

import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.4.1'
import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
@description('Optional. The diagnostic settings of the service.')
param diagnosticSettings diagnosticSettingFullType[]?

Expand All @@ -350,11 +350,11 @@ param monitoringWorkspaceResourceId string?
@description('Optional. Enable/Disable usage telemetry for module.')
param enableTelemetry bool = true

import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.4.1'
import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
@description('Optional. Array of role assignments to create.')
param roleAssignments roleAssignmentType[]?

import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.4.1'
import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
@description('Optional. The lock settings of the service.')
param lock lockType?

Expand Down Expand Up @@ -925,7 +925,7 @@ module managedCluster_agentPools 'agent-pool/main.bicep' = [
}
]

module managedCluster_extension 'br/public:avm/res/kubernetes-configuration/extension:0.2.0' = if (!empty(fluxExtension)) {
module managedCluster_extension 'br/public:avm/res/kubernetes-configuration/extension:0.3.5' = if (!empty(fluxExtension)) {
name: '${uniqueString(deployment().name, location)}-ManagedCluster-FluxExtension'
params: {
clusterName: managedCluster.name
Expand Down
49 changes: 22 additions & 27 deletions avm/res/container-service/managed-cluster/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "17979235232913108460"
"version": "0.33.13.18514",
"templateHash": "12618640856903207312"
},
"name": "Azure Kubernetes Service (AKS) Managed Clusters",
"description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster."
Expand Down Expand Up @@ -639,7 +639,7 @@
"metadata": {
"description": "An AVM-aligned type for a diagnostic setting. To be used if both logs & metrics are supported by the resource provider.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.4.1"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.5.1"
}
}
},
Expand Down Expand Up @@ -669,7 +669,7 @@
"metadata": {
"description": "An AVM-aligned type for a lock.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.4.1"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.5.1"
}
}
},
Expand Down Expand Up @@ -697,7 +697,7 @@
"metadata": {
"description": "An AVM-aligned type for a managed identity configuration. To be used if both a system-assigned & user-assigned identities are supported by the resource provider.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.4.1"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.5.1"
}
}
},
Expand Down Expand Up @@ -772,7 +772,7 @@
"metadata": {
"description": "An AVM-aligned type for a role assignment.",
"__bicep_imported_from!": {
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.4.1"
"sourceTemplate": "br:mcr.microsoft.com/bicep/avm/utl/types/avm-common-types:0.5.1"
}
}
}
Expand Down Expand Up @@ -1984,8 +1984,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "4391405610412889755"
"version": "0.33.13.18514",
"templateHash": "8370238557121472803"
},
"name": "Azure Kubernetes Service (AKS) Managed Cluster Maintenance Configurations",
"description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster Maintenance Configurations."
Expand Down Expand Up @@ -2180,8 +2180,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "17003976301716291586"
"version": "0.33.13.18514",
"templateHash": "3772142304849625200"
},
"name": "Azure Kubernetes Service (AKS) Managed Cluster Agent Pools",
"description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster Agent Pool."
Expand Down Expand Up @@ -2613,8 +2613,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "12293754418506359991"
"version": "0.32.4.45862",
"templateHash": "9966442976957263225"
},
"name": "Kubernetes Configuration Extensions",
"description": "This module deploys a Kubernetes Configuration Extension.",
Expand Down Expand Up @@ -2707,8 +2707,8 @@
"avmTelemetry": {
"condition": "[parameters('enableTelemetry')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2023-07-01",
"name": "[format('46d3xbcp.res.kubernetesconfiguration-fluxconfig.{0}.{1}', replace('0.2.0', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]",
"apiVersion": "2024-03-01",
"name": "[format('46d3xbcp.res.kubernetesconfiguration-extension.{0}.{1}', replace('0.3.5', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]",
"properties": {
"mode": "Incremental",
"template": {
Expand Down Expand Up @@ -2746,10 +2746,7 @@
"namespace": "[if(not(empty(coalesce(parameters('targetNamespace'), ''))), createObject('targetNamespace', parameters('targetNamespace')), null())]"
},
"version": "[parameters('version')]"
},
"dependsOn": [
"managedCluster"
]
}
},
"fluxConfiguration": {
"copy": {
Expand All @@ -2766,7 +2763,7 @@
"mode": "Incremental",
"parameters": {
"enableTelemetry": {
"value": "[parameters('enableTelemetry')]"
"value": "[coalesce(tryGet(coalesce(parameters('fluxConfigurations'), createArray())[copyIndex()], 'enableTelemetry'), parameters('enableTelemetry'))]"
},
"clusterName": {
"value": "[parameters('clusterName')]"
Expand All @@ -2791,7 +2788,7 @@
"value": "[tryGet(coalesce(parameters('fluxConfigurations'), createArray())[copyIndex()], 'gitRepository')]"
},
"kustomizations": {
"value": "[tryGet(coalesce(parameters('fluxConfigurations'), createArray())[copyIndex()], 'kustomizations')]"
"value": "[coalesce(parameters('fluxConfigurations'), createArray())[copyIndex()].kustomizations]"
},
"suspend": {
"value": "[tryGet(coalesce(parameters('fluxConfigurations'), createArray())[copyIndex()], 'suspend')]"
Expand All @@ -2805,7 +2802,7 @@
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "13420454476526931427"
"templateHash": "885928168160399718"
},
"name": "Kubernetes Configuration Flux Configurations",
"description": "This module deploys a Kubernetes Configuration Flux Configuration.",
Expand Down Expand Up @@ -2861,9 +2858,8 @@
},
"kustomizations": {
"type": "object",
"nullable": true,
"metadata": {
"description": "Optional. Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster."
"description": "Required. Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster."
}
},
"namespace": {
Expand Down Expand Up @@ -2905,7 +2901,7 @@
"condition": "[parameters('enableTelemetry')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2023-07-01",
"name": "[format('46d3xbcp.res.kubernetesconfiguration-extension.{0}.{1}', replace('0.2.0', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]",
"name": "[format('46d3xbcp.res.kubernetesconfiguration-fluxconfig.{0}.{1}', replace('0.3.1', '.', '-'), substring(uniqueString(deployment().name, parameters('location')), 0, 4))]",
"properties": {
"mode": "Incremental",
"template": {
Expand All @@ -2929,7 +2925,7 @@
},
"fluxConfiguration": {
"type": "Microsoft.KubernetesConfiguration/fluxConfigurations",
"apiVersion": "2022-03-01",
"apiVersion": "2023-05-01",
"scope": "[format('Microsoft.ContainerService/managedClusters/{0}', parameters('clusterName'))]",
"name": "[parameters('name')]",
"properties": {
Expand Down Expand Up @@ -2973,8 +2969,7 @@
}
},
"dependsOn": [
"extension",
"managedCluster"
"extension"
]
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "4391405610412889755"
"version": "0.33.13.18514",
"templateHash": "8370238557121472803"
},
"name": "Azure Kubernetes Service (AKS) Managed Cluster Maintenance Configurations",
"description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster Maintenance Configurations."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@ module testDeployment '../../../main.bicep' = [
timeoutInSeconds: 180
url: 'https://github.com/mspnp/aks-baseline'
}
kustomizations: {
unified: {
path: './cluster-manifests'
}
}
}
{
namespace: 'flux-system-helm'
Expand Down
2 changes: 1 addition & 1 deletion avm/res/container-service/managed-cluster/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.7",
"version": "0.8",
"pathFilters": [
"./main.json"
]
Expand Down

0 comments on commit 27faefd

Please sign in to comment.