Skip to content

Commit

Permalink
updates based on comments
Browse files Browse the repository at this point in the history
  • Loading branch information
deeksha345 committed Jul 11, 2024
1 parent 71e3968 commit 2819dd7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 15 deletions.
3 changes: 2 additions & 1 deletion src/connectedk8s/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
Release History
===============

1.7.4
1.8.0
++++++
* New api version 2024-07-1-preview added
* Adding functionality for workload identity feature.
* Cluster create and update waits for agent state

Expand Down
2 changes: 0 additions & 2 deletions src/connectedk8s/azext_connectedk8s/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ def load_arguments(self, _):
c.argument('container_log_path', help='Override the default container log path to enable fluent-bit logging')
c.argument('skip_ssl_verification', action='store_true', help='Skip SSL verification for any cluster connection.')
c.argument('yes', options_list=['--yes', '-y'], help='Do not prompt for confirmation.', action='store_true')
c.argument('enable_gateway', options_list=['--enable_gateway'], help='pass this value to enable Arc Gateway')
c.argument('disable_gateway', options_list=['--disable_gateway'], help='pass this value to enable Arc Gateway')
c.argument('enable_oidc_issuer', arg_type=get_three_state_flag(), help="Enable creation of OIDC issuer url used for workload identity", is_preview=True)
c.argument('self_hosted_issuer', options_list=['--self-hosted-issuer'], help="Self hosted issuer url for public cloud clusters - AKS, GKE, EKS", is_preview=True)
c.argument('enable_workload_identity', arg_type=get_three_state_flag(), help="Enable workload identity webhook", is_preview=True)
Expand Down
2 changes: 0 additions & 2 deletions src/connectedk8s/azext_connectedk8s/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,6 @@ def helm_install_release(resource_manager, chart_path, subscription_id, kubernet
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"))

# TODO: implement a new helm_release command where you just consume the dp_helm_values and run a for loop and end up creating the helm values command.

def get_release_namespace(kube_config, kube_context, helm_client_location, release_name='azure-arc'):
cmd_helm_release = [helm_client_location, "list", "-a", "--all-namespaces", "--output", "json"]
if kube_config:
Expand Down
12 changes: 3 additions & 9 deletions src/connectedk8s/azext_connectedk8s/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
def create_connectedk8s(cmd, client, resource_group_name, cluster_name, correlation_id=None, https_proxy="", http_proxy="", no_proxy="", proxy_cert="", location=None,
kube_config=None, kube_context=None, no_wait=False, tags=None, distribution='generic', infrastructure='generic',
disable_auto_upgrade=False, cl_oid=None, onboarding_timeout="600", enable_private_link=None, private_link_scope_resource_id=None,
distribution_version=None, azure_hybrid_benefit=None, skip_ssl_verification=False, yes=False, container_log_path=None, connection_type="direct",
distribution_version=None, azure_hybrid_benefit=None, skip_ssl_verification=False, yes=False, container_log_path=None,
enable_oidc_issuer=False, enable_workload_identity=False, self_hosted_issuer=""):
logger.warning("This operation might take a while...\n")

Expand Down Expand Up @@ -136,11 +136,7 @@ def create_connectedk8s(cmd, client, resource_group_name, cluster_name, correlat
proxy_cert = proxy_cert.replace('\\', r'\\\\')

# Set preview client if latest preview properties are provided.
if enable_private_link is not None or distribution_version is not None or azure_hybrid_benefit is not None:
client = cf_connected_cluster_prev_2023_11_01(cmd.cli_ctx, None)

# Set preview client if the connection-type is provided. (TODO: To test whether overriding the client factory to 2024 will retain the 2023 private link feature as in the line above)
if connection_type is not None and connection_type == "gateway" or enable_workload_identity or enable_oidc_issuer:
if enable_private_link is not None or distribution_version is not None or azure_hybrid_benefit is not None or enable_workload_identity or enable_oidc_issuer:
client = cf_connected_cluster_prev_2024_07_01(cmd.cli_ctx, None)

# Checking whether optional extra values file has been provided.
Expand Down Expand Up @@ -224,9 +220,6 @@ def create_connectedk8s(cmd, client, resource_group_name, cluster_name, correlat
logger.warning("There is no storage space available on your device and hence not saving cluster \
diagnostic check logs on your device")

# TODO: Add DP health check call


except Exception as e:
telemetry.set_exception(exception="An exception has occured while trying to execute pre-onboarding diagnostic \
checks : {}".format(str(e)),
Expand Down Expand Up @@ -1385,6 +1378,7 @@ def update_connected_cluster(cmd, client, resource_group_name, cluster_name, htt

# Add 2nd long running operation to wait for Agent State to reach terminal stage with a default 20 minute timeout window
# TODO: Update poll_for_agent_state method to check for agent state and not provisioning state when feedback loop is implemented
# This condition will be hit after provisioning state
if enable_oidc_issuer or enable_workload_identity:
print("Hold for Agent State to reach terminal state")
if not poll_for_agent_state(cmd, resource_group_name, cluster_name):
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.7.4'
VERSION = '1.8.0'

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

0 comments on commit 2819dd7

Please sign in to comment.