From cade5a2c03b97f312a2657cac8aad4877a1b825c Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 30 Aug 2022 21:44:55 +0200 Subject: [PATCH 01/12] [Modules] Updated KubernetesConfiguration/Extensions to new dependency approach --- .../ms.kubernetesconfiguration.extensions.yml | 3 +- .../.test/default/dependencies.bicep | 43 ++++++++++++ .../.test/default/deploy.test.bicep | 58 ++++++++++++++++ .../extensions/.test/min.parameters.json | 21 ------ .../extensions/.test/min/dependencies.bicep | 43 ++++++++++++ .../extensions/.test/min/deploy.test.bicep | 50 ++++++++++++++ .../extensions/.test/parameters.json | 34 --------- .../extensions/readme.md | 69 ++++++++++--------- utilities/tools/Set-ModuleReadMe.ps1 | 6 +- 9 files changed, 233 insertions(+), 94 deletions(-) create mode 100644 modules/Microsoft.KubernetesConfiguration/extensions/.test/default/dependencies.bicep create mode 100644 modules/Microsoft.KubernetesConfiguration/extensions/.test/default/deploy.test.bicep delete mode 100644 modules/Microsoft.KubernetesConfiguration/extensions/.test/min.parameters.json create mode 100644 modules/Microsoft.KubernetesConfiguration/extensions/.test/min/dependencies.bicep create mode 100644 modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep delete mode 100644 modules/Microsoft.KubernetesConfiguration/extensions/.test/parameters.json diff --git a/.github/workflows/ms.kubernetesconfiguration.extensions.yml b/.github/workflows/ms.kubernetesconfiguration.extensions.yml index aa0f094765..3dc16b79bf 100644 --- a/.github/workflows/ms.kubernetesconfiguration.extensions.yml +++ b/.github/workflows/ms.kubernetesconfiguration.extensions.yml @@ -106,8 +106,7 @@ jobs: - name: 'Using test file [${{ matrix.moduleTestFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}' + templateFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}' location: '${{ env.location }}' resourceGroupName: '${{ env.resourceGroupName }}' subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/default/dependencies.bicep b/modules/Microsoft.KubernetesConfiguration/extensions/.test/default/dependencies.bicep new file mode 100644 index 0000000000..0f9ca8f0ee --- /dev/null +++ b/modules/Microsoft.KubernetesConfiguration/extensions/.test/default/dependencies.bicep @@ -0,0 +1,43 @@ +@description('Optional. The location to deploy resources to.') +param location string = resourceGroup().location + +@description('Required. The name of the AKS cluster to create.') +param clusterName string + +@description('Required. The name of the AKS cluster nodes resource group to create.') +param clusterNodeResourceGroupName string + +resource cluster 'Microsoft.ContainerService/managedClusters@2022-06-01' = { + name: clusterName + location: location + identity: { + type: 'SystemAssigned' + } + properties: { + dnsPrefix: clusterName + nodeResourceGroup: clusterNodeResourceGroupName + agentPoolProfiles: [ + { + name: 'agentpool' + // osDiskSizeGB: osDiskSizeGB + count: 1 + vmSize: 'Standard_DS2_v2' + osType: 'Linux' + mode: 'System' + } + ] + // linuxProfile: { + // adminUsername: 'azureuser' + // ssh: { + // publicKeys: [ + // { + // keyData: sshRSAPublicKey + // } + // ] + // } + // } + } +} + +@description('The name of the created AKS cluster.') +output clusterName string = cluster.name diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/default/deploy.test.bicep b/modules/Microsoft.KubernetesConfiguration/extensions/.test/default/deploy.test.bicep new file mode 100644 index 0000000000..24b0109288 --- /dev/null +++ b/modules/Microsoft.KubernetesConfiguration/extensions/.test/default/deploy.test.bicep @@ -0,0 +1,58 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for a testing purposes') +@maxLength(80) +param resourceGroupName string = 'ms.kubernetesconfiguration.extensions-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment .Should be kept short to not run into resource-name length-constraints') +param serviceShort string = 'kcedef' + +// =========== // +// Deployments // +// =========== // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +module resourceGroupResources 'dependencies.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-paramNested' + params: { + clusterName: 'dep-<>-aks-${serviceShort}' + clusterNodeResourceGroupName: 'nodes-${resourceGroupName}' + } +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + clusterName: resourceGroupResources.outputs.clusterName + extensionType: 'microsoft.flux' + configurationSettings: { + 'image-automation-controller.enabled': 'false' + 'image-reflector-controller.enabled': 'false' + 'kustomize-controller.enabled': 'true' + 'notification-controller.enabled': 'false' + 'source-controller.enabled': 'true' + } + releaseNamespace: 'flux-system' + releaseTrain: 'Stable' + version: '0.5.2' + } +} diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/min.parameters.json b/modules/Microsoft.KubernetesConfiguration/extensions/.test/min.parameters.json deleted file mode 100644 index 8beee2d23b..0000000000 --- a/modules/Microsoft.KubernetesConfiguration/extensions/.test/min.parameters.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "flux" - }, - "extensionType": { - "value": "microsoft.flux" - }, - "clusterName": { - "value": "<>-az-aks-kubenet-001" - }, - "releaseTrain": { - "value": "Stable" - }, - "releaseNamespace": { - "value": "flux-system" - } - } -} diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/dependencies.bicep b/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/dependencies.bicep new file mode 100644 index 0000000000..0f9ca8f0ee --- /dev/null +++ b/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/dependencies.bicep @@ -0,0 +1,43 @@ +@description('Optional. The location to deploy resources to.') +param location string = resourceGroup().location + +@description('Required. The name of the AKS cluster to create.') +param clusterName string + +@description('Required. The name of the AKS cluster nodes resource group to create.') +param clusterNodeResourceGroupName string + +resource cluster 'Microsoft.ContainerService/managedClusters@2022-06-01' = { + name: clusterName + location: location + identity: { + type: 'SystemAssigned' + } + properties: { + dnsPrefix: clusterName + nodeResourceGroup: clusterNodeResourceGroupName + agentPoolProfiles: [ + { + name: 'agentpool' + // osDiskSizeGB: osDiskSizeGB + count: 1 + vmSize: 'Standard_DS2_v2' + osType: 'Linux' + mode: 'System' + } + ] + // linuxProfile: { + // adminUsername: 'azureuser' + // ssh: { + // publicKeys: [ + // { + // keyData: sshRSAPublicKey + // } + // ] + // } + // } + } +} + +@description('The name of the created AKS cluster.') +output clusterName string = cluster.name diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep b/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep new file mode 100644 index 0000000000..46f99eed16 --- /dev/null +++ b/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep @@ -0,0 +1,50 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for a testing purposes') +@maxLength(80) +param resourceGroupName string = 'ms.kubernetesconfiguration.extensions-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment .Should be kept short to not run into resource-name length-constraints') +param serviceShort string = 'kcemin' + +// =========== // +// Deployments // +// =========== // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +module resourceGroupResources 'dependencies.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-paramNested' + params: { + clusterName: 'dep-<>-aks-${serviceShort}' + clusterNodeResourceGroupName: 'nodes-${resourceGroupName}' + } +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + clusterName: resourceGroupResources.outputs.clusterName + extensionType: 'microsoft.flux' + releaseNamespace: 'flux-system' + releaseTrain: 'Stable' + } +} diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/parameters.json b/modules/Microsoft.KubernetesConfiguration/extensions/.test/parameters.json deleted file mode 100644 index 29ca85067d..0000000000 --- a/modules/Microsoft.KubernetesConfiguration/extensions/.test/parameters.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "flux" - }, - "extensionType": { - "value": "microsoft.flux" - }, - "clusterName": { - "value": "<>-az-aks-kubenet-001" - }, - "releaseTrain": { - "value": "Stable" - }, - "releaseNamespace": { - "value": "flux-system" - }, - "version": { - "value": "0.5.2" - }, - "configurationSettings": { - "value": { - // "helm-controller.enabled": "false", - "source-controller.enabled": "true", - "kustomize-controller.enabled": "true", - "notification-controller.enabled": "false", - "image-automation-controller.enabled": "false", - "image-reflector-controller.enabled": "false" - } - } - } -} diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/readme.md b/modules/Microsoft.KubernetesConfiguration/extensions/readme.md index d2bc9c9083..b2a3c3dd24 100644 --- a/modules/Microsoft.KubernetesConfiguration/extensions/readme.md +++ b/modules/Microsoft.KubernetesConfiguration/extensions/readme.md @@ -28,6 +28,7 @@ az provider register --namespace Microsoft.KubernetesConfiguration ``` For Details see [Prerequisites](https://docs.microsoft.com/en-us/azure/azure-arc/kubernetes/tutorial-use-gitops-flux2) + ## Resource Types | Resource Type | API Version | @@ -74,23 +75,31 @@ The following module usage examples are retrieved from the content of the files >**Note**: The name of each example is based on the name of the file from which it is taken. >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. -

