Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
337382b
modified: src/connectedk8s/azext_connectedk8s/_constants.py
rohan-dassani Aug 26, 2022
e275558
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Aug 26, 2022
8c89fc3
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Aug 26, 2022
11c2f90
modified: src/connectedk8s/azext_connectedk8s/_constants.py
rohan-dassani Aug 29, 2022
fb57d0c
modified: src/connectedk8s/azext_connectedk8s/_constants.py
rohan-dassani Aug 29, 2022
9d2317c
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Aug 29, 2022
d684639
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Aug 29, 2022
866e916
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Aug 29, 2022
2202cd3
Merge branch 'Azure:main' into force_delete_add
rohan-dassani Aug 29, 2022
76800dd
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Aug 29, 2022
cd46fbc
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Aug 29, 2022
b46d055
modified: src/connectedk8s/azext_connectedk8s/_utils.py
rohan-dassani Aug 29, 2022
474e2ec
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Aug 29, 2022
a1c1093
modified: src/connectedk8s/azext_connectedk8s/_params.py
rohan-dassani Sep 1, 2022
a33c7d7
modified: src/connectedk8s/azext_connectedk8s/_constants.py
rohan-dassani Sep 2, 2022
0190574
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Sep 2, 2022
6e893c4
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Sep 2, 2022
a639010
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Sep 2, 2022
ba70771
modified: src/connectedk8s/azext_connectedk8s/_params.py
rohan-dassani Sep 2, 2022
fda625c
modified: src/connectedk8s/HISTORY.rst
rohan-dassani Sep 5, 2022
088d5e9
modified: src/connectedk8s/HISTORY.rst
rohan-dassani Sep 5, 2022
3062720
Merge branch 'main' of https://github.com/rohan-dassani/azure-cli-ext…
rohan-dassani Sep 5, 2022
944c706
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Sep 12, 2022
6aa9077
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Sep 12, 2022
238de24
Merge branch 'timeout_in_crd_deletion_force_delete' of https://github…
rohan-dassani Sep 12, 2022
7ff4202
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Sep 12, 2022
d4ea462
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Sep 12, 2022
810dd10
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Sep 12, 2022
2110301
modified: src/connectedk8s/HISTORY.rst
rohan-dassani Sep 12, 2022
7741186
modified: src/connectedk8s/HISTORY.rst
rohan-dassani Sep 12, 2022
dac1e88
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Nov 21, 2022
df16fe6
new file: src/connectedk8s/azext_connectedk8s/tests/latest/recordi…
rohan-dassani Nov 21, 2022
4f28b57
Merge https://github.com/Azure/azure-cli-extensions into connectedk8s…
rohan-dassani Nov 21, 2022
cc482a3
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Nov 21, 2022
f8d8ab6
modified: src/connectedk8s/azext_connectedk8s/tests/latest/recordi…
rohan-dassani Nov 21, 2022
4f9bdce
modified: src/connectedk8s/azext_connectedk8s/tests/latest/recordi…
rohan-dassani Nov 21, 2022
26797a1
deleted: src/connectedk8s/azext_connectedk8s/tests/latest/recordi…
rohan-dassani Nov 23, 2022
3082aff
Delete test_connectedk8s.yaml
wangzelin007 Nov 24, 2022
12e83b6
Update test_connectedk8s_scenario.py
wangzelin007 Nov 24, 2022
cd7b659
deleted: src/connectedk8s/azext_connectedk8s/tests/latest/recordi…
rohan-dassani Nov 24, 2022
5556147
Merge branch 'connectedk8s_nightly_testing' of https://github.com/roh…
rohan-dassani Nov 24, 2022
59686ad
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Nov 24, 2022
40c5611
modified: src/connectedk8s/azext_connectedk8s/tests/latest/recordi…
rohan-dassani Nov 24, 2022
0e727c7
Merge https://github.com/Azure/azure-cli-extensions into connectedk8s…
rohan-dassani Feb 3, 2023
96a6b6a
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 3, 2023
ace2e02
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 3, 2023
a87383e
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 6, 2023
cab4ba4
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 6, 2023
eddbae2
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 6, 2023
1298879
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 6, 2023
b25217e
Merge branch 'Azure:main' into connectedk8s_nightly_testing
rohan-dassani Feb 13, 2023
3d519f9
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 14, 2023
e43b6cb
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 14, 2023
f19a3ad
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 14, 2023
c2fb835
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 14, 2023
910e916
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 15, 2023
a1ed9dd
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 16, 2023
be6739f
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 16, 2023
d94836e
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 16, 2023
7891b9b
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 16, 2023
ee818ad
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 16, 2023
f7e18ea
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 16, 2023
1b34589
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 16, 2023
37177cf
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 16, 2023
1a22f1b
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani Feb 16, 2023
dbed4ab
modified: src/connectedk8s/azext_connectedk8s/_constants.py
rohan-dassani Feb 28, 2023
6d628d8
Merge https://github.com/Azure/azure-cli-extensions into connectedk8s…
rohan-dassani Feb 28, 2023
3f6e841
modified: src/connectedk8s/HISTORY.rst
rohan-dassani Feb 28, 2023
9e8e8ba
modified: src/connectedk8s/HISTORY.rst
rohan-dassani Feb 28, 2023
df369d8
modified: src/connectedk8s/azext_connectedk8s/_precheckutils.py
rohan-dassani Feb 28, 2023
6f04cea
modified: src/connectedk8s/azext_connectedk8s/_precheckutils.py
rohan-dassani Feb 28, 2023
a0f180a
modified: src/connectedk8s/azext_connectedk8s/_constants.py
rohan-dassani Mar 1, 2023
c5d508b
modified: src/connectedk8s/azext_connectedk8s/_constants.py
rohan-dassani Mar 8, 2023
202a216
modified: src/connectedk8s/HISTORY.rst
rohan-dassani Mar 8, 2023
b327eee
Merge https://github.com/Azure/azure-cli-extensions into connectedk8s…
rohan-dassani Mar 8, 2023
7224044
modified: src/connectedk8s/azext_connectedk8s/_troubleshootutils.py
rohan-dassani Mar 8, 2023
e80e14b
modified: src/connectedk8s/azext_connectedk8s/_troubleshootutils.py
rohan-dassani Mar 8, 2023
e022773
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Mar 9, 2023
e5ee706
modified: src/connectedk8s/HISTORY.rst
rohan-dassani Mar 9, 2023
cc7a545
modified: src/connectedk8s/HISTORY.rst
rohan-dassani Mar 21, 2023
49642a0
modified: src/connectedk8s/azext_connectedk8s/_precheckutils.py
rohan-dassani Mar 21, 2023
9da438b
modified: src/connectedk8s/azext_connectedk8s/_utils.py
rohan-dassani Mar 23, 2023
818a530
modified: src/connectedk8s/azext_connectedk8s/_constants.py
rohan-dassani Mar 23, 2023
6efefd1
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Mar 23, 2023
9390ff5
modified: src/connectedk8s/azext_connectedk8s/_constants.py
rohan-dassani Mar 24, 2023
70f9c84
modified: src/connectedk8s/HISTORY.rst
rohan-dassani Mar 24, 2023
60fba05
modified: src/connectedk8s/HISTORY.rst
rohan-dassani Mar 24, 2023
84d0b06
Merge https://github.com/Azure/azure-cli-extensions into connectedk8s…
rohan-dassani Mar 27, 2023
7d94fae
modified: src/connectedk8s/HISTORY.rst
rohan-dassani Apr 4, 2023
beb0fcc
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Apr 4, 2023
15dc881
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Apr 10, 2023
cb96347
modified: src/connectedk8s/HISTORY.rst
rohan-dassani Apr 10, 2023
9daef22
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Apr 10, 2023
1886ed3
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Apr 10, 2023
708ee01
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani Apr 10, 2023
904d6d8
modified: src/connectedk8s/HISTORY.rst
rohan-dassani Apr 10, 2023
6a10b16
Remove connectedk8s version 1.3.0 from index.json
rohan-dassani Apr 19, 2023
f9b8a4f
Merge https://github.com/Azure/azure-cli-extensions into connectedk8s…
rohan-dassani Apr 19, 2023
743a80e
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani May 10, 2023
a2671b0
Merge https://github.com/Azure/azure-cli-extensions into connectedk8s…
rohan-dassani May 10, 2023
cca344a
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani May 14, 2023
195c253
modified: src/connectedk8s/azext_connectedk8s/_constants.py
rohan-dassani May 16, 2023
426ec20
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani May 16, 2023
f615f6c
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani May 16, 2023
df5c2d8
modified: src/connectedk8s/azext_connectedk8s/tests/latest/test_co…
rohan-dassani May 16, 2023
5b897e6
Merge https://github.com/Azure/azure-cli-extensions into connectedk8s…
rohan-dassani May 16, 2023
5768727
modified: src/connectedk8s/HISTORY.rst
rohan-dassani May 16, 2023
b7294f1
modified: src/connectedk8s/azext_connectedk8s/_precheckutils.py
rohan-dassani May 17, 2023
5984a7d
modified: src/connectedk8s/HISTORY.rst
rohan-dassani May 18, 2023
b2e2c3a
modified: src/connectedk8s/azext_connectedk8s/custom.py
rohan-dassani May 18, 2023
109b8ad
modified: src/connectedk8s/azext_connectedk8s/_utils.py
rohan-dassani May 19, 2023
e888a00
modified: src/connectedk8s/azext_connectedk8s/_constants.py
rohan-dassani May 19, 2023
8240c57
modified: src/connectedk8s/azext_connectedk8s/_constants.py
rohan-dassani May 19, 2023
64cd63e
modified: src/connectedk8s/HISTORY.rst
rohan-dassani May 19, 2023
aa87e3f
modified: src/connectedk8s/azext_connectedk8s/_constants.py
rohan-dassani May 19, 2023
612d96b
modified: src/connectedk8s/azext_connectedk8s/_constants.py
rohan-dassani May 22, 2023
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/connectedk8s/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

