Skip to content

Commit e954245

Browse files
Move ConnectedKubernetes to main (#20958)
* Clean Az.ConnectedKubernetes * Move ConnectedKubernetes to tmp/Az.ConnectedKubernetes (#20957) * Update src/ConnectedKubernetes/Properties/AssemblyInfo.cs --------- Co-authored-by: Azure PowerShell <[email protected]>
1 parent ec1efee commit e954245

23 files changed

+356
-1705
lines changed

src/ConnectedKubernetes/Az.ConnectedKubernetes.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<PsModuleName>ConnectedKubernetes</PsModuleName>
44
</PropertyGroup>
55

6-
<Import Project="$(MSBuildThisFileDirectory)..\Az.autorest.props" />
6+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.autorest.props" />
77
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.Post.props" />
8-
98
</Project>

src/ConnectedKubernetes/Az.ConnectedKubernetes.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 17/01/2023
6+
# Generated on: 2/17/2023
77
#
88

99
@{
@@ -110,7 +110,7 @@ PrivateData = @{
110110
# IconUri = ''
111111

112112
# ReleaseNotes of this module
113-
ReleaseNotes = '* Made ''New-AzConnectedKubernetes'' support PowerShell 5.'
113+
# ReleaseNotes = ''
114114

115115
# Prerelease string of this module
116116
# Prerelease = ''

src/ConnectedKubernetes/Az.ConnectedKubernetes.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
}
3434

3535
if(-not $accountsModule) {
36-
Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop
36+
Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop
3737
} elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) {
3838
Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
3939
}
Lines changed: 38 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,58 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.6.30114.105
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{827D5D9D-228A-4659-ABAA-2B3B46E4E192}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{C9D8E39F-55C3-43C2-93B6-8F00CEFAF786}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{6193F9CE-3F9A-4069-9265-47F4E2440BF8}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{3EDD8420-0387-42B9-8430-D3F4300047A1}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{D3034A38-46C3-44B5-9AD3-7AD369CFBD62}"
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{EB15DC7B-F1FF-4776-AA34-3260552A5A2C}"
1111
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{8EA0C726-FE60-4EE7-A549-BEC861E985FE}"
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{51FC081F-09F5-411C-A2A8-6BB46FCB4BBB}"
1313
EndProject
14-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{7A9EB8DF-4E08-4739-B894-E54D7A6F8311}"
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{42BE450C-B2DE-4958-9F4A-320DFECFD7AE}"
1515
EndProject
16-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ConnectedKubernetes", "Az.ConnectedKubernetes.csproj", "{CD9D5ED3-3724-4AF6-8941-3395986E8D49}"
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{15CFFEBB-F56F-41BB-845F-2A442E5C7523}"
17+
EndProject
18+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ConnectedKubernetes", "Az.ConnectedKubernetes.csproj", "{0BFCE22D-2CB4-49E1-AD29-B84B382D764B}"
1719
EndProject
1820
Global
1921
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2022
Debug|Any CPU = Debug|Any CPU
21-
Debug|x64 = Debug|x64
22-
Debug|x86 = Debug|x86
2323
Release|Any CPU = Release|Any CPU
24-
Release|x64 = Release|x64
25-
Release|x86 = Release|x86
2624
EndGlobalSection
2725
GlobalSection(SolutionProperties) = preSolution
2826
HideSolutionNode = FALSE
2927
EndGlobalSection
3028
GlobalSection(ProjectConfigurationPlatforms) = postSolution
31-
{827D5D9D-228A-4659-ABAA-2B3B46E4E192}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32-
{827D5D9D-228A-4659-ABAA-2B3B46E4E192}.Debug|Any CPU.Build.0 = Debug|Any CPU
33-
{827D5D9D-228A-4659-ABAA-2B3B46E4E192}.Debug|x64.ActiveCfg = Debug|Any CPU
34-
{827D5D9D-228A-4659-ABAA-2B3B46E4E192}.Debug|x64.Build.0 = Debug|Any CPU
35-
{827D5D9D-228A-4659-ABAA-2B3B46E4E192}.Debug|x86.ActiveCfg = Debug|Any CPU
36-
{827D5D9D-228A-4659-ABAA-2B3B46E4E192}.Debug|x86.Build.0 = Debug|Any CPU
37-
{827D5D9D-228A-4659-ABAA-2B3B46E4E192}.Release|Any CPU.ActiveCfg = Release|Any CPU
38-
{827D5D9D-228A-4659-ABAA-2B3B46E4E192}.Release|Any CPU.Build.0 = Release|Any CPU
39-
{827D5D9D-228A-4659-ABAA-2B3B46E4E192}.Release|x64.ActiveCfg = Release|Any CPU
40-
{827D5D9D-228A-4659-ABAA-2B3B46E4E192}.Release|x64.Build.0 = Release|Any CPU
41-
{827D5D9D-228A-4659-ABAA-2B3B46E4E192}.Release|x86.ActiveCfg = Release|Any CPU
42-
{827D5D9D-228A-4659-ABAA-2B3B46E4E192}.Release|x86.Build.0 = Release|Any CPU
43-
{6193F9CE-3F9A-4069-9265-47F4E2440BF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
44-
{6193F9CE-3F9A-4069-9265-47F4E2440BF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
45-
{6193F9CE-3F9A-4069-9265-47F4E2440BF8}.Debug|x64.ActiveCfg = Debug|Any CPU
46-
{6193F9CE-3F9A-4069-9265-47F4E2440BF8}.Debug|x64.Build.0 = Debug|Any CPU
47-
{6193F9CE-3F9A-4069-9265-47F4E2440BF8}.Debug|x86.ActiveCfg = Debug|Any CPU
48-
{6193F9CE-3F9A-4069-9265-47F4E2440BF8}.Debug|x86.Build.0 = Debug|Any CPU
49-
{6193F9CE-3F9A-4069-9265-47F4E2440BF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
50-
{6193F9CE-3F9A-4069-9265-47F4E2440BF8}.Release|Any CPU.Build.0 = Release|Any CPU
51-
{6193F9CE-3F9A-4069-9265-47F4E2440BF8}.Release|x64.ActiveCfg = Release|Any CPU
52-
{6193F9CE-3F9A-4069-9265-47F4E2440BF8}.Release|x64.Build.0 = Release|Any CPU
53-
{6193F9CE-3F9A-4069-9265-47F4E2440BF8}.Release|x86.ActiveCfg = Release|Any CPU
54-
{6193F9CE-3F9A-4069-9265-47F4E2440BF8}.Release|x86.Build.0 = Release|Any CPU
55-
{D3034A38-46C3-44B5-9AD3-7AD369CFBD62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
56-
{D3034A38-46C3-44B5-9AD3-7AD369CFBD62}.Debug|Any CPU.Build.0 = Debug|Any CPU
57-
{D3034A38-46C3-44B5-9AD3-7AD369CFBD62}.Debug|x64.ActiveCfg = Debug|Any CPU
58-
{D3034A38-46C3-44B5-9AD3-7AD369CFBD62}.Debug|x64.Build.0 = Debug|Any CPU
59-
{D3034A38-46C3-44B5-9AD3-7AD369CFBD62}.Debug|x86.ActiveCfg = Debug|Any CPU
60-
{D3034A38-46C3-44B5-9AD3-7AD369CFBD62}.Debug|x86.Build.0 = Debug|Any CPU
61-
{D3034A38-46C3-44B5-9AD3-7AD369CFBD62}.Release|Any CPU.ActiveCfg = Release|Any CPU
62-
{D3034A38-46C3-44B5-9AD3-7AD369CFBD62}.Release|Any CPU.Build.0 = Release|Any CPU
63-
{D3034A38-46C3-44B5-9AD3-7AD369CFBD62}.Release|x64.ActiveCfg = Release|Any CPU
64-
{D3034A38-46C3-44B5-9AD3-7AD369CFBD62}.Release|x64.Build.0 = Release|Any CPU
65-
{D3034A38-46C3-44B5-9AD3-7AD369CFBD62}.Release|x86.ActiveCfg = Release|Any CPU
66-
{D3034A38-46C3-44B5-9AD3-7AD369CFBD62}.Release|x86.Build.0 = Release|Any CPU
67-
{8EA0C726-FE60-4EE7-A549-BEC861E985FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
68-
{8EA0C726-FE60-4EE7-A549-BEC861E985FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
69-
{8EA0C726-FE60-4EE7-A549-BEC861E985FE}.Debug|x64.ActiveCfg = Debug|Any CPU
70-
{8EA0C726-FE60-4EE7-A549-BEC861E985FE}.Debug|x64.Build.0 = Debug|Any CPU
71-
{8EA0C726-FE60-4EE7-A549-BEC861E985FE}.Debug|x86.ActiveCfg = Debug|Any CPU
72-
{8EA0C726-FE60-4EE7-A549-BEC861E985FE}.Debug|x86.Build.0 = Debug|Any CPU
73-
{8EA0C726-FE60-4EE7-A549-BEC861E985FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
74-
{8EA0C726-FE60-4EE7-A549-BEC861E985FE}.Release|Any CPU.Build.0 = Release|Any CPU
75-
{8EA0C726-FE60-4EE7-A549-BEC861E985FE}.Release|x64.ActiveCfg = Release|Any CPU
76-
{8EA0C726-FE60-4EE7-A549-BEC861E985FE}.Release|x64.Build.0 = Release|Any CPU
77-
{8EA0C726-FE60-4EE7-A549-BEC861E985FE}.Release|x86.ActiveCfg = Release|Any CPU
78-
{8EA0C726-FE60-4EE7-A549-BEC861E985FE}.Release|x86.Build.0 = Release|Any CPU
79-
{7A9EB8DF-4E08-4739-B894-E54D7A6F8311}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
80-
{7A9EB8DF-4E08-4739-B894-E54D7A6F8311}.Debug|Any CPU.Build.0 = Debug|Any CPU
81-
{7A9EB8DF-4E08-4739-B894-E54D7A6F8311}.Debug|x64.ActiveCfg = Debug|Any CPU
82-
{7A9EB8DF-4E08-4739-B894-E54D7A6F8311}.Debug|x64.Build.0 = Debug|Any CPU
83-
{7A9EB8DF-4E08-4739-B894-E54D7A6F8311}.Debug|x86.ActiveCfg = Debug|Any CPU
84-
{7A9EB8DF-4E08-4739-B894-E54D7A6F8311}.Debug|x86.Build.0 = Debug|Any CPU
85-
{7A9EB8DF-4E08-4739-B894-E54D7A6F8311}.Release|Any CPU.ActiveCfg = Release|Any CPU
86-
{7A9EB8DF-4E08-4739-B894-E54D7A6F8311}.Release|Any CPU.Build.0 = Release|Any CPU
87-
{7A9EB8DF-4E08-4739-B894-E54D7A6F8311}.Release|x64.ActiveCfg = Release|Any CPU
88-
{7A9EB8DF-4E08-4739-B894-E54D7A6F8311}.Release|x64.Build.0 = Release|Any CPU
89-
{7A9EB8DF-4E08-4739-B894-E54D7A6F8311}.Release|x86.ActiveCfg = Release|Any CPU
90-
{7A9EB8DF-4E08-4739-B894-E54D7A6F8311}.Release|x86.Build.0 = Release|Any CPU
91-
{CD9D5ED3-3724-4AF6-8941-3395986E8D49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
92-
{CD9D5ED3-3724-4AF6-8941-3395986E8D49}.Debug|Any CPU.Build.0 = Debug|Any CPU
93-
{CD9D5ED3-3724-4AF6-8941-3395986E8D49}.Debug|x64.ActiveCfg = Debug|Any CPU
94-
{CD9D5ED3-3724-4AF6-8941-3395986E8D49}.Debug|x64.Build.0 = Debug|Any CPU
95-
{CD9D5ED3-3724-4AF6-8941-3395986E8D49}.Debug|x86.ActiveCfg = Debug|Any CPU
96-
{CD9D5ED3-3724-4AF6-8941-3395986E8D49}.Debug|x86.Build.0 = Debug|Any CPU
97-
{CD9D5ED3-3724-4AF6-8941-3395986E8D49}.Release|Any CPU.ActiveCfg = Release|Any CPU
98-
{CD9D5ED3-3724-4AF6-8941-3395986E8D49}.Release|Any CPU.Build.0 = Release|Any CPU
99-
{CD9D5ED3-3724-4AF6-8941-3395986E8D49}.Release|x64.ActiveCfg = Release|Any CPU
100-
{CD9D5ED3-3724-4AF6-8941-3395986E8D49}.Release|x64.Build.0 = Release|Any CPU
101-
{CD9D5ED3-3724-4AF6-8941-3395986E8D49}.Release|x86.ActiveCfg = Release|Any CPU
102-
{CD9D5ED3-3724-4AF6-8941-3395986E8D49}.Release|x86.Build.0 = Release|Any CPU
29+
{C9D8E39F-55C3-43C2-93B6-8F00CEFAF786}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30+
{C9D8E39F-55C3-43C2-93B6-8F00CEFAF786}.Debug|Any CPU.Build.0 = Debug|Any CPU
31+
{C9D8E39F-55C3-43C2-93B6-8F00CEFAF786}.Release|Any CPU.ActiveCfg = Release|Any CPU
32+
{C9D8E39F-55C3-43C2-93B6-8F00CEFAF786}.Release|Any CPU.Build.0 = Release|Any CPU
33+
{3EDD8420-0387-42B9-8430-D3F4300047A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34+
{3EDD8420-0387-42B9-8430-D3F4300047A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
35+
{3EDD8420-0387-42B9-8430-D3F4300047A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
36+
{3EDD8420-0387-42B9-8430-D3F4300047A1}.Release|Any CPU.Build.0 = Release|Any CPU
37+
{EB15DC7B-F1FF-4776-AA34-3260552A5A2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38+
{EB15DC7B-F1FF-4776-AA34-3260552A5A2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
39+
{EB15DC7B-F1FF-4776-AA34-3260552A5A2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
40+
{EB15DC7B-F1FF-4776-AA34-3260552A5A2C}.Release|Any CPU.Build.0 = Release|Any CPU
41+
{51FC081F-09F5-411C-A2A8-6BB46FCB4BBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42+
{51FC081F-09F5-411C-A2A8-6BB46FCB4BBB}.Debug|Any CPU.Build.0 = Debug|Any CPU
43+
{51FC081F-09F5-411C-A2A8-6BB46FCB4BBB}.Release|Any CPU.ActiveCfg = Release|Any CPU
44+
{51FC081F-09F5-411C-A2A8-6BB46FCB4BBB}.Release|Any CPU.Build.0 = Release|Any CPU
45+
{42BE450C-B2DE-4958-9F4A-320DFECFD7AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46+
{42BE450C-B2DE-4958-9F4A-320DFECFD7AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
47+
{42BE450C-B2DE-4958-9F4A-320DFECFD7AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
48+
{42BE450C-B2DE-4958-9F4A-320DFECFD7AE}.Release|Any CPU.Build.0 = Release|Any CPU
49+
{15CFFEBB-F56F-41BB-845F-2A442E5C7523}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50+
{15CFFEBB-F56F-41BB-845F-2A442E5C7523}.Debug|Any CPU.Build.0 = Debug|Any CPU
51+
{15CFFEBB-F56F-41BB-845F-2A442E5C7523}.Release|Any CPU.ActiveCfg = Release|Any CPU
52+
{15CFFEBB-F56F-41BB-845F-2A442E5C7523}.Release|Any CPU.Build.0 = Release|Any CPU
53+
{0BFCE22D-2CB4-49E1-AD29-B84B382D764B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54+
{0BFCE22D-2CB4-49E1-AD29-B84B382D764B}.Debug|Any CPU.Build.0 = Debug|Any CPU
55+
{0BFCE22D-2CB4-49E1-AD29-B84B382D764B}.Release|Any CPU.ActiveCfg = Release|Any CPU
56+
{0BFCE22D-2CB4-49E1-AD29-B84B382D764B}.Release|Any CPU.Build.0 = Release|Any CPU
10357
EndGlobalSection
10458
EndGlobal
-160 Bytes
Binary file not shown.

src/ConnectedKubernetes/custom/New-AzConnectedKubernetes.ps1

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,12 @@ function New-AzConnectedKubernetes {
336336
$HelmRepoUrl = Get-ChildItem -Path Env:HELMREPOURL
337337
helm repo add $HelmRepoName $HelmRepoUrl --kubeconfig $KubeConfig --kube-context $KubeContext
338338
}
339-
339+
340+
$resources = Get-Module Az.Resources -ListAvailable
341+
if ($null -eq $resources) {
342+
Write-Error "Missing required module(s): Az.Resources. Please run 'Install-Module Az.Resources -Repository PSGallery' to install Az.Resources."
343+
return
344+
}
340345
if (Test-Path Env:HELMREGISTRY) {
341346
$RegisteryPath = Get-ChildItem -Path Env:HELMREGISTRY
342347
} else {
@@ -345,8 +350,7 @@ function New-AzConnectedKubernetes {
345350
$ReleaseTrain = Get-ChildItem -Path Env:RELEASETRAIN
346351
} else {
347352
$ReleaseTrain = 'stable'
348-
}
349-
353+
}
350354
$AzLocation = Get-AzLocation | Where-Object { ($_.DisplayName -ieq $Location) -or ($_.Location -ieq $Location)}
351355
$Region = $AzLocation.Location
352356
if ($null -eq $Region) {
@@ -372,17 +376,16 @@ function New-AzConnectedKubernetes {
372376
if ($Response.StatusCode -eq 200) {
373377
$RegisteryPath = ($Response.Content | ConvertFrom-Json).repositoryPath
374378
} else {
375-
Write-Error "Error while fetching helm chart registry path: ${$Response.RawContent}"
376-
throw
379+
throw "Error while fetching helm chart registry path: ${$Response.RawContent}"
380+
377381
}
378382
}
379383
Set-Item -Path Env:HELM_EXPERIMENTAL_OCI -Value 1
380384
#Region pull helm chart
381385
try {
382386
helm chart pull $RegisteryPath --kubeconfig $KubeConfig --kube-context $KubeContext
383387
} catch {
384-
Write-Error "Unable to pull helm chart from the registery $RegisteryPath"
385-
throw
388+
throw "Unable to pull helm chart from the registery $RegisteryPath"
386389
}
387390
#Endregion
388391

@@ -404,13 +407,12 @@ function New-AzConnectedKubernetes {
404407
$RSA = [System.Security.Cryptography.RSA]::Create(4096)
405408
if ($PSVersionTable.PSVersion.Major -eq 5) {
406409
try {
407-
. "$PSScriptRoot/../utils/RSAHelper.ps1"
410+
. "$PSScriptRoot/RSAHelper.ps1"
408411
$AgentPublicKey = ExportRSAPublicKeyBase64($RSA)
409412
$AgentPrivateKey = ExportRSAPrivateKeyBase64($RSA)
410413
$AgentPrivateKey = "-----BEGIN RSA PRIVATE KEY-----`n" + $AgentPrivateKey + "`n-----END RSA PRIVATE KEY-----"
411414
} catch {
412-
Write-Error "Unable to generate RSA keys"
413-
throw
415+
throw "Unable to generate RSA keys"
414416
}
415417
} else {
416418
$AgentPublicKey = [System.Convert]::ToBase64String($RSA.ExportRSAPublicKey())
@@ -459,8 +461,7 @@ function New-AzConnectedKubernetes {
459461
$options += " --set global.isCustomCert=true"
460462
}
461463
} catch {
462-
Write-Error "Unable to find ProxyCert from file path"
463-
throw
464+
throw "Unable to find ProxyCert from file path"
464465
}
465466
if ($DisableAutoUpgrade) {
466467
$options += " --set systemDefaultValues.azureArcAgents.autoUpdate=false"

src/ConnectedKubernetes/custom/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ These provide functionality to our HTTP pipeline and other useful features. In s
3232
### Attributes
3333
For processing the cmdlets, we've created some additional attributes:
3434
- `Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.DescriptionAttribute`
35-
- Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
35+
- Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
3636
- `Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.DoNotExportAttribute`
3737
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.ConnectedKubernetes`.
3838
- `Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.InternalExportAttribute`

src/ConnectedKubernetes/utils/RSAHelper.ps1 renamed to src/ConnectedKubernetes/custom/RSAHelper.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
function ExportRSAPrivateKeyBase64{
2+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.DoNotExportAttribute()]
23
param(
34
[Parameter(Mandatory)]
45
[System.Security.Cryptography.RSA]
@@ -35,6 +36,7 @@ function ExportRSAPrivateKeyBase64{
3536
}
3637

3738
function ExportRSAPublicKeyBase64{
39+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.DoNotExportAttribute()]
3840
param(
3941
[Parameter(Mandatory)]
4042
[System.Security.Cryptography.RSA]
@@ -62,6 +64,7 @@ function ExportRSAPublicKeyBase64{
6264
}
6365

6466
function EncodeLength{
67+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.DoNotExportAttribute()]
6568
param(
6669
[System.IO.BinaryWriter]$stream,
6770
[int]$length
@@ -95,6 +98,7 @@ function EncodeLength{
9598
}
9699

97100
function EncodeIntegerBigEndian{
101+
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.DoNotExportAttribute()]
98102
param(
99103
[System.IO.BinaryWriter]$stream,
100104
[byte[]]$value,

src/ConnectedKubernetes/docs/Az.ConnectedKubernetes.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)