Example 1: Min

+

Example 1: Default

via Bicep module ```bicep -module extensions './Microsoft.KubernetesConfiguration/extensions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-extensions' +module Extensions './Microsoft.Kubernetesconfiguration/Extensions/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-kcedef' params: { // Required parameters - clusterName: '<>-az-aks-kubenet-001' + clusterName: '' extensionType: 'microsoft.flux' - name: 'flux' + name: '<>kcedef001' // Non-required parameters + configurationSettings: { + 'image-automation-controller.enabled': 'false' + 'image-reflector-controller.enabled': 'false' + 'kustomize-controller.enabled': 'true' + 'notification-controller.enabled': 'false' + 'source-controller.enabled': 'true' + } releaseNamespace: 'flux-system' releaseTrain: 'Stable' + version: '0.5.2' } } ``` @@ -109,20 +118,32 @@ module extensions './Microsoft.KubernetesConfiguration/extensions/deploy.bicep' "parameters": { // Required parameters "clusterName": { - "value": "<>-az-aks-kubenet-001" + "value": "" }, "extensionType": { "value": "microsoft.flux" }, "name": { - "value": "flux" + "value": "<>kcedef001" }, // Non-required parameters + "configurationSettings": { + "value": { + "image-automation-controller.enabled": "false", + "image-reflector-controller.enabled": "false", + "kustomize-controller.enabled": "true", + "notification-controller.enabled": "false", + "source-controller.enabled": "true" + } + }, "releaseNamespace": { "value": "flux-system" }, "releaseTrain": { "value": "Stable" + }, + "version": { + "value": "0.5.2" } } } @@ -131,31 +152,23 @@ module extensions './Microsoft.KubernetesConfiguration/extensions/deploy.bicep'

-

Example 2: Parameters

+

Example 2: Min

via Bicep module ```bicep -module extensions './Microsoft.KubernetesConfiguration/extensions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-extensions' +module Extensions './Microsoft.Kubernetesconfiguration/Extensions/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-kcemin' params: { // Required parameters - clusterName: '<>-az-aks-kubenet-001' + clusterName: '' extensionType: 'microsoft.flux' - name: 'flux' + name: '<>kcemin001' // Non-required parameters - configurationSettings: { - 'image-automation-controller.enabled': 'false' - 'image-reflector-controller.enabled': 'false' - 'kustomize-controller.enabled': 'true' - 'notification-controller.enabled': 'false' - 'source-controller.enabled': 'true' - } releaseNamespace: 'flux-system' releaseTrain: 'Stable' - version: '0.5.2' } } ``` @@ -174,32 +187,20 @@ module extensions './Microsoft.KubernetesConfiguration/extensions/deploy.bicep' "parameters": { // Required parameters "clusterName": { - "value": "<>-az-aks-kubenet-001" + "value": "" }, "extensionType": { "value": "microsoft.flux" }, "name": { - "value": "flux" + "value": "<>kcemin001" }, // Non-required parameters - "configurationSettings": { - "value": { - "image-automation-controller.enabled": "false", - "image-reflector-controller.enabled": "false", - "kustomize-controller.enabled": "true", - "notification-controller.enabled": "false", - "source-controller.enabled": "true" - } - }, "releaseNamespace": { "value": "flux-system" }, "releaseTrain": { "value": "Stable" - }, - "version": { - "value": "0.5.2" } } } diff --git a/utilities/tools/Set-ModuleReadMe.ps1 b/utilities/tools/Set-ModuleReadMe.ps1 index a1074fed21..6b922d65e8 100644 --- a/utilities/tools/Set-ModuleReadMe.ps1 +++ b/utilities/tools/Set-ModuleReadMe.ps1 @@ -883,9 +883,10 @@ function Set-DeploymentExamplesSection { '' ) + $TextInfo = (Get-Culture -Name 'en-US').TextInfo $moduleRoot = Split-Path $TemplateFilePath -Parent - $resourceTypeIdentifier = $moduleRoot.Replace('\', '/').Split('/modules/')[1].TrimStart('/') - $resourceType = $resourceTypeIdentifier.Split('/')[1] + $resourceTypeIdentifier = $TextInfo.ToTitleCase($moduleRoot.Replace('\', '/').Split('/modules/')[1].TrimStart('/')) + $resourceType = $TextInfo.ToTitleCase($resourceTypeIdentifier.Split('/')[1]) $testFilePaths = Get-ModuleTestFileList -ModulePath $moduleRoot | ForEach-Object { Join-Path $moduleRoot $_ } $RequiredParametersList = $TemplateFileContent.parameters.Keys | Where-Object { $TemplateFileContent.parameters[$_].Keys -notcontains 'defaultValue' } | Sort-Object @@ -906,7 +907,6 @@ function Set-DeploymentExamplesSection { } else { $exampleTitle = ((Split-Path $testFilePath -LeafBase) -replace '\.', ' ') -replace ' parameters', '' } - $TextInfo = (Get-Culture -Name 'en-US').TextInfo $exampleTitle = $TextInfo.ToTitleCase($exampleTitle) $SectionContent += @( '

Example {0}: {1}

' -f $pathIndex, $exampleTitle From 768263b4750c9f786dfc78b0b15cf4c0e2e736fc Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 1 Sep 2022 11:34:54 +0200 Subject: [PATCH 02/12] Update to latest --- .../extensions/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/readme.md b/modules/Microsoft.KubernetesConfiguration/extensions/readme.md index 6c742f3db2..71b955fad3 100644 --- a/modules/Microsoft.KubernetesConfiguration/extensions/readme.md +++ b/modules/Microsoft.KubernetesConfiguration/extensions/readme.md @@ -82,8 +82,8 @@ The following module usage examples are retrieved from the content of the files via Bicep module ```bicep -module extensions './Microsoft.KubernetesConfiguration/extensions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-Extensions' +module Extensions './Microsoft.KubernetesConfiguration/Extensions/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-kcedef' params: { // Required parameters clusterName: '' @@ -159,8 +159,8 @@ module extensions './Microsoft.KubernetesConfiguration/extensions/deploy.bicep' via Bicep module ```bicep -module extensions './Microsoft.KubernetesConfiguration/extensions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-Extensions' +module Extensions './Microsoft.KubernetesConfiguration/Extensions/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-kcemin' params: { // Required parameters clusterName: '' From b0c38d0bf397d8fd5a162143de763f98409b37f9 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Sat, 3 Sep 2022 12:28:49 +0200 Subject: [PATCH 03/12] Update to latest --- .../extensions/.test/default/dependencies.bicep | 11 ----------- .../extensions/.test/min/dependencies.bicep | 11 ----------- 2 files changed, 22 deletions(-) diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/default/dependencies.bicep b/modules/Microsoft.KubernetesConfiguration/extensions/.test/default/dependencies.bicep index 0f9ca8f0ee..813634fb2a 100644 --- a/modules/Microsoft.KubernetesConfiguration/extensions/.test/default/dependencies.bicep +++ b/modules/Microsoft.KubernetesConfiguration/extensions/.test/default/dependencies.bicep @@ -19,23 +19,12 @@ resource cluster 'Microsoft.ContainerService/managedClusters@2022-06-01' = { agentPoolProfiles: [ { name: 'agentpool' - // osDiskSizeGB: osDiskSizeGB count: 1 vmSize: 'Standard_DS2_v2' osType: 'Linux' mode: 'System' } ] - // linuxProfile: { - // adminUsername: 'azureuser' - // ssh: { - // publicKeys: [ - // { - // keyData: sshRSAPublicKey - // } - // ] - // } - // } } } diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/dependencies.bicep b/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/dependencies.bicep index 0f9ca8f0ee..813634fb2a 100644 --- a/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/dependencies.bicep +++ b/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/dependencies.bicep @@ -19,23 +19,12 @@ resource cluster 'Microsoft.ContainerService/managedClusters@2022-06-01' = { agentPoolProfiles: [ { name: 'agentpool' - // osDiskSizeGB: osDiskSizeGB count: 1 vmSize: 'Standard_DS2_v2' osType: 'Linux' mode: 'System' } ] - // linuxProfile: { - // adminUsername: 'azureuser' - // ssh: { - // publicKeys: [ - // { - // keyData: sshRSAPublicKey - // } - // ] - // } - // } } } From c0706e73ff1c1df02b9bab53b3187ba06e794163 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 8 Sep 2022 19:06:49 +0200 Subject: [PATCH 04/12] Updated folder default to common. --- .../extensions/.test/{default => common}/dependencies.bicep | 0 .../extensions/.test/{default => common}/deploy.test.bicep | 0 .../Microsoft.KubernetesConfiguration/extensions/readme.md | 6 +++--- 3 files changed, 3 insertions(+), 3 deletions(-) rename modules/Microsoft.KubernetesConfiguration/extensions/.test/{default => common}/dependencies.bicep (100%) rename modules/Microsoft.KubernetesConfiguration/extensions/.test/{default => common}/deploy.test.bicep (100%) diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/default/dependencies.bicep b/modules/Microsoft.KubernetesConfiguration/extensions/.test/common/dependencies.bicep similarity index 100% rename from modules/Microsoft.KubernetesConfiguration/extensions/.test/default/dependencies.bicep rename to modules/Microsoft.KubernetesConfiguration/extensions/.test/common/dependencies.bicep diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/default/deploy.test.bicep b/modules/Microsoft.KubernetesConfiguration/extensions/.test/common/deploy.test.bicep similarity index 100% rename from modules/Microsoft.KubernetesConfiguration/extensions/.test/default/deploy.test.bicep rename to modules/Microsoft.KubernetesConfiguration/extensions/.test/common/deploy.test.bicep diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/readme.md b/modules/Microsoft.KubernetesConfiguration/extensions/readme.md index 71b955fad3..65b53db709 100644 --- a/modules/Microsoft.KubernetesConfiguration/extensions/readme.md +++ b/modules/Microsoft.KubernetesConfiguration/extensions/readme.md @@ -75,14 +75,14 @@ The following module usage examples are retrieved from the content of the files >**Note**: The name of each example is based on the name of the file from which it is taken. >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. -

Example 1: Default

+

Example 1: Common

via Bicep module ```bicep -module Extensions './Microsoft.KubernetesConfiguration/Extensions/deploy.bicep' = { +module extensions './Microsoft.KubernetesConfiguration/extensions/deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-kcedef' params: { // Required parameters @@ -159,7 +159,7 @@ module Extensions './Microsoft.KubernetesConfiguration/Extensions/deploy.bicep' via Bicep module ```bicep -module Extensions './Microsoft.KubernetesConfiguration/Extensions/deploy.bicep' = { +module extensions './Microsoft.KubernetesConfiguration/extensions/deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-kcemin' params: { // Required parameters From cefbd2f27dea908a15bbfba35e435dd2616c67d5 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 9 Sep 2022 12:50:54 +0200 Subject: [PATCH 05/12] Update to latest --- .../extensions/.test/common/deploy.test.bicep | 4 ++-- .../extensions/.test/min/deploy.test.bicep | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/common/deploy.test.bicep b/modules/Microsoft.KubernetesConfiguration/extensions/.test/common/deploy.test.bicep index 24b0109288..6685a75557 100644 --- a/modules/Microsoft.KubernetesConfiguration/extensions/.test/common/deploy.test.bicep +++ b/modules/Microsoft.KubernetesConfiguration/extensions/.test/common/deploy.test.bicep @@ -10,8 +10,8 @@ param resourceGroupName string = 'ms.kubernetesconfiguration.extensions-${servic @description('Optional. The location to deploy resources to') param location string = deployment().location -@description('Optional. A short identifier for the kind of deployment .Should be kept short to not run into resource-name length-constraints') -param serviceShort string = 'kcedef' +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +param serviceShort string = 'kcecom' // =========== // // Deployments // diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep b/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep index 46f99eed16..9f43e17dce 100644 --- a/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep +++ b/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep @@ -10,7 +10,7 @@ param resourceGroupName string = 'ms.kubernetesconfiguration.extensions-${servic @description('Optional. The location to deploy resources to') param location string = deployment().location -@description('Optional. A short identifier for the kind of deployment .Should be kept short to not run into resource-name length-constraints') +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') param serviceShort string = 'kcemin' // =========== // From bcd4d46fd8b70ceab92bb17116a223b82fc9d853 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 9 Sep 2022 13:03:51 +0200 Subject: [PATCH 06/12] Update to latest --- .../extensions/.test/common/deploy.test.bicep | 6 +++--- .../extensions/.test/min/deploy.test.bicep | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/common/deploy.test.bicep b/modules/Microsoft.KubernetesConfiguration/extensions/.test/common/deploy.test.bicep index 6685a75557..4646347e52 100644 --- a/modules/Microsoft.KubernetesConfiguration/extensions/.test/common/deploy.test.bicep +++ b/modules/Microsoft.KubernetesConfiguration/extensions/.test/common/deploy.test.bicep @@ -3,14 +3,14 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for a testing purposes') +@description('Optional. The name of the resource group to deploy for a testing purposes.') @maxLength(80) param resourceGroupName string = 'ms.kubernetesconfiguration.extensions-${serviceShort}-rg' -@description('Optional. The location to deploy resources to') +@description('Optional. The location to deploy resources to.') param location string = deployment().location -@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') param serviceShort string = 'kcecom' // =========== // diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep b/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep index 9f43e17dce..d2e0af13c7 100644 --- a/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep +++ b/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep @@ -3,14 +3,14 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for a testing purposes') +@description('Optional. The name of the resource group to deploy for a testing purposes.') @maxLength(80) param resourceGroupName string = 'ms.kubernetesconfiguration.extensions-${serviceShort}-rg' -@description('Optional. The location to deploy resources to') +@description('Optional. The location to deploy resources to.') param location string = deployment().location -@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') param serviceShort string = 'kcemin' // =========== // From 47239229bb22c590e597bea587e3ae99a7338746 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 9 Sep 2022 13:45:28 +0200 Subject: [PATCH 07/12] Update to latest --- .../Microsoft.KubernetesConfiguration/extensions/readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/readme.md b/modules/Microsoft.KubernetesConfiguration/extensions/readme.md index db14256df8..9014c93dee 100644 --- a/modules/Microsoft.KubernetesConfiguration/extensions/readme.md +++ b/modules/Microsoft.KubernetesConfiguration/extensions/readme.md @@ -84,12 +84,12 @@ The following module usage examples are retrieved from the content of the files ```bicep module extensions './Microsoft.KubernetesConfiguration/extensions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-test-kcedef' + name: '${uniqueString(deployment().name)}-test-kcecom' params: { // Required parameters clusterName: '' extensionType: 'microsoft.flux' - name: '<>kcedef001' + name: '<>kcecom001' // Non-required parameters configurationSettings: { 'image-automation-controller.enabled': 'false' @@ -125,7 +125,7 @@ module extensions './Microsoft.KubernetesConfiguration/extensions/deploy.bicep' "value": "microsoft.flux" }, "name": { - "value": "<>kcedef001" + "value": "<>kcecom001" }, // Non-required parameters "configurationSettings": { From dcf3b9dc92d5933d44ee3c6937e51ac3cd334cfb Mon Sep 17 00:00:00 2001 From: MrMCake Date: Mon, 19 Sep 2022 15:34:40 +0200 Subject: [PATCH 08/12] First commit --- utilities/tools/REST2CARML/Set-ModuleFolderData.ps1 | 1 + 1 file changed, 1 insertion(+) create mode 100644 utilities/tools/REST2CARML/Set-ModuleFolderData.ps1 diff --git a/utilities/tools/REST2CARML/Set-ModuleFolderData.ps1 b/utilities/tools/REST2CARML/Set-ModuleFolderData.ps1 new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/utilities/tools/REST2CARML/Set-ModuleFolderData.ps1 @@ -0,0 +1 @@ + \ No newline at end of file From 2966996b4a8df523d5024d4731a67256f82029e6 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Mon, 19 Sep 2022 20:06:10 +0200 Subject: [PATCH 09/12] Update modules/Microsoft.KubernetesConfiguration/extensions/.test/common/deploy.test.bicep --- .../extensions/.test/common/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/common/deploy.test.bicep b/modules/Microsoft.KubernetesConfiguration/extensions/.test/common/deploy.test.bicep index 4646347e52..c7ef2ab70b 100644 --- a/modules/Microsoft.KubernetesConfiguration/extensions/.test/common/deploy.test.bicep +++ b/modules/Microsoft.KubernetesConfiguration/extensions/.test/common/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for a testing purposes.') +@description('Optional. The name of the resource group to deploy for testing purposes.') @maxLength(80) param resourceGroupName string = 'ms.kubernetesconfiguration.extensions-${serviceShort}-rg' From 2d7b26e1ba71453f7eaad26f220be24d9a52b888 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Mon, 19 Sep 2022 20:06:25 +0200 Subject: [PATCH 10/12] Apply suggestions from code review --- .../extensions/.test/min/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep b/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep index d2e0af13c7..d7bb8567d7 100644 --- a/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep +++ b/modules/Microsoft.KubernetesConfiguration/extensions/.test/min/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for a testing purposes.') +@description('Optional. The name of the resource group to deploy for testing purposes.') @maxLength(80) param resourceGroupName string = 'ms.kubernetesconfiguration.extensions-${serviceShort}-rg' From 097d01e1e8b1107482b4bbd5ade6ec8fe4b1b29a Mon Sep 17 00:00:00 2001 From: MrMCake Date: Mon, 19 Sep 2022 20:08:17 +0200 Subject: [PATCH 11/12] Merged latest main --- utilities/tools/Set-ModuleReadMe.ps1 | 7 ------- 1 file changed, 7 deletions(-) diff --git a/utilities/tools/Set-ModuleReadMe.ps1 b/utilities/tools/Set-ModuleReadMe.ps1 index 6469605289..25923c3d62 100644 --- a/utilities/tools/Set-ModuleReadMe.ps1 +++ b/utilities/tools/Set-ModuleReadMe.ps1 @@ -896,13 +896,6 @@ function Set-DeploymentExamplesSection { '' ) -<<<<<<< HEAD - $TextInfo = (Get-Culture -Name 'en-US').TextInfo - $moduleRoot = Split-Path $TemplateFilePath -Parent - $fullIdentifier = $moduleRoot.Replace('\', '/').Split('/modules/')[1].TrimStart('/') - -======= ->>>>>>> main # Get resource type and make first letter upper case. Requires manual handling as ToTitleCase lowercases everything but the first letter $providerNamespace = ($fullModuleIdentifier.Split('/')[0] -split '\.' | ForEach-Object { $_.Substring(0, 1).ToUpper() + $_.Substring(1) }) -join '.' $resourceType = $fullModuleIdentifier.Split('/')[1] From 6b5233ae0e9a6d442695daf6d900a26d492b0368 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Mon, 19 Sep 2022 20:09:05 +0200 Subject: [PATCH 12/12] Update to latest --- utilities/tools/REST2CARML/Set-ModuleFolderData.ps1 | 1 - 1 file changed, 1 deletion(-) delete mode 100644 utilities/tools/REST2CARML/Set-ModuleFolderData.ps1 diff --git a/utilities/tools/REST2CARML/Set-ModuleFolderData.ps1 b/utilities/tools/REST2CARML/Set-ModuleFolderData.ps1 deleted file mode 100644 index 5f282702bb..0000000000 --- a/utilities/tools/REST2CARML/Set-ModuleFolderData.ps1 +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file