Skip to content
Open
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
20aecd7
add pester tests for connectedk8s cli extension
Mar 18, 2025
40926a3
Pass the force delete param to the API call (#4)
atchutbarli Mar 25, 2025
8f068a8
fix CI testcases for nodepool image issues (#8)
bavneetsingh16 May 23, 2025
ad1ce1d
update python version to 3.13 (#12)
bavneetsingh16 Jul 31, 2025
2121694
changes to support gateway association/disassociation for api version…
bavneetsingh16 Sep 17, 2025
3c08eac
[Azure RBAC] Deprecate 3P mode flags, fix Azure RBAC enablement bug, …
vineeth-thumma Sep 29, 2025
ed5b5e2
Merge branch 'Azure:main' into main
bavneetsingh16 Oct 15, 2025
9038227
remove hardcoded public ARM endpoint url for fairfax and mooncake (#24)
bavneetsingh16 Oct 15, 2025
002220d
Bug Fix for FFX mcr url (#22)
hapate Oct 15, 2025
6c0a24b
[connectedk8s] update release notes and version (#26)
bavneetsingh16 Oct 16, 2025
3ca7ae1
Add Helm Overrides for AGC (#23)
junw98 Oct 27, 2025
bbebbcd
[Azure RBAC] Remove deprecated flags (#16)
vineeth-thumma Oct 28, 2025
979a4c3
update prediag version (#27)
atchutbarli Nov 4, 2025
09119b8
Updating the proxy version constant (#28)
gabemousa Nov 5, 2025
a3efc72
Update relesae notes
atchutbarli Nov 7, 2025
a80837e
Merge remote-tracking branch 'upstream/main' into release-v1.10.12
atchutbarli Nov 11, 2025
7a60ee8
dropping 3.9
atchutbarli Nov 12, 2025
b15964e
dropping testing folder
atchutbarli Nov 12, 2025
04c61db
fixed code review comments
atchutbarli Nov 12, 2025
2060580
updateversion
atchutbarli Nov 18, 2025
05b9409
Update src/connectedk8s/HISTORY.rst
atchutbarli Nov 18, 2025
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
7 changes: 7 additions & 0 deletions src/connectedk8s/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
Release History
===============
1.10.12
+++++
* Removed deprecated '--app-id' and '--app-secret' RBAC parameters from the extension.
* Update cluster diagnostics image to comply with Pod Securty standards-restricted( Updated image version:1.31.2).
* Add endpoint overrides for Azure Government cloud environments
* Update Proxy Image to 1.3.032281

1.10.11
+++++++
* Removed hardcoded public ARM endpoint URL for Government clouds.
Expand Down
8 changes: 0 additions & 8 deletions src/connectedk8s/azext_connectedk8s/_breaking_change.py

This file was deleted.

4 changes: 2 additions & 2 deletions src/connectedk8s/azext_connectedk8s/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@

# Connect Precheck Diagnoser constants
Cluster_Diagnostic_Checks_Job_Registry_Path = (
"azurearck8s/helmchart/stable/clusterdiagnosticchecks:1.29.3"
"azurearck8s/helmchart/stable/clusterdiagnosticchecks:1.31.2"
)
Cluster_Diagnostic_Checks_Helm_Install_Failed_Fault_Type = (
"Error while installing cluster diagnostic checks helm release"
Expand Down Expand Up @@ -476,7 +476,7 @@
)
DNS_Check_Result_String = "DNS Result:"
AZ_CLI_ADAL_TO_MSAL_MIGRATE_VERSION = "2.30.0"
CLIENT_PROXY_VERSION = "1.3.029301"
CLIENT_PROXY_VERSION = "1.3.032281"
CLIENT_PROXY_FOLDER = ".clientproxy"
API_SERVER_PORT = 47011
CLIENT_PROXY_PORT = 47010
Expand Down
14 changes: 0 additions & 14 deletions src/connectedk8s/azext_connectedk8s/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,20 +440,6 @@ def load_arguments(self: Connectedk8sCommandsLoader, _: CLICommand) -> None:
options_list=["--features"],
help="Space-separated list of features you want to enable.",
)
c.argument(
"azrbac_client_id",
options_list=["--app-id"],
arg_group="Azure RBAC",
help="Application ID for enabling Azure RBAC.",
deprecate_info=c.deprecate(hide=True),
)
c.argument(
"azrbac_client_secret",
options_list=["--app-secret"],
arg_group="Azure RBAC",
help="Application secret for enabling Azure RBAC.",
deprecate_info=c.deprecate(hide=True),
)
c.argument(
"azrbac_skip_authz_check",
options_list=["--skip-azure-rbac-list"],
Expand Down
53 changes: 53 additions & 0 deletions src/connectedk8s/azext_connectedk8s/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,7 @@ def helm_install_release(
]

# Special configurations from 2022-09-01 ARM metadata.
# "dataplaneEndpoints" does not appear in arm_metadata for public and AGC
if "dataplaneEndpoints" in arm_metadata:
if "arcConfigEndpoint" in arm_metadata["dataplaneEndpoints"]:
notification_endpoint = arm_metadata["dataplaneEndpoints"][
Expand Down Expand Up @@ -1364,6 +1365,10 @@ def helm_install_release(
"'arcConfigEndpoint' doesn't exist under 'dataplaneEndpoints' in the ARM metadata."
)

# Add overrides for AGC Scenario
if cloud_name.lower() == "ussec" or cloud_name.lower() == "usnat":
add_agc_endpoint_overrides(location, cloud_name, arm_metadata, cmd_helm_install)

# Add helmValues content response from DP
cmd_helm_install = parse_helm_values(helm_content_values, cmd_helm=cmd_helm_install)

Expand Down Expand Up @@ -1839,3 +1844,51 @@ def helm_update_agent(
logger.info(str.format(consts.Update_Agent_Success, cluster_name))
with contextlib.suppress(OSError):
os.remove(user_values_location)


def add_agc_endpoint_overrides(
location: str,
cloud_name: str,
arm_metadata: dict[str, Any],
cmd_helm_install: list[str],
) -> None:
logger.debug("Adding AGC scenario overrides.")

arm_metadata_endpoint_array = (
arm_metadata["authentication"]["loginEndpoint"].strip("/").split(".")
)
if len(arm_metadata_endpoint_array) < 4:
raise CLIInternalError("Unexpected loginEndpoint format for AGC")

cloud_suffix = arm_metadata_endpoint_array[3]
endpoint_suffix = (
arm_metadata_endpoint_array[2] + "." + arm_metadata_endpoint_array[3]
)
if cloud_name.lower() == "usnat":
cloud_suffix = (
arm_metadata_endpoint_array[2]
+ "."
+ arm_metadata_endpoint_array[3]
+ "."
+ arm_metadata_endpoint_array[4]
)
endpoint_suffix = cloud_suffix

cmd_helm_install.extend(
[
"--set",
f"global.microsoftArtifactRepository=mcr.microsoft.{cloud_suffix}",
"--set",
f"systemDefaultValues.activeDirectoryEndpoint=https://login.microsoftonline.{endpoint_suffix}",
"--set",
f"systemDefaultValues.azureArcAgents.config_dp_endpoint_override=https://{location}.dp.kubernetesconfiguration.azure.{endpoint_suffix}",
"--set",
f"systemDefaultValues.clusterconnect-agent.notification_dp_endpoint_override=https://guestnotificationservice.azure.{endpoint_suffix}",
"--set",
f"systemDefaultValues.clusterconnect-agent.relay_endpoint_suffix_override=.servicebus.cloudapi.{endpoint_suffix}",
"--set",
f"systemDefaultValues.clusteridentityoperator.his_endpoint_override=https://gbl.his.arc.azure.{endpoint_suffix}/discovery?location={location}&api-version=1.1-preview",
"--set",
f"systemDefaultValues.image.repository=mcr.microsoft.{cloud_suffix}",
]
)
2 changes: 0 additions & 2 deletions src/connectedk8s/azext_connectedk8s/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -2975,8 +2975,6 @@ def enable_features(
features: list[str],
kube_config: str | None = None,
kube_context: str | None = None,
azrbac_client_id: str | None = None,
azrbac_client_secret: str | None = None,
azrbac_skip_authz_check: str | None = None,
skip_ssl_verification: bool = False,
cl_oid: str | None = None,
Expand Down
2 changes: 1 addition & 1 deletion src/connectedk8s/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# TODO: Confirm this is the right version number you want and it matches your
# HISTORY.rst entry.

VERSION = "1.10.11"
VERSION = "1.10.12"

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down
2 changes: 1 addition & 1 deletion src/k8s-extension/azext_k8s_extension/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ def install_helm_client(cmd: CLICommand) -> str:
"Downloading helm client for first time. This can take few minutes..."
)

mcr_url = utils.get_mcr_path(cmd)
mcr_url = utils.get_mcr_path(cmd.cli_ctx.cloud.endpoints.active_directory)

client = oras.client.OrasClient(hostname=mcr_url)
retry_count = 3
Expand Down
12 changes: 8 additions & 4 deletions src/k8s-extension/azext_k8s_extension/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,15 @@ def create_folder_diagnosticlogs(folder_name: str, base_folder_name: str) -> tup
)
return "", False

def get_mcr_path(cmd: CLICommand) -> str:
active_directory_array = cmd.cli_ctx.cloud.endpoints.active_directory.split(".")
def get_mcr_path(active_directory_endpoint: str) -> str:
active_directory_array = active_directory_endpoint.split(".")

# default for public, mc, ff clouds
mcr_postfix = active_directory_array[2]
# For US Government and China clouds, use public mcr
if active_directory_endpoint.endswith((".us", ".cn")):
return "mcr.microsoft.com"

# Default MCR postfix
mcr_postfix = "com"
# special cases for USSec, exclude part of suffix
if len(active_directory_array) == 4 and active_directory_array[2] == "microsoft":
mcr_postfix = active_directory_array[3]
Expand Down
Loading