Skip to content

Commit

Permalink
Format Check
Browse files Browse the repository at this point in the history
  • Loading branch information
JorgeDaboub committed Jan 9, 2025
1 parent 650c16c commit a70bc72
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/connectedk8s/azext_connectedk8s/_troubleshootutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1769,8 +1769,7 @@ def check_msi_expiry(connected_cluster: ConnectedCluster) -> str:
# To handle any exception that may occur during the execution
except Exception as e:
logger.exception(
"An exception has occured while performing msi expiry check on the "
"cluster."
"An exception has occured while performing msi expiry check on the cluster."
)
telemetry.set_exception(
exception=e,
Expand Down
4 changes: 3 additions & 1 deletion src/connectedk8s/azext_connectedk8s/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ def create_connectedk8s(
else get_subscription_id(cmd.cli_ctx)
)

resource_id = f"/subscriptions/{subscription_id}/resourcegroups/{resource_group_name}/providers/Microsoft.\
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}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,19 @@ def install_helm_client():

# Set helm binary download & install locations
if operating_system == "windows":
download_location_string = f".azure\\helm\\{consts.HELM_VERSION}\\helm-{consts.HELM_VERSION}-\
download_location_string = (
f".azure\\helm\\{consts.HELM_VERSION}\\helm-{consts.HELM_VERSION}-\
{operating_system}-amd64.zip"
)
install_location_string = (
f".azure\\helm\\{consts.HELM_VERSION}\\{operating_system}-amd64\\helm.exe"
)
requestUri = f"{consts.HELM_STORAGE_URL}/helm/helm-{consts.HELM_VERSION}-{operating_system}-amd64.zip"
elif operating_system == "linux" or operating_system == "darwin":
download_location_string = f".azure/helm/{consts.HELM_VERSION}/helm-{consts.HELM_VERSION}-\
download_location_string = (
f".azure/helm/{consts.HELM_VERSION}/helm-{consts.HELM_VERSION}-\
{operating_system}-amd64.tar.gz"
)
install_location_string = (
f".azure/helm/{consts.HELM_VERSION}/{operating_system}-amd64/helm"
)
Expand Down Expand Up @@ -717,8 +721,8 @@ def test_upgrade(self, resource_group):
{managed_cluster_name}-admin"
)
response = requests.post(
f'https://{CONFIG["location"]}.dp.kubernetesconfiguration.azure.com/azure-\
arc-k8sagents/GetLatestHelmPackagePath?api-version=2019-11-01-preview&releaseTrain=stable'
f"https://{CONFIG['location']}.dp.kubernetesconfiguration.azure.com/azure-\
arc-k8sagents/GetLatestHelmPackagePath?api-version=2019-11-01-preview&releaseTrain=stable"
)
jsonData = json.loads(response.text)
repo_path = jsonData["repositoryPath"]
Expand Down

0 comments on commit a70bc72

Please sign in to comment.