diff --git a/src/connectedk8s/azext_connectedk8s/_help.py b/src/connectedk8s/azext_connectedk8s/_help.py index 085c1462841..c1ad0b6f16e 100644 --- a/src/connectedk8s/azext_connectedk8s/_help.py +++ b/src/connectedk8s/azext_connectedk8s/_help.py @@ -21,7 +21,7 @@ - name: Onboard a connected kubernetes cluster by specifying the kubeconfig and kubecontext. text: az connectedk8s connect -g resourceGroupName -n connectedClusterName --kube-config /path/to/kubeconfig --kube-context kubeContextName - name: Onboard a connected kubernetes cluster by specifying the https proxy, http proxy, no proxy settings. - text: az connectedk8s connect -g resourceGroupName -n connectedClusterName --proxy-https https://proxy-url --proxy-http http://proxy-url --proxy-skip-destinations excludedIP,excludedCIDR,exampleCIDRfollowed,10.0.0.0/24 + text: az connectedk8s connect -g resourceGroupName -n connectedClusterName --proxy-https https://proxy-url --proxy-http http://proxy-url --proxy-skip-range excludedIP,excludedCIDR,exampleCIDRfollowed,10.0.0.0/24 """ @@ -30,7 +30,7 @@ short-summary: Update properties of the onboarded agents. examples: - name: Update proxy values for the agents - text: az connectedk8s update -g resourceGroupName -n connectedClusterName --proxy-https https://proxy-url --proxy-http http://proxy-url --proxy-skip-destinations excludedIP,excludedCIDR,exampleCIDRfollowed,10.0.0.0/24 + text: az connectedk8s update -g resourceGroupName -n connectedClusterName --proxy-https https://proxy-url --proxy-http http://proxy-url --proxy-skip-range excludedIP,excludedCIDR,exampleCIDRfollowed,10.0.0.0/24 """ helps['connectedk8s list'] = """ diff --git a/src/connectedk8s/azext_connectedk8s/_params.py b/src/connectedk8s/azext_connectedk8s/_params.py index 512cb958d19..4197216f036 100644 --- a/src/connectedk8s/azext_connectedk8s/_params.py +++ b/src/connectedk8s/azext_connectedk8s/_params.py @@ -20,7 +20,7 @@ def load_arguments(self, _): c.argument('kube_context', options_list=['--kube-context'], help='Kubconfig context from current machine.') c.argument('https_proxy', options_list=['--proxy-https'], help='Https proxy URL to be used.') c.argument('http_proxy', options_list=['--proxy-http'], help='Http proxy URL to be used.') - c.argument('no_proxy', options_list=['--proxy-skip-destinations'], help='List of URLs/CIDRs for which proxy should not to be used.') + c.argument('no_proxy', options_list=['--proxy-skip-range'], help='List of URLs/CIDRs for which proxy should not to be used.') with self.argument_context('connectedk8s update') as c: c.argument('cluster_name', options_list=['--name', '-n'], id_part='name', help='The name of the connected cluster.') @@ -28,7 +28,7 @@ def load_arguments(self, _): c.argument('kube_context', options_list=['--kube-context'], help='Kubconfig context from current machine.') c.argument('https_proxy', options_list=['--proxy-https'], help='Https proxy URL to be used.') c.argument('http_proxy', options_list=['--proxy-http'], help='Http proxy URL to be used.') - c.argument('no_proxy', options_list=['--proxy-skip-destinations'], help='List of URLs/CIDRs for which proxy should not to be used.') + c.argument('no_proxy', options_list=['--proxy-skip-range'], help='List of URLs/CIDRs for which proxy should not to be used.') with self.argument_context('connectedk8s list') as c: pass diff --git a/src/connectedk8s/azext_connectedk8s/custom.py b/src/connectedk8s/azext_connectedk8s/custom.py index 9237624905f..796dbd5ec92 100644 --- a/src/connectedk8s/azext_connectedk8s/custom.py +++ b/src/connectedk8s/azext_connectedk8s/custom.py @@ -598,7 +598,7 @@ def update_connectedk8s(cmd, instance, tags=None): def update_agents(cmd, client, resource_group_name, cluster_name, https_proxy="", http_proxy="", no_proxy="", - kube_config=None, kube_context=None, no_wait=False, tags=None): + kube_config=None, kube_context=None, no_wait=False): logger.warning("Ensure that you have the latest helm version installed before proceeding.") logger.warning("This operation might take a while...\n") @@ -671,12 +671,14 @@ def update_agents(cmd, client, resource_group_name, cluster_name, https_proxy="" # Retrieving Helm chart OCI Artifact location registry_path = os.getenv('HELMREGISTRY') if os.getenv('HELMREGISTRY') else utils.get_helm_registry(profile, connected_cluster.location) + reg_path_array = registry_path.split(':') + agent_version = reg_path_array[1] + # Set agent version in registry path if connected_cluster.agent_version is not None: - registry_chart_path = registry_path.split(':')[0] - registry_path = registry_chart_path + ":" + connected_cluster.agent_version + agent_version = connected_cluster.agent_version + registry_path = reg_path_array[0] + ":" + connected_cluster.agent_version - agent_version = registry_path.split(':')[1] telemetry.add_extension_event('connectedk8s', {'Context.Default.AzureCLI.AgentVersion': agent_version}) # Get Helm chart path