Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Microsoft.PolicyInsights extension for public preview #83

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/k8s-extension/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

1.0.1
++++++++++++++++++
* Enable Microsoft.PolicyInsights extension type

1.0.0
++++++++++++++++++
* Switch to GA api-version of Extensions (2021-09-01)
Expand Down
2 changes: 1 addition & 1 deletion src/k8s-extension/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# TODO: Add any additional SDK dependencies here
DEPENDENCIES = []

VERSION = "1.0.0"
VERSION = "1.0.1"

with open('README.rst', 'r', encoding='utf-8') as f:
README = f.read()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@ Describe 'Azure Policy Testing' {
$isAutoUpgradeMinorVersion = ($output | ConvertFrom-Json).autoUpgradeMinorVersion
$isAutoUpgradeMinorVersion.ToString() -eq "True" | Should -BeTrue

# Check that we get the principal id back for the created identity
$principalId = ($output | ConvertFrom-Json).identity.principalId
$principalId | Should -Not -BeNullOrEmpty

# Loop and retry until the extension installs
$n = 0
do
{
if (Get-ExtensionStatus $extensionName -eq $SUCCESS_MESSAGE) {
if (Get-PodStatus $extensionAgentName -Namespace $extensionAgentNamespace -eq $POD_RUNNING) {
break
}
# Only check the extension config, not the pod since this doesn't bring up pods
$output = Invoke-Expression "az $Env:K8sExtensionName show -c $($ENVCONFIG.arcClusterName) -g $($ENVCONFIG.resourceGroup) --cluster-type connectedClusters -n $extensionName" -ErrorVariable badOut
$provisioningState = ($output | ConvertFrom-Json).provisioningState
Write-Host "Got ProvisioningState: $provisioningState for the extension"
if ((Has-ExtensionData $extensionName) -And ($provisioningState -eq "Succeeded")) {
break
}
Start-Sleep -Seconds 10
$n += 1
Expand Down