Release History

1.3.18
++++++

* Cleaning up stale CRDs if present during onboarding (even in absence of azure-arc release)
* Adding retries in Helm client download
* Added some failures to be classified as userfaults

1.3.17
++++++

Expand Down
1 change: 1 addition & 0 deletions src/connectedk8s/azext_connectedk8s/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
AHB_Enum_Values = ["True", "False", "NotApplicable"]
Feature_Values = ["cluster-connect", "azure-rbac", "custom-locations"]
CRD_FOR_FORCE_DELETE = ["arccertificates.clusterconfig.azure.com", "azureclusteridentityrequests.clusterconfig.azure.com", "azureextensionidentities.clusterconfig.azure.com", "connectedclusters.arc.azure.com", "customlocationsettings.clusterconfig.azure.com", "extensionconfigs.clusterconfig.azure.com", "gitconfigs.clusterconfig.azure.com"]
Helm_Install_Release_Userfault_Messages = ['forbidden', 'timed out waiting for the condition', 'connection refused']
Custom_Locations_Provider_Namespace = 'Microsoft.ExtendedLocation'
Connected_Cluster_Provider_Namespace = 'Microsoft.Kubernetes'
Kubernetes_Configuration_Provider_Namespace = 'Microsoft.KubernetesConfiguration'
Expand Down
7 changes: 4 additions & 3 deletions src/connectedk8s/azext_connectedk8s/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,9 +578,10 @@ def helm_install_release(chart_path, subscription_id, kubernetes_distro, kuberne
response_helm_install = Popen(cmd_helm_install, stdout=PIPE, stderr=PIPE)
_, error_helm_install = response_helm_install.communicate()
if response_helm_install.returncode != 0:
if ('forbidden' in error_helm_install.decode("ascii") or 'timed out waiting for the condition' in error_helm_install.decode("ascii")):
helm_install_error_message = error_helm_install.decode("ascii")
if any(message in helm_install_error_message for message in consts.Helm_Install_Release_Userfault_Messages):
telemetry.set_user_fault()
telemetry.set_exception(exception=error_helm_install.decode("ascii"), fault_type=consts.Install_HelmRelease_Fault_Type,
telemetry.set_exception(exception=helm_install_error_message, fault_type=consts.Install_HelmRelease_Fault_Type,
summary='Unable to install helm release')
logger.warning("Please check if the azure-arc namespace was deployed and run 'kubectl get pods -n azure-arc' to check if all the pods are in running state. A possible cause for pods stuck in pending state could be insufficient resources on the kubernetes cluster to onboard to arc.")
raise CLIInternalError("Unable to install helm release: " + error_helm_install.decode("ascii"))
Expand All @@ -595,7 +596,7 @@ def get_release_namespace(kube_config, kube_context, helm_client_location, relea
response_helm_release = Popen(cmd_helm_release, stdout=PIPE, stderr=PIPE)
output_helm_release, error_helm_release = response_helm_release.communicate()
if response_helm_release.returncode != 0:
if 'forbidden' in error_helm_release.decode("ascii"):
if 'forbidden' in error_helm_release.decode("ascii") or "Kubernetes cluster unreachable" in error_helm_release.decode("ascii"):
telemetry.set_user_fault()
telemetry.set_exception(exception=error_helm_release.decode("ascii"), fault_type=consts.List_HelmRelease_Fault_Type,
summary='Unable to list helm release')
Expand Down
29 changes: 20 additions & 9 deletions src/connectedk8s/azext_connectedk8s/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ def create_connectedk8s(cmd, client, resource_group_name, cluster_name, correlat
account = Profile().get_subscription(subscription_id)
onboarding_tenant_id = account['homeTenantId']

resource_id = f'/subscriptions/{subscription_id}/resourcegroups/{resource_group_name}/providers/Microsoft.Kubernetes/connectedClusters/{cluster_name}/location/{location}'
telemetry.add_extension_event('connectedk8s', {'Context.Default.AzureCLI.resourceid': resource_id})

# Send cloud information to telemetry
azure_cloud = send_cloud_telemetry(cmd)

Expand Down Expand Up @@ -243,9 +246,6 @@ def create_connectedk8s(cmd, client, resource_group_name, cluster_name, correlat
}
telemetry.add_extension_event('connectedk8s', kubernetes_properties)

resource_id = f'/subscriptions/{subscription_id}/resourcegroups/{resource_group_name}/providers/Microsoft.Kubernetes/connectedClusters/{cluster_name}/location/{location}'
telemetry.add_extension_event('connectedk8s', {'Context.Default.AzureCLI.resourceid': resource_id})

# Checking if it is an AKS cluster
is_aks_cluster = check_aks_cluster(kube_config, kube_context)
if is_aks_cluster:
Expand Down Expand Up @@ -331,6 +331,9 @@ def create_connectedk8s(cmd, client, resource_group_name, cluster_name, correlat
"in the resource group {} ".format(resource_group_name) +
"and corresponds to a different Kubernetes cluster.", recommendation="To onboard this Kubernetes cluster " +
"to Azure, specify different resource name or resource group name.")
else:
# cleanup of stuck CRD if release namespace is not present/deleted
crd_cleanup_force_delete(kubectl_client_location, kube_config, kube_context)

# Resource group Creation
if resource_group_exists(cmd.cli_ctx, resource_group_name, subscription_id) is False:
Expand Down Expand Up @@ -509,12 +512,20 @@ def install_helm_client():

# Downloading compressed helm client executable
logger.warning("Downloading helm client for first time. This can take few minutes...")
try:
response = urllib.request.urlopen(requestUri)
except Exception as e:
telemetry.set_exception(exception=e, fault_type=consts.Download_Helm_Fault_Type,
summary='Unable to download helm client.')
raise CLIInternalError("Failed to download helm client.", recommendation="Please check your internet connection." + str(e))
retry_count = 3
retry_delay = 5
for i in range(retry_count):
try:
response = urllib.request.urlopen(requestUri)
break
except Exception as e:
if i == retry_count - 1:
if "Connection reset by peer" in str(e):
telemetry.set_user_fault()
telemetry.set_exception(exception=e, fault_type=consts.Download_Helm_Fault_Type,
summary='Unable to download helm client.')
raise CLIInternalError("Failed to download helm client.", recommendation="Please check your internet connection." + str(e))
time.sleep(retry_delay)

responseContent = response.read()
response.close()
Expand Down
2 changes: 1 addition & 1 deletion src/connectedk8s/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# TODO: Confirm this is the right version number you want and it matches your
# HISTORY.rst entry.

VERSION = '1.3.17'
VERSION = '1.3.18'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down