Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public preview wif changes #7785

Merged
merged 26 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
eebb983
Copied folder from swagger spec PR check
9lash Jun 25, 2024
261fde2
Merge branch 'Azure:main' into abiyer/add-arcgateway
9lash Jun 25, 2024
28de5a4
consume the connection-type variable and set the 07-24 client factory
9lash Jun 27, 2024
4a397ad
Merge branch 'Azure:main' into abiyer/add-arcgateway
9lash Jun 27, 2024
33c889f
Updates for new RP and DP structure
9lash Jun 29, 2024
cd21daf
Merge remote-tracking branch '9lash/abiyer/add-arcgateway' into Publi…
deeksha345 Jul 2, 2024
e3a1921
initial changes for adding oidc and workload identity params
deeksha345 Jul 2, 2024
ed24eeb
creating/ updating cc request payload with workload identity properti…
deeksha345 Jul 3, 2024
47106b2
adding wait for agent state, fixing errors
deeksha345 Jul 9, 2024
2934547
updating utils
deeksha345 Jul 9, 2024
cbf4512
updating cli version
deeksha345 Jul 10, 2024
009f7ce
fixing error
deeksha345 Jul 10, 2024
71e3968
adding wait for agent state only if workload identity is enabled
deeksha345 Jul 10, 2024
2819dd7
updates based on comments
deeksha345 Jul 11, 2024
54d5c25
updates based on comments
deeksha345 Jul 12, 2024
d8f942a
using same api version client for all preview feat
deeksha345 Jul 12, 2024
669c4a7
Merge remote-tracking branch 'upstream/main' into PublicPreviewWifCha…
deeksha345 Jul 15, 2024
33b652c
updating the api version used for show and list call so that it shows…
deeksha345 Jul 15, 2024
27753fe
refactoring generate request payload code
deeksha345 Jul 16, 2024
ddeec89
adding test scenarios for workload identity update and connect
deeksha345 Jul 16, 2024
318fbef
fixing linter issue
deeksha345 Jul 19, 2024
a22c428
fixing linter issue
deeksha345 Jul 19, 2024
cfc7a88
updating params
deeksha345 Jul 19, 2024
038dea8
updating params
deeksha345 Jul 19, 2024
e011545
adding flag for disable workload identity
deeksha345 Jul 22, 2024
39221f9
adding functionality for the disable flag
deeksha345 Jul 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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=""):
deeksha345 marked this conversation as resolved.
Show resolved Hide resolved
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:
deeksha345 marked this conversation as resolved.
Show resolved Hide resolved
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
Loading