Skip to content

Commit

Permalink
renamed --proxy-skip-destinations to --proxy-skip-range
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Aug 7, 2020
1 parent 5770e67 commit 9dbaade
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/connectedk8s/azext_connectedk8s/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

Expand All @@ -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'] = """
Expand Down
4 changes: 2 additions & 2 deletions src/connectedk8s/azext_connectedk8s/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ 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.')
c.argument('kube_config', options_list=['--kube-config'], help='Path to the kube config file.')
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
Expand Down
10 changes: 6 additions & 4 deletions src/connectedk8s/azext_connectedk8s/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9dbaade

Please sign in to comment.