Skip to content

Commit

Permalink
Fix issue for KubernetesConfigutation (Azure#24900)
Browse files Browse the repository at this point in the history
  • Loading branch information
lijinpei2008 authored and qinzhouxu committed Jun 5, 2024
1 parent b6625af commit 4a59790
Show file tree
Hide file tree
Showing 26 changed files with 309 additions and 171 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
This directory contains the PowerShell module for the KubernetesConfiguration service.

---
## Status
[![Az.KubernetesConfiguration](https://img.shields.io/powershellgallery/v/Az.KubernetesConfiguration.svg?style=flat-square&label=Az.KubernetesConfiguration "Az.KubernetesConfiguration")](https://www.powershellgallery.com/packages/Az.KubernetesConfiguration/)

## Info
- Modifiable: yes
- Generated: all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,19 +249,6 @@ function New-AzKubernetesExtension {
Write-Error "Please select ClusterType from the following three values: 'ManagedClusters', 'ConnectedClusters', 'ProvisionedClusters'"
}

if ($Name -ieq 'flux') {
if ($Name -ceq 'flux') {
if ($IdentityType -cne 'SystemAssigned') {
Write-Error "The value of the parameter -IdentityType must be 'SystemAssigned'."
return
}
}
else {
Write-Error "The value of the parameter -Name must be 'flux'."
return
}
}

write-host "Azure Kubernetes Configuration Extension is being created, need to wait a few minutes..."
Az.KubernetesConfiguration.internal\New-AzKubernetesExtension @PSBoundParameters
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,22 +186,5 @@ ALIASES
Get-AzK8sConfigFluxOperationStatus
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
`INPUTOBJECT <IKubernetesConfigurationIdentity>`: Identity Parameter
- `[ClusterName <String>]`: The name of the kubernetes cluster.
- `[ClusterResourceName <String>]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.
- `[ClusterRp <String>]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.
- `[ExtensionName <String>]`: Name of the Extension.
- `[FluxConfigurationName <String>]`: Name of the Flux Configuration.
- `[Id <String>]`: Resource identity path
- `[OperationId <String>]`: operation Id
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
- `[SourceControlConfigurationName <String>]`: Name of the Source Control Configuration.
- `[SubscriptionId <String>]`: The ID of the target subscription.

## RELATED LINKS
Original file line number Diff line number Diff line change
Expand Up @@ -190,22 +190,5 @@ ALIASES
Get-AzK8sConfiguration
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
`INPUTOBJECT <IKubernetesConfigurationIdentity>`: Identity Parameter
- `[ClusterName <String>]`: The name of the kubernetes cluster.
- `[ClusterResourceName <String>]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.
- `[ClusterRp <String>]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.
- `[ExtensionName <String>]`: Name of the Extension.
- `[FluxConfigurationName <String>]`: Name of the Flux Configuration.
- `[Id <String>]`: Resource identity path
- `[OperationId <String>]`: operation Id
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
- `[SourceControlConfigurationName <String>]`: Name of the Source Control Configuration.
- `[SubscriptionId <String>]`: The ID of the target subscription.

## RELATED LINKS
Original file line number Diff line number Diff line change
Expand Up @@ -189,22 +189,5 @@ ALIASES
Get-AzK8sConfigurationFlux
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
`INPUTOBJECT <IKubernetesConfigurationIdentity>`: Identity Parameter
- `[ClusterName <String>]`: The name of the kubernetes cluster.
- `[ClusterResourceName <String>]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.
- `[ClusterRp <String>]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.
- `[ExtensionName <String>]`: Name of the Extension.
- `[FluxConfigurationName <String>]`: Name of the Flux Configuration.
- `[Id <String>]`: Resource identity path
- `[OperationId <String>]`: operation Id
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
- `[SourceControlConfigurationName <String>]`: Name of the Source Control Configuration.
- `[SubscriptionId <String>]`: The ID of the target subscription.

## RELATED LINKS
Original file line number Diff line number Diff line change
Expand Up @@ -190,22 +190,5 @@ ALIASES
Get-AzK8sExtension
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
`INPUTOBJECT <IKubernetesConfigurationIdentity>`: Identity Parameter
- `[ClusterName <String>]`: The name of the kubernetes cluster.
- `[ClusterResourceName <String>]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.
- `[ClusterRp <String>]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.
- `[ExtensionName <String>]`: Name of the Extension.
- `[FluxConfigurationName <String>]`: Name of the Flux Configuration.
- `[Id <String>]`: Resource identity path
- `[OperationId <String>]`: operation Id
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
- `[SourceControlConfigurationName <String>]`: Name of the Source Control Configuration.
- `[SubscriptionId <String>]`: The ID of the target subscription.

## RELATED LINKS
Original file line number Diff line number Diff line change
Expand Up @@ -248,22 +248,5 @@ ALIASES
Remove-AzK8sConfiguration
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
`INPUTOBJECT <IKubernetesConfigurationIdentity>`: Identity Parameter
- `[ClusterName <String>]`: The name of the kubernetes cluster.
- `[ClusterResourceName <String>]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.
- `[ClusterRp <String>]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.
- `[ExtensionName <String>]`: Name of the Extension.
- `[FluxConfigurationName <String>]`: Name of the Flux Configuration.
- `[Id <String>]`: Resource identity path
- `[OperationId <String>]`: operation Id
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
- `[SourceControlConfigurationName <String>]`: Name of the Source Control Configuration.
- `[SubscriptionId <String>]`: The ID of the target subscription.

## RELATED LINKS
Original file line number Diff line number Diff line change
Expand Up @@ -263,22 +263,5 @@ ALIASES
Remove-AzK8sConfigurationFlux
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
`INPUTOBJECT <IKubernetesConfigurationIdentity>`: Identity Parameter
- `[ClusterName <String>]`: The name of the kubernetes cluster.
- `[ClusterResourceName <String>]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.
- `[ClusterRp <String>]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.
- `[ExtensionName <String>]`: Name of the Extension.
- `[FluxConfigurationName <String>]`: Name of the Flux Configuration.
- `[Id <String>]`: Resource identity path
- `[OperationId <String>]`: operation Id
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
- `[SourceControlConfigurationName <String>]`: Name of the Source Control Configuration.
- `[SubscriptionId <String>]`: The ID of the target subscription.

## RELATED LINKS
Original file line number Diff line number Diff line change
Expand Up @@ -258,22 +258,5 @@ ALIASES
Remove-AzK8sExtension
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
`INPUTOBJECT <IKubernetesConfigurationIdentity>`: Identity Parameter
- `[ClusterName <String>]`: The name of the kubernetes cluster.
- `[ClusterResourceName <String>]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.
- `[ClusterRp <String>]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.
- `[ExtensionName <String>]`: Name of the Extension.
- `[FluxConfigurationName <String>]`: Name of the Flux Configuration.
- `[Id <String>]`: Resource identity path
- `[OperationId <String>]`: operation Id
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
- `[SourceControlConfigurationName <String>]`: Name of the Source Control Configuration.
- `[SubscriptionId <String>]`: The ID of the target subscription.

## RELATED LINKS
Original file line number Diff line number Diff line change
Expand Up @@ -815,22 +815,5 @@ ALIASES
Update-AzK8sConfigurationFlux
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
`INPUTOBJECT <IKubernetesConfigurationIdentity>`: Identity Parameter
- `[ClusterName <String>]`: The name of the kubernetes cluster.
- `[ClusterResourceName <String>]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.
- `[ClusterRp <String>]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.
- `[ExtensionName <String>]`: Name of the Extension.
- `[FluxConfigurationName <String>]`: Name of the Flux Configuration.
- `[Id <String>]`: Resource identity path
- `[OperationId <String>]`: operation Id
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
- `[SourceControlConfigurationName <String>]`: Name of the Source Control Configuration.
- `[SubscriptionId <String>]`: The ID of the target subscription.

## RELATED LINKS
Original file line number Diff line number Diff line change
Expand Up @@ -311,22 +311,5 @@ ALIASES
Update-AzK8sExtension
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
`INPUTOBJECT <IKubernetesConfigurationIdentity>`: Identity Parameter
- `[ClusterName <String>]`: The name of the kubernetes cluster.
- `[ClusterResourceName <String>]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.
- `[ClusterRp <String>]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.
- `[ExtensionName <String>]`: Name of the Extension.
- `[FluxConfigurationName <String>]`: Name of the Flux Configuration.
- `[Id <String>]`: Resource identity path
- `[OperationId <String>]`: operation Id
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
- `[SourceControlConfigurationName <String>]`: Name of the Source Control Configuration.
- `[SubscriptionId <String>]`: The ID of the target subscription.

## RELATED LINKS
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
if(($null -eq $TestName) -or ($TestName -contains 'Get-AzKubernetesConfigFluxOperationStatus'))
{
$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1'
if (-Not (Test-Path -Path $loadEnvPath)) {
$loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1'
}
. ($loadEnvPath)
$TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzKubernetesConfigFluxOperationStatus.Recording.json'
$currentPath = $PSScriptRoot
while(-not $mockingPath) {
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File
$currentPath = Split-Path -Path $currentPath -Parent
}
. ($mockingPath | Select-Object -First 1).FullName
}

Describe 'Get-AzKubernetesConfigFluxOperationStatus' {
It 'Get' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}

It 'GetViaIdentity' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
if(($null -eq $TestName) -or ($TestName -contains 'Get-AzKubernetesConfiguration'))
{
$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1'
if (-Not (Test-Path -Path $loadEnvPath)) {
$loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1'
}
. ($loadEnvPath)
$TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzKubernetesConfiguration.Recording.json'
$currentPath = $PSScriptRoot
while(-not $mockingPath) {
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File
$currentPath = Split-Path -Path $currentPath -Parent
}
. ($mockingPath | Select-Object -First 1).FullName
}

Describe 'Get-AzKubernetesConfiguration' {
It 'List' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}

It 'Get' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}

It 'GetViaIdentity' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
if(($null -eq $TestName) -or ($TestName -contains 'Get-AzKubernetesConfigurationFlux'))
{
$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1'
if (-Not (Test-Path -Path $loadEnvPath)) {
$loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1'
}
. ($loadEnvPath)
$TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzKubernetesConfigurationFlux.Recording.json'
$currentPath = $PSScriptRoot
while(-not $mockingPath) {
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File
$currentPath = Split-Path -Path $currentPath -Parent
}
. ($mockingPath | Select-Object -First 1).FullName
}

Describe 'Get-AzKubernetesConfigurationFlux' {
It 'List' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}

It 'Get' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}

It 'GetViaIdentity' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
if(($null -eq $TestName) -or ($TestName -contains 'Get-AzKubernetesExtension'))
{
$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1'
if (-Not (Test-Path -Path $loadEnvPath)) {
$loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1'
}
. ($loadEnvPath)
$TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzKubernetesExtension.Recording.json'
$currentPath = $PSScriptRoot
while(-not $mockingPath) {
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File
$currentPath = Split-Path -Path $currentPath -Parent
}
. ($mockingPath | Select-Object -First 1).FullName
}

Describe 'Get-AzKubernetesExtension' {
It 'List' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}

It 'Get' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}

