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

Extensions GA changes into Public Branch #79

Merged
merged 75 commits into from
Oct 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
7a1c59b
Add openservicemesh back
jonathan-innis Mar 12, 2021
a38e542
OpenServiceMesh import
jonathan-innis Mar 12, 2021
bffc5e8
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis Mar 16, 2021
e2f9b69
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis Mar 16, 2021
7b7374b
Update osm with new extension model
jonathan-innis Mar 16, 2021
fd21583
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis Mar 16, 2021
07deb63
Merge branch 'master' of https://github.com/Azure/azure-cli-extension…
Mar 17, 2021
2fcf7b5
Merge branch 'k8s-extension/public' of https://github.com/AzureArcFor…
Mar 17, 2021
765f5e0
Merge branch 'release' into k8s-extension/private
jonathan-innis Mar 19, 2021
3a9037c
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis Mar 22, 2021
53648af
Merge branch 'k8s-extension/public' of https://github.com/AzureArcFor…
Mar 23, 2021
027a879
Merge branch 'k8s-extension/public' of https://github.com/AzureArcFor…
Mar 24, 2021
a28887c
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis Mar 24, 2021
6aa8f93
Add back private file
jonathan-innis Mar 24, 2021
02b5c1a
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis Mar 24, 2021
6ff6790
Add Azure ML to list of private extensions (#16)
jonathan-innis Mar 24, 2021
b1a0467
Merge branch 'k8s-extension/public' of https://github.com/AzureArcFor…
Mar 25, 2021
092caec
Merge branch 'k8s-extension/public' of https://github.com/AzureArcFor…
Mar 26, 2021
9882964
Merge branch 'k8s-extension/public' of https://github.com/AzureArcFor…
Mar 27, 2021
23b0be6
Merge branch 'k8s-extension/public' of https://github.com/AzureArcFor…
Mar 31, 2021
6742ef4
Merge branch 'k8s-extension/public' of https://github.com/AzureArcFor…
Apr 1, 2021
ff0f18c
Update k8s-custom-pipelines.yml
jonathan-innis Apr 1, 2021
e2cc7ab
Merge branch 'k8s-extension/public' of https://github.com/AzureArcFor…
Apr 2, 2021
5cd6c0e
Merge branch 'k8s-extension/public' of https://github.com/AzureArcFor…
Apr 3, 2021
01e9117
Add Microsoft.PolicyInsights extension (#17)
nreisch Apr 4, 2021
64c3e07
Add HISTORY_private file for private preview
jonathan-innis Apr 5, 2021
e1cc029
Change versioning scheme
jonathan-innis Apr 5, 2021
aaead75
Merge branch 'k8s-extension/public' of https://github.com/AzureArcFor…
Apr 11, 2021
65205dc
Update the code for supporting both extensions at once
jonathan-innis Apr 14, 2021
20e873e
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis Apr 14, 2021
5e2e1df
Fix style issue
jonathan-innis Apr 15, 2021
5f63d3f
Remove old consts file
jonathan-innis Apr 15, 2021
cf2752c
Merge branch 'k8s-extension/public' of https://github.com/AzureArcFor…
Apr 18, 2021
b25ae93
change the resource tag from managed_by:amlk8s to created_by:amlk8s-e…
yuyue9284 Apr 23, 2021
aac8e9d
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis Apr 27, 2021
ce15d89
Merge branch 'k8s-extension/public' of https://github.com/AzureArcFor…
May 3, 2021
c3ff2d5
Update the beta version with upstream
jonathan-innis May 3, 2021
4c5e681
Update the private history file
jonathan-innis May 3, 2021
815d77f
Add upgrade pip to pipeline
jonathan-innis May 6, 2021
2c530f7
Move pip install within virtualenv
jonathan-innis May 6, 2021
b15dd7e
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis May 6, 2021
d50632e
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis May 6, 2021
19ed95c
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis May 11, 2021
9ae4976
Merge in k8s-extension/public (0.3.1) (#32)
jonathan-innis May 11, 2021
648011a
Merge branch 'k8s-extension/private' of github.com:AzureArcForKuberne…
jonathan-innis May 13, 2021
5d962d5
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis May 18, 2021
4b33818
Release Version 0.4.0-b1 (#37)
jonathan-innis May 18, 2021
d52a3c2
K8s extension/private 0.4.0b2 (#41)
jonathan-innis May 24, 2021
ec9ce97
Upgrade to v0.5.2
jonathan-innis Jul 9, 2021
2e5b391
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis Jul 9, 2021
0fe381e
Fix policy bug
jonathan-innis Jul 9, 2021
655ae86
Increase private version
jonathan-innis Jul 9, 2021
464fd61
Update consts_private.py
anagg929 Jul 9, 2021
00e1e72
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis Jul 20, 2021
81c3800
Increase private version
jonathan-innis Jul 20, 2021
3bd5d7d
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis Jul 28, 2021
5f80929
Increase version with public
jonathan-innis Jul 28, 2021
d725e93
Add flux to private version
jonathan-innis Jul 28, 2021
14e1814
Update models for 2021-05-01-preview
jonathan-innis Jul 28, 2021
4b20bf2
Add async models to version
jonathan-innis Jul 28, 2021
f755050
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis Jul 28, 2021
a3a2590
Add no wait to delete and create
jonathan-innis Jul 29, 2021
b2e5085
support managed cluster
anagg929 Jul 29, 2021
6e904cb
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis Sep 20, 2021
2424b63
Bump version
jonathan-innis Sep 20, 2021
3ebeaaa
Pin helm version
jonathan-innis Sep 20, 2021
09cec31
Merge branch 'k8s-extension/public' into k8s-extension/private
jonathan-innis Sep 20, 2021
e651808
Add cmd to delete call
jonathan-innis Sep 20, 2021
180e98c
Add force deletion
jonathan-innis Sep 20, 2021
30fa2ad
add dapr extension (#78)
ZeroMagic Oct 15, 2021
6cc9ce8
Merge branch 'k8s-extension/public' of github.com:AzureArcForKubernet…
jonathan-innis Oct 15, 2021
9b687b1
Fix failing integration tests
jonathan-innis Oct 15, 2021
083178d
Adding the GA changes for private branch
Oct 15, 2021
68232b4
Fix confirm prompt
jonathan-innis Oct 19, 2021
4aa9011
Fix update E2E tests
jonathan-innis Oct 19, 2021
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
7 changes: 7 additions & 0 deletions src/k8s-extension/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
Release History
===============

1.0.0
++++++++++++++++++
* Switch to GA api-version of Extensions (2021-09-01)
* Support Extensions PATCH
* Enable Dapr extension type
* Enable ManagedClusters clusterType

0.7.1
++++++++++++++++++
* Fix DF resource manager endpoint check
Expand Down
16 changes: 15 additions & 1 deletion src/k8s-extension/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,18 @@ az k8s-extension list \
--cluster-type clusterType
```

If you have issues, please give feedback by opening an issue at https://github.com/Azure/azure-cli-extensions/issues.
##### Update an existing KubernetesExtension of a cluster
```
az k8s-extension update \
--resource-group groupName \
--cluster-name clusterName \
--cluster-type clusterType \
--name extensionName \
--auto-upgrade true/false \
--version extensionVersion \
--release-train releaseTrain \
--configuration-settings settingsKey=settingsValue \
--configuration-protected-settings protectedSettingsKey=protectedValue \
--configuration-settings-file configSettingsFile \
--configuration-protected-settings-file protectedSettingsFile
```
8 changes: 4 additions & 4 deletions src/k8s-extension/azext_k8s_extension/_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def k8s_extension_show_table_format(result):
def __get_table_row(result):
return OrderedDict([
('name', result['name']),
('extensionType', result['extensionType']),
('version', result['version']),
('installState', result['installState']),
('lastModifiedTime', result['lastModifiedTime'])
('extensionType', result.get('extensionType', '')),
('version', result.get('version', '')),
('provisioningState', result.get('provisioningState', '')),
('lastModifiedAt', result.get('systemData', {}).get('lastModifiedAt', '')),
])
37 changes: 27 additions & 10 deletions src/k8s-extension/azext_k8s_extension/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@
examples:
- name: Create a Kubernetes Extension
text: |-
az {consts.EXTENSION_NAME} create --resource-group my-resource-group \\
--cluster-name mycluster --cluster-type connectedClusters \\
--name myextension --extension-type microsoft.openservicemesh \\
--scope cluster --release-train stable
az {consts.EXTENSION_NAME} create --resource-group my-resource-group \
--cluster-name mycluster --cluster-type connectedClusters --name myextension \
--extension-type microsoft.openservicemesh --scope cluster --release-train stable
"""

helps[f'{consts.EXTENSION_NAME} list'] = f"""
Expand All @@ -31,8 +30,8 @@
examples:
- name: List all Kubernetes Extensions on a cluster
text: |-
az {consts.EXTENSION_NAME} list --resource-group my-resource-group \\
--cluster-name mycluster --cluster-type connectedClusters
az {consts.EXTENSION_NAME} list --resource-group my-resource-group \
--cluster-name mycluster --cluster-type connectedClusters
"""

helps[f'{consts.EXTENSION_NAME} delete'] = f"""
Expand All @@ -41,8 +40,8 @@
examples:
- name: Delete an existing Kubernetes Extension
text: |-
az {consts.EXTENSION_NAME} delete --resource-group my-resource-group \\
--cluster-name mycluster --cluster-type connectedClusters --name myextension
az {consts.EXTENSION_NAME} delete --resource-group my-resource-group \
--cluster-name mycluster --cluster-type connectedClusters --name myextension
"""

helps[f'{consts.EXTENSION_NAME} show'] = f"""
Expand All @@ -51,6 +50,24 @@
examples:
- name: Show details of a Kubernetes Extension
text: |-
az {consts.EXTENSION_NAME} show --resource-group my-resource-group \\
--cluster-name mycluster --cluster-type connectedClusters --name myextension
az {consts.EXTENSION_NAME} show --resource-group my-resource-group \
--cluster-name mycluster --cluster-type connectedClusters --name myextension
"""

helps[f'{consts.EXTENSION_NAME} update'] = f"""
type: command
short-summary: Update mutable properties of a Kubernetes Extension.
long-summary: For update to ConfigSettings and ConfigProtectedSettings, please \
refer to documentation of the cluster extension service to check update to these \
properties is supported before updating these properties.
examples:
- name: Update a Kubernetes Extension
text: |-
az {consts.EXTENSION_NAME} update --resource-group my-resource-group \
--cluster-name mycluster --cluster-type connectedClusters \
--name myextension --auto-upgrade true/false --version extension-version \
--release-train stable --configuration-settings settings-key=settings-value \
--configuration-protected-settings protected-settings-key=protected-value \
--configuration-settings-file=config-settings-file \
--configuration-protected-settings-file=protected-settings-file
"""
11 changes: 8 additions & 3 deletions src/k8s-extension/azext_k8s_extension/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

from azure.cli.core.commands.parameters import (
get_enum_type,
get_three_state_flag,
tags_type
get_three_state_flag
jonathan-innis marked this conversation as resolved.
Show resolved Hide resolved
)
from azure.cli.core.commands.validators import get_default_location_from_resource_group
from . import consts
Expand All @@ -19,7 +18,6 @@

def load_arguments(self, _):
with self.argument_context(consts.EXTENSION_NAME) as c:
c.argument('tags', tags_type)
c.argument('location',
validator=get_default_location_from_resource_group)
c.argument('name',
Expand Down Expand Up @@ -75,7 +73,14 @@ def load_arguments(self, _):
help='Specify the target namespace to install to for the extension instance. This'
' parameter is required if extension scope is set to \'namespace\'')

with self.argument_context(f"{consts.EXTENSION_NAME} update") as c:
c.argument('yes',
options_list=['--yes', '-y'],
help='Ignore confirmation prompts')

with self.argument_context(f"{consts.EXTENSION_NAME} delete") as c:
c.argument('yes',
options_list=['--yes', '-y'],
help='Ignore confirmation prompts')
c.argument('force',
help='Specify whether to force delete the extension from the cluster.')
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.24.0"
}
8 changes: 4 additions & 4 deletions src/k8s-extension/azext_k8s_extension/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ def load_command_table(self, _):
operations_tmpl=consts.EXTENSION_PACKAGE_NAME + '.vendored_sdks.operations#K8sExtensionsOperations.{}',
client_factory=cf_k8s_extension)

with self.command_group(consts.EXTENSION_NAME, k8s_extension_sdk, client_factory=cf_k8s_extension_operation,
is_preview=True) \
with self.command_group(consts.EXTENSION_NAME, k8s_extension_sdk, client_factory=cf_k8s_extension_operation) \
as g:
g.custom_command('create', 'create_k8s_extension')
g.custom_command('delete', 'delete_k8s_extension')
g.custom_command('create', 'create_k8s_extension', supports_no_wait=True)
g.custom_command('delete', 'delete_k8s_extension', supports_no_wait=True)
g.custom_command('list', 'list_k8s_extension', table_transformer=k8s_extension_list_table_format)
g.custom_show_command('show', 'show_k8s_extension', table_transformer=k8s_extension_show_table_format)
g.custom_command('update', 'update_k8s_extension', supports_no_wait=True)
106 changes: 62 additions & 44 deletions src/k8s-extension/azext_k8s_extension/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@
# pylint: disable=unused-argument,too-many-locals

import json
from knack.log import get_logger
from urllib.parse import urlparse
from knack.log import get_logger

from azure.cli.core.azclierror import ResourceNotFoundError, MutuallyExclusiveArgumentError, \
InvalidArgumentValueError, CommandNotFoundError, RequiredArgumentMissingError
InvalidArgumentValueError, RequiredArgumentMissingError
from azure.cli.core.commands.client_factory import get_subscription_id
from azure.cli.core.util import sdk_no_wait
from azure.core.exceptions import HttpResponseError
from .vendored_sdks.models import ConfigurationIdentity, Scope
from .vendored_sdks.models import Identity, Scope
from ._validators import validate_cc_registration

from .partner_extensions.ContainerInsights import ContainerInsights
from .partner_extensions.AzureDefender import AzureDefender
from .partner_extensions.AzureMLKubernetes import AzureMLKubernetes
from .partner_extensions.OpenServiceMesh import OpenServiceMesh
from .partner_extensions.DefaultExtension import DefaultExtension
from .partner_extensions.AzureMLKubernetes import AzureMLKubernetes
from .partner_extensions.Dapr import Dapr
from .partner_extensions.DefaultExtension import DefaultExtension, user_confirmation_factory
from . import consts

from ._client_factory import cf_resources
Expand All @@ -35,6 +37,7 @@ def ExtensionFactory(extension_name):
'microsoft.azuredefender.kubernetes': AzureDefender,
'microsoft.openservicemesh': OpenServiceMesh,
'microsoft.azureml.kubernetes': AzureMLKubernetes,
'microsoft.dapr': Dapr,
}

# Return the extension if we find it in the map, else return the default
Expand All @@ -43,7 +46,6 @@ def ExtensionFactory(extension_name):

def show_k8s_extension(client, resource_group_name, cluster_name, name, cluster_type):
"""Get an existing K8s Extension.

"""
# Determine ClusterRP
cluster_rp = __get_cluster_rp(cluster_type)
Expand Down Expand Up @@ -74,9 +76,8 @@ def create_k8s_extension(cmd, client, resource_group_name, cluster_name, name, c
extension_type, scope=None, auto_upgrade_minor_version=None, release_train=None,
version=None, target_namespace=None, release_namespace=None, configuration_settings=None,
configuration_protected_settings=None, configuration_settings_file=None,
configuration_protected_settings_file=None, tags=None):
configuration_protected_settings_file=None, no_wait=False):
"""Create a new Extension Instance.

"""

extension_type_lower = extension_type.lower()
Expand Down Expand Up @@ -140,60 +141,75 @@ def create_k8s_extension(cmd, client, resource_group_name, cluster_name, name, c
# Create identity, if required
# We don't create the identity if we are in DF
if create_identity and not is_dogfood_cluster(cmd):
extension_instance.identity, extension_instance.location = \
__create_identity(cmd, resource_group_name, cluster_name, cluster_type, cluster_rp)
identity_object, location = __create_identity(cmd, resource_group_name, cluster_name, cluster_type, cluster_rp)
if identity_object is not None and location is not None:
extension_instance.identity, extension_instance.location = identity_object, location

# Try to create the resource
return client.create(resource_group_name, cluster_rp, cluster_type, cluster_name, name, extension_instance)
return sdk_no_wait(no_wait, client.begin_create, resource_group_name,
cluster_rp, cluster_type, cluster_name, name, extension_instance)


def list_k8s_extension(client, resource_group_name, cluster_name, cluster_type):
cluster_rp = __get_cluster_rp(cluster_type)
return client.list(resource_group_name, cluster_rp, cluster_type, cluster_name)


def update_k8s_extension(client, resource_group_name, cluster_type, cluster_name, name,
auto_upgrade_minor_version='', release_train='', version='', tags=None):

def update_k8s_extension(cmd, client, resource_group_name, cluster_name, name, cluster_type,
auto_upgrade_minor_version='', release_train='', version='',
configuration_settings=None, configuration_protected_settings=None,
configuration_settings_file=None, configuration_protected_settings_file=None,
no_wait=False, yes=False):
"""Patch an existing Extension Instance.

"""
msg = ('Updating properties in --config-settings or --config-protected-settings may lead to undesirable state'
' if the cluster extension type does not support it. Please refer to the documentation of the'
' cluster extension service to check if updates to these properties is supported.'
' Do you wish to proceed?')
user_confirmation_factory(cmd, yes, msg)

# TODO: Remove this after we eventually get PATCH implemented for update and uncomment
raise CommandNotFoundError(
f"\"{consts.EXTENSION_NAME} update\" currently is not available. "
f"Use \"{consts.EXTENSION_NAME} create\" to update a previously created extension instance."
)
# Determine ClusterRP
cluster_rp = __get_cluster_rp(cluster_type)

# # Ensure some values are provided for update
# if auto_upgrade_minor_version is None and release_train is None and version is None:
# message = "Error! No values provided for update. Provide new value(s) for one or more of these properties:" \
# " auto-upgrade-minor-version, release-train or version."
# raise RequiredArgumentMissingError(message)
# We need to determine the ExtensionType to call ExtensionFactory and create Extension class
extension = show_k8s_extension(client, resource_group_name, cluster_name, name, cluster_type)
extension_type_lower = extension.extension_type.lower()

# # Determine ClusterRP
# cluster_rp = __get_cluster_rp(cluster_type)
__validate_version_and_auto_upgrade(version, auto_upgrade_minor_version)

# # Get the existing extensionInstance
# extension = client.get(resource_group_name, cluster_rp, cluster_type, cluster_name, name)
config_settings = {}
config_protected_settings = {}
# Get Configuration Settings from file
if configuration_settings_file is not None:
config_settings = __read_config_settings_file(configuration_settings_file)

# extension_type_lower = extension.extension_type.lower()
if configuration_settings is not None:
for dicts in configuration_settings:
for key, value in dicts.items():
config_settings[key] = value

# Get Configuration Protected Settings from file
if configuration_protected_settings_file is not None:
config_protected_settings = __read_config_settings_file(configuration_protected_settings_file)

# # Get the extension class based on the extension name
# extension_class = ExtensionFactory(extension_type_lower)
# upd_extension = extension_class.Update(extension, auto_upgrade_minor_version, release_train, version)
if configuration_protected_settings is not None:
for dicts in configuration_protected_settings:
for key, value in dicts.items():
config_protected_settings[key] = value

# __validate_version_and_auto_upgrade(version, auto_upgrade_minor_version)
# Get the extension class based on the extension type
extension_class = ExtensionFactory(extension_type_lower)

# upd_extension = ExtensionInstanceUpdate(auto_upgrade_minor_version=auto_upgrade_minor_version,
# release_train=release_train, version=version)
upd_extension = extension_class.Update(auto_upgrade_minor_version, release_train, version,
configuration_settings, configuration_protected_settings)

# return client.update(resource_group_name, cluster_rp, cluster_type, cluster_name, name, upd_extension)
return sdk_no_wait(no_wait, client.begin_update, resource_group_name, cluster_rp, cluster_type,
cluster_name, name, upd_extension)


def delete_k8s_extension(cmd, client, resource_group_name, cluster_name, name, cluster_type, yes=False):
def delete_k8s_extension(cmd, client, resource_group_name, cluster_name, name, cluster_type,
no_wait=False, yes=False, force=False):
"""Delete an existing Kubernetes Extension.

"""
# Determine ClusterRP
cluster_rp = __get_cluster_rp(cluster_type)
Expand All @@ -206,9 +222,11 @@ def delete_k8s_extension(cmd, client, resource_group_name, cluster_name, name, c
extension_class = ExtensionFactory(extension.extension_type.lower())

# If there is any custom delete logic, this will call the logic
extension_class.Delete(cmd, client, resource_group_name, cluster_name, name, cluster_type, yes)
extension_class.Delete(cmd, client, resource_group_name, cluster_name,
name, cluster_type, yes)

return client.delete(resource_group_name, cluster_rp, cluster_type, cluster_name, name)
return sdk_no_wait(no_wait, client.begin_delete, resource_group_name,
cluster_rp, cluster_type, cluster_name, name, force_delete=force)


def __create_identity(cmd, resource_group_name, cluster_name, cluster_type, cluster_rp):
Expand All @@ -226,7 +244,7 @@ def __create_identity(cmd, resource_group_name, cluster_name, cluster_type, clus
elif cluster_rp == 'Microsoft.ResourceConnector':
parent_api_version = '2020-09-15-privatepreview'
elif cluster_rp == 'Microsoft.ContainerService':
parent_api_version = '2017-07-01'
return None, None
anagg929 marked this conversation as resolved.
Show resolved Hide resolved
else:
raise InvalidArgumentValueError(
"Error! Cluster type '{}' is not supported for extension identity".format(cluster_type)
Expand All @@ -239,7 +257,7 @@ def __create_identity(cmd, resource_group_name, cluster_name, cluster_type, clus
raise ex
identity_type = "SystemAssigned"

return ConfigurationIdentity(type=identity_type), location
return Identity(type=identity_type), location


def __get_cluster_rp(cluster_type):
Expand All @@ -248,7 +266,7 @@ def __get_cluster_rp(cluster_type):
rp = 'Microsoft.Kubernetes'
elif cluster_type.lower() == 'appliances':
rp = 'Microsoft.ResourceConnector'
elif cluster_type.lower() == '':
elif cluster_type.lower() == '' or cluster_type.lower() == 'managedclusters':
rp = 'Microsoft.ContainerService'
else:
raise InvalidArgumentValueError("Error! Cluster type '{}' is not supported".format(cluster_type))
Expand Down
Loading