You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ConnectedKubernetes/custom/New-AzConnectedKubernetes.ps1
+28-34Lines changed: 28 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -188,13 +188,18 @@ function New-AzConnectedKubernetes {
188
188
189
189
#Region check helm install
190
190
try {
191
-
$HelmVersion= helm version --template='{{.Version}}'--kubeconfig $KubeConfig
191
+
$HelmVersion= helm version --template='{{.Version}}'--kubeconfig $KubeConfig
192
192
if ($HelmVersion.Contains("v2")) {
193
-
Write-Error"Helm version 3+ is required. Ensure that you have installed the latest version of Helm. Learn more at https://aka.ms/arc/k8s/onboarding-helm-install"
193
+
Write-Error"Helm version 3+ is required. Learn more at https://aka.ms/arc/k8s/onboarding-helm-install"
194
194
return
195
195
}
196
+
$HelmVersion= helm version --short --kubeconfig $KubeConfig
197
+
if ($HelmVersion.Substring(1,$HelmVersion.Length-1) -ge [System.Version]"3.7") {
198
+
Write-Error"Helm version larger then 3.7 cannot pull that chart azure-arc. Please use 3.6. Learn more at https://aka.ms/arc/k8s/onboarding-helm-install"
199
+
Return
200
+
}
196
201
} catch {
197
-
Write-Error"Helm version 3+ is required. Ensure that you have installed the latest version of Helm. Learn more at https://aka.ms/arc/k8s/onboarding-helm-install"
202
+
Write-Error"Helm version 3+ is required. Learn more at https://aka.ms/arc/k8s/onboarding-helm-install"
198
203
throw
199
204
}
200
205
#EndRegion
@@ -209,21 +214,19 @@ function New-AzConnectedKubernetes {
# Write-Error "The kubernetes cluster you are trying to onboard is already onboarded to the resource group '${ConfigmapRgName}' with resource name '${ConfigmapClusterName}'."
225
-
# }
226
-
# return
223
+
if (($ResourceGroupName-eq$ConfigmapRgName) -and ($ClusterName-eq$ConfigmapClusterName)) {
Write-Error"The kubernetes cluster you are trying to onboard is already onboarded to the resource group '${ConfigmapRgName}' with resource name '${ConfigmapClusterName}'."
0 commit comments