Skip to content

Commit cc25509

Browse files
Migrate KubernetesConfiguration from generation to main (#24903)
* Move KubernetesConfiguration to main * update changelog --------- Co-authored-by: Jinpei Li <[email protected]>
1 parent 87b68cc commit cc25509

17 files changed

+223
-45
lines changed

src/KubernetesConfiguration/KubernetesConfiguration.Autorest/build-module.ps1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
1313
# is regenerated.
1414
# ----------------------------------------------------------------------------------
15-
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
15+
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [Switch]$DisableAfterBuildTasks)
1616
$ErrorActionPreference = 'Stop'
1717

1818
if($PSEdition -ne 'Core') {
@@ -169,4 +169,14 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
169169
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
170170
}
171171

172+
if (-not $DisableAfterBuildTasks){
173+
$afterBuildTasksPath = Join-Path $PSScriptRoot ''
174+
$afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable
175+
if(Test-Path -Path $afterBuildTasksPath -PathType leaf){
176+
Write-Host -ForegroundColor Green 'Running after build tasks...'
177+
. $afterBuildTasksPath @afterBuildTasksArgs
178+
}
179+
}
180+
181+
172182
Write-Host -ForegroundColor Green '-------------Done-------------'

src/KubernetesConfiguration/KubernetesConfiguration.Autorest/custom/New-AzKubernetesExtension.ps1

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -249,19 +249,6 @@ function New-AzKubernetesExtension {
249249
Write-Error "Please select ClusterType from the following three values: 'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'"
250250
}
251251

252-
if ($Name -ieq 'flux') {
253-
if ($Name -ceq 'flux') {
254-
if ($IdentityType -cne 'SystemAssigned') {
255-
Write-Error "The value of the parameter -IdentityType must be 'SystemAssigned'."
256-
return
257-
}
258-
}
259-
else {
260-
Write-Error "The value of the parameter -Name must be 'flux'."
261-
return
262-
}
263-
}
264-
265252
write-host "Azure Kubernetes Configuration Extension is being created, need to wait a few minutes..."
266253
Az.KubernetesConfiguration.internal\New-AzKubernetesExtension @PSBoundParameters
267254
}

