diff --git a/src/connectedk8s/HISTORY.rst b/src/connectedk8s/HISTORY.rst index b0b117025b..dd00f99f51 100644 --- a/src/connectedk8s/HISTORY.rst +++ b/src/connectedk8s/HISTORY.rst @@ -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 diff --git a/src/connectedk8s/azext_connectedk8s/_params.py b/src/connectedk8s/azext_connectedk8s/_params.py index b399249e8d..757a2b0026 100644 --- a/src/connectedk8s/azext_connectedk8s/_params.py +++ b/src/connectedk8s/azext_connectedk8s/_params.py @@ -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) diff --git a/src/connectedk8s/azext_connectedk8s/_utils.py b/src/connectedk8s/azext_connectedk8s/_utils.py index ec503aa381..54ea0da198 100644 --- a/src/connectedk8s/azext_connectedk8s/_utils.py +++ b/src/connectedk8s/azext_connectedk8s/_utils.py @@ -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: diff --git a/src/connectedk8s/azext_connectedk8s/custom.py b/src/connectedk8s/azext_connectedk8s/custom.py index 3125407098..bae2bfbd14 100644 --- a/src/connectedk8s/azext_connectedk8s/custom.py +++ b/src/connectedk8s/azext_connectedk8s/custom.py @@ -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") @@ -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. @@ -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)), @@ -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): diff --git a/src/connectedk8s/setup.py b/src/connectedk8s/setup.py index 3acadd0e94..7bd038e3e6 100644 --- a/src/connectedk8s/setup.py +++ b/src/connectedk8s/setup.py @@ -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