Skip to content

Commit

Permalink
Az ConnectedKubernetes 0.9.0 intake (#91)
Browse files Browse the repository at this point in the history
* Az ConnectedKubernetes 0.9.0
* remove azure-arc-release patch - 0.9.0 version fix
  • Loading branch information
parameshbabu authored Mar 14, 2023
1 parent e9f52f0 commit 34a8a25
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tools/aksedge-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Version": "1.0",
"DeploymentType": "SingleMachineCluster",
"Init": {
"ServiceIPRangeSize": 0
"ServiceIPRangeSize": 10
},
"Arc": {
"ClusterName": null,
Expand Down
15 changes: 4 additions & 11 deletions tools/modules/AksEdgeDeploy/AksEdgeDeploy-AEC.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ New-Variable -Option Constant -ErrorAction SilentlyContinue -Name arcEdgeInstall
"PSModules" = @(
@{Name="Az.Resources"; Version="6.4.1"; Flags="-AllowClobber"},
@{Name="Az.Accounts"; Version="2.11.2"; Flags="-AllowClobber"},
@{Name="Az.ConnectedKubernetes"; Version="0.8.0"; Flags="-AllowClobber"}
@{Name="Az.ConnectedKubernetes"; Version="0.9.0"; Flags="-AllowClobber"}
)
"Urls" = @{
helm = "https://k8connecthelm.azureedge.net/helm/helm-v3.6.3-windows-amd64.zip"
Expand Down Expand Up @@ -287,15 +287,15 @@ function Test-ArcEdgeAzModules {
$pkgproviders = Get-PackageProvider
if ($pkgproviders.Name -notcontains "NuGet"){
Write-Host "Installing NuGet"
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Confirm:$false
} else { Write-Host "NuGet found" -ForegroundColor Green }

Write-Host "Checking Helm"
$helmRoot = "$env:USERPROFILE\.Azure\helm"
$helmDir = "$helmRoot\windows-amd64"
if (!(($env:Path).Contains($helmDir))) {
$env:Path = "$helmDir;$env:Path"
[Environment]::SetEnvironmentVariable('Path', $env:Path)
[Environment]::SetEnvironmentVariable('Path', $env:Path,"Machine")
}
$cmd = Get-Command helm -ErrorAction SilentlyContinue
if ($null -eq $cmd)
Expand Down Expand Up @@ -375,7 +375,7 @@ function Connect-AideArcKubernetes {
#Arc for server is already connected. So try updating tags
$serverid = "/subscriptions/$($serverinfo.SubscriptionId)/resourceGroups/$($serverinfo.ResourceGroupName)/providers/Microsoft.HybridCompute/machines/$($serverinfo.Name)"
$clustername = Get-AideArcClusterName
$tag = @{ AKSEE="$clustername" }
$tag = @{ "AKSEE"="$clustername" }
$result = Update-AzTag -ResourceId $serverid -Tag $tag -Operation Merge
Write-Verbose $result
}
Expand All @@ -386,12 +386,5 @@ function Disconnect-AideArcKubernetes {
$usrCfg = Get-AideUserConfig
$json = ($usrCfg.AksEdgeConfig | ConvertTo-Json )
$retVal = Disconnect-AksEdgeArc -JsonConfigString $json
if ($retVal -eq "OK") {
#patch to remove azure-arc-release namespace
$namespaces = (kubectl get namespaces -o custom-columns=NAME:.metadata.name --no-headers)
if ($namespaces.Contains("azure-arc-release")) {
kubectl delete namespace azure-arc-release
}
}
return ($retVal -eq "OK")
}
2 changes: 1 addition & 1 deletion tools/modules/AksEdgeDeploy/AksEdgeDeploy.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AksEdgeDeploy.psm1'

# Version number of this module.
ModuleVersion = '1.0.230227.1200'
ModuleVersion = '1.0.230313.1200'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down

0 comments on commit 34a8a25

Please sign in to comment.