src/KubernetesConfiguration/KubernetesConfiguration.Autorest/test/utils.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function setupEnv() {
7777
New-AzResourceGroup -Name $env.resourceGroup -Location $env.location
7878

7979
write-host "2. az aks create..."
80-
az aks create --name $env.k8sName1 --resource-group $env.resourceGroup --kubernetes-version 1.25.5 --vm-set-type AvailabilitySet
80+
az aks create --name $env.k8sName1 --resource-group $env.resourceGroup --kubernetes-version 1.29.2 --vm-set-type AvailabilitySet
8181

8282
write-host "3. az aks get-credentials..."
8383
az aks get-credentials --name $env.k8sName1 --resource-group $env.resourceGroup

src/KubernetesConfiguration/KubernetesConfiguration/Az.KubernetesConfiguration.psd1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 23/04/2024
6+
# Generated on: 5/13/2024
77
#
88

99
@{
@@ -58,14 +58,14 @@ RequiredAssemblies =
5858
'KubernetesConfiguration.Autorest/bin/Az.KubernetesConfiguration.private.dll'
5959

6060
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
61-
# ScriptsToProcess = @()
61+
ScriptsToProcess = @()
6262

6363
# Type files (.ps1xml) to be loaded when importing this module
64-
# TypesToProcess = @()
64+
TypesToProcess = @()
6565

6666
# Format files (.ps1xml) to be loaded when importing this module
6767
FormatsToProcess =
68-
'KubernetesConfiguration.Autorest\Az.KubernetesConfiguration.format.ps1xml'
68+
'KubernetesConfiguration.Autorest/Az.KubernetesConfiguration.format.ps1xml'
6969

7070
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
7171
NestedModules = @('KubernetesConfiguration.Autorest/Az.KubernetesConfiguration.psm1')
@@ -111,7 +111,7 @@ PrivateData = @{
111111
PSData = @{
112112

113113
# Tags applied to this module. These help with module discovery in online galleries.
114-
Tags = 'Azure','ResourceManager','ARM','PSModule','KubernetesConfiguration'
114+
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'KubernetesConfiguration'
115115

116116
# A URL to the license for this module.
117117
LicenseUri = 'https://aka.ms/azps-license'
@@ -136,7 +136,7 @@ PrivateData = @{
136136

137137
} # End of PSData hashtable
138138

139-
} # End of PrivateData hashtable
139+
} # End of PrivateData hashtable
140140

141141
# HelpInfo URI of this module
142142
# HelpInfoURI = ''

src/KubernetesConfiguration/KubernetesConfiguration/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Fixed issue that `New-AzKubernetesExtension` installing Flux fails with error "Failed to perform resource identity operation" [#22455]
2122

2223
## Version 0.7.1
2324
* Introduced secrets detection feature to safeguard sensitive data.

src/KubernetesConfiguration/KubernetesConfiguration/help/Get-AzKubernetesConfigFluxOperationStatus.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ Get Async Operation status
1616
```
1717
Get-AzKubernetesConfigFluxOperationStatus -ClusterName <String> -ClusterType <String>
1818
-FluxConfigurationName <String> -OperationId <String> -ResourceGroupName <String> [-SubscriptionId <String[]>]
19-
[-DefaultProfile <PSObject>] [<CommonParameters>]
19+
[-DefaultProfile <PSObject>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
2020
```
2121

2222
### GetViaIdentity
2323
```
2424
Get-AzKubernetesConfigFluxOperationStatus -InputObject <IKubernetesConfigurationIdentity>
25-
[-DefaultProfile <PSObject>] [<CommonParameters>]
25+
[-DefaultProfile <PSObject>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
2626
```
2727

2828
## DESCRIPTION
@@ -138,6 +138,21 @@ Accept pipeline input: False
138138
Accept wildcard characters: False
139139
```
140140
141+
### -ProgressAction
142+
{{ Fill ProgressAction Description }}
143+
144+
```yaml
145+
Type: System.Management.Automation.ActionPreference
146+
Parameter Sets: (All)
147+
Aliases: proga
148+
149+
Required: False
150+
Position: Named
151+
Default value: None
152+
Accept pipeline input: False
153+
Accept wildcard characters: False
154+
```
155+
141156
### -ResourceGroupName
142157
The name of the resource group.
143158
The name is case insensitive.

src/KubernetesConfiguration/KubernetesConfiguration/help/Get-AzKubernetesConfiguration.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ Gets details of the Source Control Configuration.
1515
### List (Default)
1616
```
1717
Get-AzKubernetesConfiguration -ClusterName <String> -ClusterType <String> -ResourceGroupName <String>
18-
[-SubscriptionId <String[]>] [-DefaultProfile <PSObject>]
18+
[-SubscriptionId <String[]>] [-DefaultProfile <PSObject>] [-ProgressAction <ActionPreference>]
1919
[<CommonParameters>]
2020
```
2121

2222
### Get
2323
```
2424
Get-AzKubernetesConfiguration -ClusterName <String> -ClusterType <String> -ResourceGroupName <String>
25-
[-SubscriptionId <String[]>] -Name <String> [-DefaultProfile <PSObject>]
25+
[-SubscriptionId <String[]>] -Name <String> [-DefaultProfile <PSObject>] [-ProgressAction <ActionPreference>]
2626
[<CommonParameters>]
2727
```
2828

2929
### GetViaIdentity
3030
```
3131
Get-AzKubernetesConfiguration -InputObject <IKubernetesConfigurationIdentity> [-DefaultProfile <PSObject>]
32-
[<CommonParameters>]
32+
[-ProgressAction <ActionPreference>] [<CommonParameters>]
3333
```
3434

3535
## DESCRIPTION
@@ -144,6 +144,21 @@ Accept pipeline input: False
144144
Accept wildcard characters: False
145145
```
146146
147+
### -ProgressAction
148+
{{ Fill ProgressAction Description }}
149+
150+
```yaml
151+
Type: System.Management.Automation.ActionPreference
152+
Parameter Sets: (All)
153+
Aliases: proga
154+
155+
Required: False
156+
Position: Named
157+
Default value: None
158+
Accept pipeline input: False
159+
Accept wildcard characters: False
160+
```
161+
147162
### -ResourceGroupName
148163
The name of the resource group.
149164
The name is case insensitive.

src/KubernetesConfiguration/KubernetesConfiguration/help/Get-AzKubernetesConfigurationFlux.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ Gets details of the Flux Configuration.
1515
### List (Default)
1616
```
1717
Get-AzKubernetesConfigurationFlux -ClusterName <String> -ClusterType <String> -ResourceGroupName <String>
18-
[-SubscriptionId <String[]>] [-DefaultProfile <PSObject>]
18+
[-SubscriptionId <String[]>] [-DefaultProfile <PSObject>] [-ProgressAction <ActionPreference>]
1919
[<CommonParameters>]
2020
```
2121

2222
### Get
2323
```
2424
Get-AzKubernetesConfigurationFlux -ClusterName <String> -ClusterType <String> -ResourceGroupName <String>
25-
[-SubscriptionId <String[]>] -Name <String> [-DefaultProfile <PSObject>]
25+
[-SubscriptionId <String[]>] -Name <String> [-DefaultProfile <PSObject>] [-ProgressAction <ActionPreference>]
2626
[<CommonParameters>]
2727
```
2828

2929
### GetViaIdentity
3030
```
3131
Get-AzKubernetesConfigurationFlux -InputObject <IKubernetesConfigurationIdentity> [-DefaultProfile <PSObject>]
32-
[<CommonParameters>]
32+
[-ProgressAction <ActionPreference>] [<CommonParameters>]
3333
```
3434

3535
## DESCRIPTION
@@ -143,6 +143,21 @@ Accept pipeline input: False
143143
Accept wildcard characters: False
144144
```
145145
146+
### -ProgressAction
147+
{{ Fill ProgressAction Description }}
148+
149+
```yaml
150+
Type: System.Management.Automation.ActionPreference
151+
Parameter Sets: (All)
152+
Aliases: proga
153+
154+
Required: False
155+
Position: Named
156+
Default value: None
157+
Accept pipeline input: False
158+
Accept wildcard characters: False
159+
```
160+
146161
### -ResourceGroupName
147162
The name of the resource group.
148163
The name is case insensitive.

src/KubernetesConfiguration/KubernetesConfiguration/help/Get-AzKubernetesExtension.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ Gets Kubernetes Cluster Extension.
1515
### List (Default)
1616
```
1717
Get-AzKubernetesExtension -ClusterName <String> -ClusterType <String> -ResourceGroupName <String>
18-
[-SubscriptionId <String[]>] [-DefaultProfile <PSObject>]
18+
[-SubscriptionId <String[]>] [-DefaultProfile <PSObject>] [-ProgressAction <ActionPreference>]
1919
[<CommonParameters>]
2020
```
2121

2222
### Get
2323
```
2424
Get-AzKubernetesExtension -ClusterName <String> -ClusterType <String> -ResourceGroupName <String>
25-
[-SubscriptionId <String[]>] -Name <String> [-DefaultProfile <PSObject>]
25+
[-SubscriptionId <String[]>] -Name <String> [-DefaultProfile <PSObject>] [-ProgressAction <ActionPreference>]
2626
[<CommonParameters>]
2727
```
2828

2929
### GetViaIdentity
3030
```
3131
Get-AzKubernetesExtension -InputObject <IKubernetesConfigurationIdentity> [-DefaultProfile <PSObject>]
32-
[<CommonParameters>]
32+
[-ProgressAction <ActionPreference>] [<CommonParameters>]
3333
```
3434

3535
## DESCRIPTION
@@ -144,6 +144,21 @@ Accept pipeline input: False
144144
Accept wildcard characters: False
145145
```
146146
147+
### -ProgressAction
148+
{{ Fill ProgressAction Description }}
149+
150+
```yaml
151+
Type: System.Management.Automation.ActionPreference
152+
Parameter Sets: (All)
153+
Aliases: proga
154+
155+
Required: False
156+
Position: Named
157+
Default value: None
158+
Accept pipeline input: False
159+
Accept wildcard characters: False
160+
```
161+
147162
### -ResourceGroupName
148163
The name of the resource group.
149164
The name is case insensitive.

src/KubernetesConfiguration/KubernetesConfiguration/help/New-AzKubernetesConfiguration.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ New-AzKubernetesConfiguration -ClusterName <String> -ClusterType <String> -Name
1818
[-EnableHelmOperator] [-HelmOperatorChartValue <String>] [-HelmOperatorChartVersion <String>]
1919
[-OperatorInstanceName <String>] [-OperatorNamespace <String>] [-OperatorParam <String>]
2020
[-OperatorScope <OperatorScopeType>] [-OperatorType <OperatorType>] [-ClusterScoped] [-RepositoryUrl <String>]
21-
[-SshKnownHost <String>] [-DefaultProfile <PSObject>] [-WhatIf]
21+
[-SshKnownHost <String>] [-DefaultProfile <PSObject>] [-ProgressAction <ActionPreference>] [-WhatIf]
2222
[-Confirm] [<CommonParameters>]
2323
```
2424

@@ -271,6 +271,21 @@ Accept pipeline input: False
271271
Accept wildcard characters: False
272272
```
273273
274+
### -ProgressAction
275+
{{ Fill ProgressAction Description }}
276+
277+
```yaml
278+
Type: System.Management.Automation.ActionPreference
279+
Parameter Sets: (All)
280+
Aliases: proga
281+
282+
Required: False
283+
Position: Named
284+
Default value: None
285+
Accept pipeline input: False
286+
Accept wildcard characters: False
287+
```
288+
274289
### -RepositoryUrl
275290
Url of the SourceControl Repository.
276291

0 commit comments

Comments
 (0)