It 'GetViaIdentity' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
if(($null -eq $TestName) -or ($TestName -contains 'New-AzKubernetesConfiguration'))
{
$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1'
if (-Not (Test-Path -Path $loadEnvPath)) {
$loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1'
}
. ($loadEnvPath)
$TestRecordingFile = Join-Path $PSScriptRoot 'New-AzKubernetesConfiguration.Recording.json'
$currentPath = $PSScriptRoot
while(-not $mockingPath) {
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File
$currentPath = Split-Path -Path $currentPath -Parent
}
. ($mockingPath | Select-Object -First 1).FullName
}

Describe 'New-AzKubernetesConfiguration' {
It 'CreateExpanded' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
if(($null -eq $TestName) -or ($TestName -contains 'New-AzKubernetesConfigurationFlux'))
{
$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1'
if (-Not (Test-Path -Path $loadEnvPath)) {
$loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1'
}
. ($loadEnvPath)
$TestRecordingFile = Join-Path $PSScriptRoot 'New-AzKubernetesConfigurationFlux.Recording.json'
$currentPath = $PSScriptRoot
while(-not $mockingPath) {
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File
$currentPath = Split-Path -Path $currentPath -Parent
}
. ($mockingPath | Select-Object -First 1).FullName
}

Describe 'New-AzKubernetesConfigurationFlux' {
It 'CreateExpanded' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
}
Loading

0 comments on commit 4a59790

Please sign in to comment.