Skip to content

Commit

Permalink
[BUG] Fix #49 #37 (#51)
Browse files Browse the repository at this point in the history
* [BUG] InvalidSubscriptionId whenconnectingtoArc#49
* Remove PolicyInsights
  • Loading branch information
parameshbabu authored Jan 24, 2023
1 parent e273367 commit 9e3ca9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions tools/modules/AksEdgeDeploy/AksEdge-Arc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ New-Variable -Option Constant -ErrorAction SilentlyContinue -Name azcmagentexe -

New-Variable -Option Constant -ErrorAction SilentlyContinue -Name arciotEnvConfig -Value @{
"RPNamespaces" = @("Microsoft.HybridCompute", "Microsoft.GuestConfiguration", "Microsoft.HybridConnectivity",
"Microsoft.Kubernetes", "Microsoft.KubernetesConfiguration", "Microsoft.ExtendedLocation", "Microsoft.PolicyInsights")
"Microsoft.Kubernetes", "Microsoft.KubernetesConfiguration", "Microsoft.ExtendedLocation")
"ArcExtensions" = @("MicrosoftMonitoringAgent", "CustomScriptExtension")
"ReqRoles" = @("Azure Connected Machine Onboarding", "Kubernetes Cluster - Azure Arc Onboarding")
"AzExtensions" = @("connectedmachine", "connectedk8s", "customlocation", "k8s-extension")
Expand Down Expand Up @@ -469,7 +469,8 @@ function Get-AideArcServerInfo {
}
$vmInfo = @{}
$apiVersion = "2020-06-01"
$InstanceUri = $env:IMDS_ENDPOINT + "/metadata/instance?api-version=$apiVersion"
$imdsEndpoint = [System.Environment]::GetEnvironmentVariable("IMDS_ENDPOINT","Machine")
$InstanceUri = $imdsEndpoint + "/metadata/instance?api-version=$apiVersion"
$Proxy = New-Object System.Net.WebProxy
$WebSession = New-Object Microsoft.PowerShell.Commands.WebRequestSession
$WebSession.Proxy = $Proxy
Expand Down Expand Up @@ -640,7 +641,8 @@ function Get-AideArcServerSMI {
$token = $null
$apiVersion = "2020-06-01"
$resource = "https://management.azure.com/"
$endpoint = "{0}?resource={1}&api-version={2}" -f $env:IDENTITY_ENDPOINT, $resource, $apiVersion
$idEndpoint = [System.Environment]::GetEnvironmentVariable("IDENTITY_ENDPOINT","Machine")
$endpoint = "{0}?resource={1}&api-version={2}" -f $idEndpoint, $resource, $apiVersion
$secretFile = ""
try {
Invoke-WebRequest -Method GET -Uri $endpoint -Headers @{Metadata = 'True' } -UseBasicParsing
Expand Down
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.230119.1200'
ModuleVersion = '1.0.230123.1500'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down

0 comments on commit 9e3ca9b

Please sign in to comment.