Skip to content

Commit 46f8b52

Browse files
jonathan-innisyuyue9284Yue Yuliakaz
authored
[k8s-extension] Release v0.4.3 (Azure#3491)
* Create pull.yml * Update pull.yml * Update azure-pipelines.yml * Initial commit of k8s-extension * Update pipelines file * Update CODEOWNERS * Update private preview pipelines * Remove open service mesh from public release * Update pipeline files * Update public extension pipeline * Change condition variable * Add version to public preview/private preview * Update pipelines * Add different testing based on private branch * Add annotations to extension model * Update k8s-custom-pipelines.yml * Update SDKs with Updated Swagger Spec for 2020-07-01-preview (#13) * Update sdks with updated swagger spec * Update version and history rst * Reorder release history timeline * Fix ExtensionInstanceForCreate for import * remove py2 bdist support * Add custom table formatting * Remove unnecessary files * Fix style issues * Fix branch based on comments * Update identity piece manually * Don't handle defaults at the CLI level * Remove defaults from CLI client * Check null target namespace with namespace scope * Update style * Add cassandra operator and location to model * Stage Public Version of k8s-extension 0.2.0 for official release (#15) * Create pull.yml * Update pull.yml * Update azure-pipelines.yml * Initial commit of k8s-extension * Update pipelines file * Update CODEOWNERS * Update private preview pipelines * Remove open service mesh from public release * Update pipeline files * Update public extension pipeline * Change condition variable * Add version to public preview/private preview * Update pipelines * Add different testing based on private branch * Add annotations to extension model * Update k8s-custom-pipelines.yml * Update SDKs with Updated Swagger Spec for 2020-07-01-preview (#13) * Update sdks with updated swagger spec * Update version and history rst * Reorder release history timeline * Fix ExtensionInstanceForCreate for import * remove py2 bdist support * Add custom table formatting * Remove unnecessary files * Fix style issues * Fix branch based on comments * Update identity piece manually * Don't handle defaults at the CLI level * Remove defaults from CLI client * Check null target namespace with namespace scope * Update style * Add cassandra operator and location to model Co-authored-by: action@github.com <Action - Fork Sync> * Remove custom pipelines file * Update extension description, remove private const * Update pipeline file * Disable refs docs * Update to include better create warning logs and remove update context (#20) * Update to include better create warning logs and remove update context * Remove help text for update * Fix spelling error * Update message * Fix k8s-extension conflict with private version * Fix style errors * Fix filename * add customization for microsoft.azureml.kubernetes (#23) * add customization for microsoft.azureml.kubernetes * Update release history Co-authored-by: Yue Yu <yuyu3@microsoft.com> Co-authored-by: jonathan-innis <jonathan.innis.ji@gmail.com> * Add E2E Testing from Separate branch into internal code (#26) * Add internal e2e testing * Change to testing folder * Inference CLI validation for Scoring FE (#24) * cli validation starter * added the call to the fe validation function * nodeport validation not required * test fix Co-authored-by: Jonathan Innis <jonathan.innis.ji@gmail.com> * legal warning added (#27) * Remove deprecated method logger.warn * Update k8s-custom-pipelines.yml for Azure Pipelines * Update k8s-custom-pipelines.yml for Azure Pipelines * Add Azure Defender to E2E testing (#28) * Add azure defender testing to e2e * Remove the debug flag * Add configuration testing * Fix pipeline failures * Make test script more intuitive * Remove parameter from testing * Fix wrong location for k8s config whl * Fix pip upgrade issue * Fix pip install upgrade issue * Fix pip install issue * delete resurce in testcase (#29) Co-authored-by: Yue Yu <yuyu3@microsoft.com> Co-authored-by: Jonathan Innis <jonathan.innis.ji@gmail.com> * Check Provider is Registered with Subscription Before Making Requests (#18) * Add check for KubernetesConfiguration * Disable pylint and rename * Update provider registration link * Update version * Remove extra blank line * Fix bug in import * only validate scoring fe when inference is enabled (#31) * only validate scoring fe when inference is enabled * Fix versioning Co-authored-by: Yue Yu <yuyu3@microsoft.com> Co-authored-by: jonathan-innis <jonathan.innis.ji@gmail.com> * Provider registration case insensitive * do not validate against scoring fe if inference is not enabled. (#33) * do not validate against scoring fe if inference is not enabled. * add inference enabled scenario * refine * increase sleeping time * fix Co-authored-by: Yue Yu <yuyu3@microsoft.com> Co-authored-by: Jonathan Innis <jonathan.innis.ji@gmail.com> * Add OSM as Public Preview Extension (#34) * Add OSM as public preview extension * Add osm testing * Add release train to tests * Fix failing osm test * Upgrade pip in integration testing * Remove ununsed import * Fix release train check in update * Parallelize E2E Testing (#36) * Add OSM as public preview extension * Add osm testing * Update test logic to parallelize * Fix test success checking * Parallelize extension testing * Better error checking logic * Fix azureml deletion * Fix private build (#40) * change amlk8s to amlarc (#42) Co-authored-by: Yue Yu <yuyu3@microsoft.com> * Servicebus client model changes (#44) * Servicebus client model changes * Fix testing script * Update history file and pipeline * Update min cli core version for track 2 updates * Read SSL cert and key from files (#38) * first sketch of the change fixes removed extra blank lines changes regarding param renaming added ssl tests added more detail to the unit test additional import moved pem files out of public folder fixed import chenged import changed import unit tests fix unit test fix fixed unit tests fixed unit test unit test fix changes int test cert and key * test protected config * fix test typo * temporary changes reverted * fixing tests * fixed file paths * removed accidentally added file * changes according to review comments * more changes according to review comments * changes according to review comments Co-authored-by: Jonathan Innis <jonathan.innis.ji@gmail.com> * Upgrade release version * Liakaz/inference read ssl from file (#47) * first sketch of the change fixes removed extra blank lines changes regarding param renaming added ssl tests added more detail to the unit test additional import moved pem files out of public folder fixed import chenged import changed import unit tests fix unit test fix fixed unit tests fixed unit test unit test fix changes int test cert and key * test protected config * fix test typo * temporary changes reverted * fixing tests * fixed file paths * removed accidentally added file * changes according to review comments * more changes according to review comments * changes according to review comments * fixed decode error * renamed the experimental param Co-authored-by: Jonathan Innis <jonathan.innis.ji@gmail.com> * Fix style issues (#51) * Fixed scoring fe related extension param names (#49) * fixed scoring fe related extension params * bug fix and style fixes * variable rename * fixed the error type * set cluster to prod by default * Remove unneeded files Co-authored-by: action@github.com <Action - Fork Sync> Co-authored-by: yuyue9284 <15863499+yuyue9284@users.noreply.github.com> Co-authored-by: Yue Yu <yuyu3@microsoft.com> Co-authored-by: Lia Kazakova <58274127+liakaz@users.noreply.github.com>
1 parent 5105f47 commit 46f8b52

File tree

10 files changed

+132
-46
lines changed

10 files changed

+132
-46
lines changed

src/k8s-extension/HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
Release History
44
===============
55

6+
0.4.3
7+
++++++++++++++++++
8+
* Add SSL support for AzureML
9+
10+
611
0.4.2
712
++++++++++++++++++
813

src/k8s-extension/azext_k8s_extension/custom.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
import json
99
from knack.log import get_logger
1010

11-
from msrestazure.azure_exceptions import CloudError
12-
1311
from azure.cli.core.azclierror import ResourceNotFoundError, MutuallyExclusiveArgumentError, \
1412
InvalidArgumentValueError, CommandNotFoundError, RequiredArgumentMissingError
1513
from azure.cli.core.commands.client_factory import get_subscription_id

src/k8s-extension/azext_k8s_extension/partner_extensions/AzureMLKubernetes.py

Lines changed: 75 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# --------------------------------------------------------------------------------------------
55

66
# pylint: disable=unused-argument
7+
# pylint: disable=line-too-long
8+
# pylint: disable=too-many-locals
9+
710
import copy
811
from hashlib import md5
912
from typing import Any, Dict, List, Tuple
@@ -17,22 +20,27 @@
1720
import azure.mgmt.storage.models
1821
import azure.mgmt.loganalytics
1922
import azure.mgmt.loganalytics.models
20-
from ..vendored_sdks.models import (
21-
ExtensionInstance, ExtensionInstanceUpdate, Scope, ScopeCluster)
22-
from azure.cli.core.azclierror import InvalidArgumentValueError
23+
from azure.cli.core.azclierror import InvalidArgumentValueError, MutuallyExclusiveArgumentError
2324
from azure.cli.core.commands.client_factory import get_mgmt_service_client, get_subscription_id
2425
from azure.mgmt.resource.locks.models import ManagementLockObject
2526
from knack.log import get_logger
2627
from msrestazure.azure_exceptions import CloudError
2728

2829
from .._client_factory import cf_resources
2930
from .PartnerExtensionModel import PartnerExtensionModel
31+
from ..vendored_sdks.models import (
32+
ExtensionInstance,
33+
ExtensionInstanceUpdate,
34+
Scope,
35+
ScopeCluster
36+
)
3037

3138
logger = get_logger(__name__)
3239

3340
resource_tag = {'created_by': 'Azure Arc-enabled ML'}
3441

3542

43+
# pylint: disable=too-many-instance-attributes
3644
class AzureMLKubernetes(PartnerExtensionModel):
3745
def __init__(self):
3846
# constants for configuration settings.
@@ -66,6 +74,14 @@ def __init__(self):
6674
self.SERVICE_BUS_JOB_STATE_TOPIC = 'jobstate-updatedby-computeprovider'
6775
self.SERVICE_BUS_JOB_STATE_SUB = 'compute-scheduler-jobstate'
6876

77+
# constants for enabling SSL in inference
78+
self.sslKeyPemFile = 'sslKeyPemFile'
79+
self.sslCertPemFile = 'sslCertPemFile'
80+
self.allowInsecureConnections = 'allowInsecureConnections'
81+
self.privateEndpointILB = 'privateEndpointILB'
82+
self.privateEndpointNodeport = 'privateEndpointNodeport'
83+
self.inferenceLoadBalancerHA = 'inferenceLoadBalancerHA'
84+
6985
# reference mapping
7086
self.reference_mapping = {
7187
self.RELAY_SERVER_CONNECTION_STRING: [self.RELAY_CONNECTION_STRING_KEY, self.RELAY_CONNECTION_STRING_DEPRECATED_KEY],
@@ -151,7 +167,7 @@ def __validate_config(self, configuration_settings, configuration_protected_sett
151167
config_keys = configuration_settings.keys()
152168
config_protected_keys = configuration_protected_settings.keys()
153169
dup_keys = set(config_keys) & set(config_protected_keys)
154-
if len(dup_keys) > 0:
170+
if dup_keys:
155171
for key in dup_keys:
156172
logger.warning(
157173
'Duplicate keys found in both configuration settings and configuration protected setttings: %s', key)
@@ -168,6 +184,7 @@ def __validate_config(self, configuration_settings, configuration_protected_sett
168184
if enable_inference:
169185
logger.warning("The installed AzureML extension for AML inference is experimental and not covered by customer support. Please use with discretion.")
170186
self.__validate_scoring_fe_settings(configuration_settings, configuration_protected_settings)
187+
self.__set_up_inference_ssl(configuration_settings, configuration_protected_settings)
171188
elif not (enable_training or enable_inference):
172189
raise InvalidArgumentValueError(
173190
"Please create Microsoft.AzureML.Kubernetes extension instance either "
@@ -181,33 +198,63 @@ def __validate_config(self, configuration_settings, configuration_protected_sett
181198
configuration_protected_settings.pop(self.ENABLE_INFERENCE, None)
182199

183200
def __validate_scoring_fe_settings(self, configuration_settings, configuration_protected_settings):
184-
clusterPurpose = _get_value_from_config_protected_config(
185-
'clusterPurpose', configuration_settings, configuration_protected_settings)
186-
if clusterPurpose and clusterPurpose not in ["DevTest", "FastProd"]:
187-
raise InvalidArgumentValueError(
188-
"Accepted values for '--configuration-settings clusterPurpose' "
189-
"are 'DevTest' and 'FastProd'")
190-
191-
feSslCert = _get_value_from_config_protected_config(
192-
'scoringFe.sslCert', configuration_settings, configuration_protected_settings)
193-
sslKey = _get_value_from_config_protected_config(
194-
'scoringFe.sslKey', configuration_settings, configuration_protected_settings)
201+
isTestCluster = _get_value_from_config_protected_config(
202+
self.inferenceLoadBalancerHA, configuration_settings, configuration_protected_settings)
203+
isTestCluster = str(isTestCluster).lower() == 'false'
204+
if isTestCluster:
205+
configuration_settings['clusterPurpose'] = 'DevTest'
206+
else:
207+
configuration_settings['clusterPurpose'] = 'FastProd'
208+
feSslCertFile = configuration_protected_settings.get(self.sslCertPemFile)
209+
feSslKeyFile = configuration_protected_settings.get(self.sslKeyPemFile)
195210
allowInsecureConnections = _get_value_from_config_protected_config(
196-
'allowInsecureConnections', configuration_settings, configuration_protected_settings)
211+
self.allowInsecureConnections, configuration_settings, configuration_protected_settings)
197212
allowInsecureConnections = str(allowInsecureConnections).lower() == 'true'
198-
if (not feSslCert or not sslKey) and not allowInsecureConnections:
213+
if (not feSslCertFile or not feSslKeyFile) and not allowInsecureConnections:
199214
raise InvalidArgumentValueError(
200215
"Provide ssl certificate and key. "
201216
"Otherwise explicitly allow insecure connection by specifying "
202217
"'--configuration-settings allowInsecureConnections=true'")
203218

219+
feIsNodePort = _get_value_from_config_protected_config(
220+
self.privateEndpointNodeport, configuration_settings, configuration_protected_settings)
221+
feIsNodePort = str(feIsNodePort).lower() == 'true'
204222
feIsInternalLoadBalancer = _get_value_from_config_protected_config(
205-
'scoringFe.serviceType.internalLoadBalancer', configuration_settings, configuration_protected_settings)
223+
self.privateEndpointILB, configuration_settings, configuration_protected_settings)
206224
feIsInternalLoadBalancer = str(feIsInternalLoadBalancer).lower() == 'true'
207-
if feIsInternalLoadBalancer:
225+
226+
if feIsNodePort and feIsInternalLoadBalancer:
227+
raise MutuallyExclusiveArgumentError(
228+
"Specify either privateEndpointNodeport=true or privateEndpointILB=true, but not both.")
229+
elif feIsNodePort:
230+
configuration_settings['scoringFe.serviceType.nodePort'] = feIsNodePort
231+
elif feIsInternalLoadBalancer:
232+
configuration_settings['scoringFe.serviceType.internalLoadBalancer'] = feIsInternalLoadBalancer
208233
logger.warning(
209234
'Internal load balancer only supported on AKS and AKS Engine Clusters.')
210235

236+
def __set_up_inference_ssl(self, configuration_settings, configuration_protected_settings):
237+
allowInsecureConnections = _get_value_from_config_protected_config(
238+
self.allowInsecureConnections, configuration_settings, configuration_protected_settings)
239+
allowInsecureConnections = str(allowInsecureConnections).lower() == 'true'
240+
if not allowInsecureConnections:
241+
import base64
242+
feSslCertFile = configuration_protected_settings.get(self.sslCertPemFile)
243+
feSslKeyFile = configuration_protected_settings.get(self.sslKeyPemFile)
244+
with open(feSslCertFile) as f:
245+
cert_data = f.read()
246+
cert_data_bytes = cert_data.encode("ascii")
247+
ssl_cert = base64.b64encode(cert_data_bytes).decode()
248+
configuration_protected_settings['scoringFe.sslCert'] = ssl_cert
249+
with open(feSslKeyFile) as f:
250+
key_data = f.read()
251+
key_data_bytes = key_data.encode("ascii")
252+
ssl_key = base64.b64encode(key_data_bytes).decode()
253+
configuration_protected_settings['scoringFe.sslKey'] = ssl_key
254+
else:
255+
logger.warning(
256+
'SSL is not enabled. Allowing insecure connections to the deployed services.')
257+
211258
def __create_required_resource(
212259
self, cmd, configuration_settings, configuration_protected_settings, subscription_id, resource_group_name,
213260
cluster_name, cluster_location):
@@ -222,9 +269,8 @@ def __create_required_resource(
222269
configuration_settings[self.AZURE_LOG_ANALYTICS_CUSTOMER_ID_KEY] = ws_costumer_id
223270
configuration_protected_settings[self.AZURE_LOG_ANALYTICS_CONNECTION_STRING] = shared_key
224271

225-
if not configuration_settings.get(
226-
self.RELAY_SERVER_CONNECTION_STRING) and not configuration_protected_settings.get(
227-
self.RELAY_SERVER_CONNECTION_STRING):
272+
if not configuration_settings.get(self.RELAY_SERVER_CONNECTION_STRING) and \
273+
not configuration_protected_settings.get(self.RELAY_SERVER_CONNECTION_STRING):
228274
logger.info('==== BEGIN RELAY CREATION ====')
229275
relay_connection_string, hc_resource_id, hc_name = _get_relay_connection_str(
230276
cmd, subscription_id, resource_group_name, cluster_name, cluster_location, self.RELAY_HC_AUTH_NAME)
@@ -233,9 +279,8 @@ def __create_required_resource(
233279
configuration_settings[self.HC_RESOURCE_ID_KEY] = hc_resource_id
234280
configuration_settings[self.RELAY_HC_NAME_KEY] = hc_name
235281

236-
if not configuration_settings.get(
237-
self.SERVICE_BUS_CONNECTION_STRING) and not configuration_protected_settings.get(
238-
self.SERVICE_BUS_CONNECTION_STRING):
282+
if not configuration_settings.get(self.SERVICE_BUS_CONNECTION_STRING) and \
283+
not configuration_protected_settings.get(self.SERVICE_BUS_CONNECTION_STRING):
239284
logger.info('==== BEGIN SERVICE BUS CREATION ====')
240285
topic_sub_mapping = {
241286
self.SERVICE_BUS_COMPUTE_STATE_TOPIC: self.SERVICE_BUS_COMPUTE_STATE_SUB,
@@ -252,7 +297,7 @@ def __create_required_resource(
252297

253298
def _get_valid_name(input_name: str, suffix_len: int, max_len: int) -> str:
254299
normalized_str = ''.join(filter(str.isalnum, input_name))
255-
assert len(normalized_str) > 0, "normalized name empty"
300+
assert normalized_str, "normalized name empty"
256301

257302
if len(normalized_str) <= max_len:
258303
return normalized_str
@@ -267,6 +312,7 @@ def _get_valid_name(input_name: str, suffix_len: int, max_len: int) -> str:
267312
return new_name
268313

269314

315+
# pylint: disable=broad-except
270316
def _lock_resource(cmd, lock_scope, lock_level='CanNotDelete'):
271317
lock_client: azure.mgmt.resource.locks.ManagementLockClient = get_mgmt_service_client(
272318
cmd.cli_ctx, azure.mgmt.resource.locks.ManagementLockClient)
@@ -275,14 +321,13 @@ def _lock_resource(cmd, lock_scope, lock_level='CanNotDelete'):
275321
try:
276322
lock_client.management_locks.create_or_update_by_scope(
277323
scope=lock_scope, lock_name='amlarc-resource-lock', parameters=lock_object)
278-
except:
324+
except Exception:
279325
# try to lock the resource if user has the owner privilege
280326
pass
281327

282328

283329
def _get_relay_connection_str(
284-
cmd, subscription_id, resource_group_name, cluster_name, cluster_location, auth_rule_name) -> Tuple[
285-
str, str, str]:
330+
cmd, subscription_id, resource_group_name, cluster_name, cluster_location, auth_rule_name) -> Tuple[str, str, str]:
286331
relay_client: azure.mgmt.relay.RelayManagementClient = get_mgmt_service_client(
287332
cmd.cli_ctx, azure.mgmt.relay.RelayManagementClient)
288333

@@ -370,8 +415,7 @@ def _get_service_bus_connection_string(cmd, subscription_id, resource_group_name
370415

371416

372417
def _get_log_analytics_ws_connection_string(
373-
cmd, subscription_id, resource_group_name, cluster_name, cluster_location) -> Tuple[
374-
str, str]:
418+
cmd, subscription_id, resource_group_name, cluster_name, cluster_location) -> Tuple[str, str]:
375419
log_analytics_ws_client: azure.mgmt.loganalytics.LogAnalyticsManagementClient = get_mgmt_service_client(
376420
cmd.cli_ctx, azure.mgmt.loganalytics.LogAnalyticsManagementClient)
377421

src/k8s-extension/azext_k8s_extension/partner_extensions/ContainerInsights.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from azure.cli.core.commands import LongRunningOperation
1515
from azure.cli.core.commands.client_factory import get_mgmt_service_client, get_subscription_id
1616
from azure.cli.core.util import sdk_no_wait
17-
from msrestazure.azure_exceptions import CloudError
1817
from msrestazure.tools import parse_resource_id, is_valid_resource_id
1918

2019
from ..vendored_sdks.models import ExtensionInstance
@@ -104,8 +103,7 @@ def _invoke_deployment(cmd, resource_group_name, deployment_name, template, para
104103
if cmd.supported_api_version(min_api='2019-10-01', resource_type=ResourceType.MGMT_RESOURCE_RESOURCES):
105104
validation_poller = smc.begin_validate(resource_group_name, deployment_name, deployment)
106105
return LongRunningOperation(cmd.cli_ctx)(validation_poller)
107-
else:
108-
return smc.validate(resource_group_name, deployment_name, deployment)
106+
return smc.validate(resource_group_name, deployment_name, deployment)
109107

110108
return sdk_no_wait(no_wait, smc.begin_create_or_update, resource_group_name, deployment_name, deployment)
111109

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dGVzdGNlcnQ=
2+
dGVzdGtleQ==
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
testcert
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
testkey
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
6+
# pylint: disable=protected-access
7+
8+
import os
9+
import unittest
10+
11+
from azext_k8s_extension.partner_extensions.AzureMLKubernetes import AzureMLKubernetes
12+
13+
14+
TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'))
15+
16+
17+
class TestAzureMlExtension(unittest.TestCase):
18+
19+
def test_set_up_inference_ssl(self):
20+
azremlk8sInstance = AzureMLKubernetes()
21+
config = {'allowInsecureConnections': 'false'}
22+
# read and encode dummy cert and key
23+
sslKeyPemFile = os.path.join(TEST_DIR, 'data', 'azure_ml', 'test_key.pem')
24+
sslCertPemFile = os.path.join(TEST_DIR, 'data', 'azure_ml', 'test_cert.pem')
25+
protected_config = {'sslKeyPemFile': sslKeyPemFile, 'sslCertPemFile': sslCertPemFile}
26+
azremlk8sInstance._AzureMLKubernetes__set_up_inference_ssl(config, protected_config)
27+
self.assertTrue('scoringFe.sslCert' in protected_config)
28+
self.assertTrue('scoringFe.sslKey' in protected_config)
29+
encoded_cert_and_key_file = os.path.join(TEST_DIR, 'data', 'azure_ml', 'cert_and_key_encoded.txt')
30+
with open(encoded_cert_and_key_file, "r") as text_file:
31+
cert = text_file.readline().rstrip()
32+
assert cert == protected_config['scoringFe.sslCert']
33+
key = text_file.readline()
34+
assert key == protected_config['scoringFe.sslKey']

src/k8s-extension/azext_k8s_extension/tests/latest/test_k8s_extension_scenario.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# Licensed under the MIT License. See License.txt in the project root for license information.
44
# --------------------------------------------------------------------------------------------
55

6-
import os
7-
import unittest
6+
# pylint: disable=line-too-long
87

8+
import os
99
from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer, record_only)
1010

1111

@@ -27,13 +27,16 @@ def test_k8s_extension(self):
2727
'version': '0.1.0'
2828
})
2929

30-
self.cmd('k8s-extension create -g {rg} -n {name} -c {cluster_name} --cluster-type {cluster_type} --extension-type {extension_type} --release-train {release_train} --version {version}', checks=[
31-
self.check('name', '{name}'),
32-
self.check('releaseTrain', '{release_train}'),
33-
self.check('version', '{version}'),
34-
self.check('resourceGroup', '{rg}'),
35-
self.check('extensionType', '{extension_type}')
36-
])
30+
self.cmd('k8s-extension create -g {rg} -n {name} -c {cluster_name} --cluster-type {cluster_type} '
31+
'--extension-type {extension_type} --release-train {release_train} --version {version}',
32+
checks=[
33+
self.check('name', '{name}'),
34+
self.check('releaseTrain', '{release_train}'),
35+
self.check('version', '{version}'),
36+
self.check('resourceGroup', '{rg}'),
37+
self.check('extensionType', '{extension_type}')
38+
]
39+
)
3740

3841
# Update is disabled for now
3942
# self.cmd('k8s-extension update -g {rg} -n {name} --tags foo=boo', checks=[

src/k8s-extension/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# TODO: Add any additional SDK dependencies here
3333
DEPENDENCIES = []
3434

35-
VERSION = "0.4.2"
35+
VERSION = "0.4.3"
3636

3737
with open('README.rst', 'r', encoding='utf-8') as f:
3838
README = f.read()

0 commit comments

Comments
 (0)