Skip to content

Commit 89bbdac

Browse files
authored
feat: remove --enable-custom-ca-trust and --disable-custom-ca-trust options (#9283)
1 parent 69386ce commit 89bbdac

File tree

9 files changed

+8
-83
lines changed

9 files changed

+8
-83
lines changed

src/aks-preview/HISTORY.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ To release a new version, please select a new version number (usually plus 1 to
1111

1212
Pending
1313
+++++++
14+
15+
19.0.0b1
16+
+++++++
17+
* [BREAKING CHANGE]: `az aks create`: remove `--enable-custom-ca-trust` and `--disable-custom-ca-trust` options
18+
* [BREAKING CHANGE]: `az aks update`: remove `--enable-custom-ca-trust` and `--disable-custom-ca-trust` options
19+
* [BREAKING CHANGE]: `az aks nodepool add`: remove `--enable-custom-ca-trust` and `--disable-custom-ca-trust` options
20+
* [BREAKING CHANGE]: `az aks nodepool update`: remove `--enable-custom-ca-trust` and `--disable-custom-ca-trust` options
1421
* `az aks update`: Add new parameter `--kms-infrastructure-encryption` to enable KMS infrastructure encryption on an existing cluster.
1522

1623
18.0.0b44

src/aks-preview/azext_aks_preview/_help.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -517,9 +517,6 @@
517517
- name: --dns-zone-resource-ids
518518
type: string
519519
short-summary: A comma separated list of resource IDs of the DNS zone resource to use with the App Routing addon.
520-
- name: --enable-custom-ca-trust
521-
type: bool
522-
short-summary: Enable Custom CA Trust on agent node pool.
523520
- name: --ca-certs --custom-ca-trust-certificates
524521
type: string
525522
short-summary: Path to a file containing up to 10 blank line separated certificates. Only valid for linux nodes.
@@ -730,8 +727,6 @@
730727
text: az aks create -g MyResourceGroup -n MyMC --kubernetes-version 1.20.13 --location westus2 --host-group-id /subscriptions/00000/resourceGroups/AnotherResourceGroup/providers/Microsoft.ContainerService/hostGroups/myHostGroup --node-vm-size VMSize --enable-managed-identity --assign-identity <user_assigned_identity_resource_id>
731728
- name: Create a kubernetes cluster with no CNI installed.
732729
text: az aks create -g MyResourceGroup -n MyManagedCluster --network-plugin none
733-
- name: Create a kubernetes cluster with Custom CA Trust enabled.
734-
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-custom-ca-trust
735730
- name: Create a kubernetes cluster with safeguards set to "Warning"
736731
text: az aks create -g MyResourceGroup -n MyManagedCluster --safeguards-level Warning --enable-addons azure-policy
737732
- name: Create a kubernetes cluster with safeguards set to "Warning" and some namespaces excluded
@@ -2023,9 +2018,6 @@
20232018
- name: --message-of-the-day
20242019
type: string
20252020
short-summary: Path to a file containing the desired message of the day. Only valid for linux nodes. Will be written to /etc/motd.
2026-
- name: --enable-custom-ca-trust
2027-
type: bool
2028-
short-summary: Enable Custom CA Trust on agent node pool.
20292021
- name: --disable-windows-outbound-nat
20302022
type: bool
20312023
short-summary: Disable Windows OutboundNAT on Windows agent node pool. Must use VMSS agent pool type.
@@ -2245,12 +2237,6 @@
22452237
- name: --node-taints
22462238
type: string
22472239
short-summary: The node taints for the node pool.
2248-
- name: --enable-custom-ca-trust
2249-
type: bool
2250-
short-summary: Enable Custom CA Trust on agent node pool.
2251-
- name: --dcat --disable-custom-ca-trust
2252-
type: bool
2253-
short-summary: Disable Custom CA Trust on agent node pool.
22542240
- name: --aks-custom-headers
22552241
type: string
22562242
short-summary: Send custom headers. When specified, format should be Key1=Value1,Key2=Value2

src/aks-preview/azext_aks_preview/_params.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@
186186
validate_defender_disable_and_enable_parameters,
187187
validate_disable_windows_outbound_nat,
188188
validate_asm_egress_name,
189-
validate_enable_custom_ca_trust,
190189
validate_eviction_policy,
191190
validate_grafanaresourceid,
192191
validate_host_group_id,
@@ -976,8 +975,6 @@ def load_arguments(self, _):
976975
arg_type=get_enum_type(workload_runtimes),
977976
default=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER,
978977
)
979-
# no validation for aks create because it already only supports Linux.
980-
c.argument("enable_custom_ca_trust", action="store_true")
981978
c.argument(
982979
"nodepool_allowed_host_ports",
983980
validator=validate_allowed_host_ports,
@@ -1787,11 +1784,6 @@ def load_arguments(self, _):
17871784
arg_type=get_enum_type(workload_runtimes),
17881785
default=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER,
17891786
)
1790-
c.argument(
1791-
"enable_custom_ca_trust",
1792-
action="store_true",
1793-
validator=validate_enable_custom_ca_trust,
1794-
)
17951787
c.argument(
17961788
"disable_windows_outbound_nat",
17971789
action="store_true",
@@ -1906,16 +1898,6 @@ def load_arguments(self, _):
19061898
c.argument("mode", arg_type=get_enum_type(node_mode_types))
19071899
c.argument("scale_down_mode", arg_type=get_enum_type(scale_down_modes))
19081900
# extensions
1909-
c.argument(
1910-
"enable_custom_ca_trust",
1911-
action="store_true",
1912-
validator=validate_enable_custom_ca_trust,
1913-
)
1914-
c.argument(
1915-
"disable_custom_ca_trust",
1916-
options_list=["--disable-custom-ca-trust", "--dcat"],
1917-
action="store_true",
1918-
)
19191901
c.argument(
19201902
"allowed_host_ports", validator=validate_allowed_host_ports, is_preview=True
19211903
)

src/aks-preview/azext_aks_preview/_validators.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -731,14 +731,6 @@ def validate_bootstrap_container_registry_resource_id(namespace):
731731
raise InvalidArgumentValueError("--bootstrap-container-registry-resource-id is not a valid Azure resource ID.")
732732

733733

734-
def validate_enable_custom_ca_trust(namespace):
735-
"""Validates Custom CA Trust can only be used on Linux."""
736-
if namespace.enable_custom_ca_trust:
737-
if hasattr(namespace, 'os_type') and namespace.os_type != "Linux":
738-
raise ArgumentUsageError(
739-
'--enable_custom_ca_trust can only be set for Linux nodepools')
740-
741-
742734
def validate_custom_ca_trust_certificates(namespace):
743735
"""Validates Custom CA Trust Certificates can only be used on Linux."""
744736
if namespace.custom_ca_trust_certificates is not None and namespace.custom_ca_trust_certificates != "":

src/aks-preview/azext_aks_preview/custom.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,6 @@ def aks_create(
709709
crg_id=None,
710710
message_of_the_day=None,
711711
workload_runtime=None,
712-
enable_custom_ca_trust=False,
713712
nodepool_allowed_host_ports=None,
714713
nodepool_asg_ids=None,
715714
node_public_ip_tags=None,
@@ -1440,7 +1439,6 @@ def aks_agentpool_add(
14401439
crg_id=None,
14411440
message_of_the_day=None,
14421441
workload_runtime=None,
1443-
enable_custom_ca_trust=False,
14441442
disable_windows_outbound_nat=False,
14451443
allowed_host_ports=None,
14461444
asg_ids=None,
@@ -1517,8 +1515,6 @@ def aks_agentpool_update(
15171515
no_wait=False,
15181516
aks_custom_headers=None,
15191517
# extensions
1520-
enable_custom_ca_trust=False,
1521-
disable_custom_ca_trust=False,
15221518
allowed_host_ports=None,
15231519
asg_ids=None,
15241520
enable_artifact_streaming=False,

src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5704,7 +5704,6 @@ def test_construct_mc_profile_preview(self):
57045704
enable_fips=False,
57055705
mode=CONST_NODEPOOL_MODE_SYSTEM,
57065706
workload_runtime=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER,
5707-
enable_custom_ca_trust=False,
57085707
network_profile=self.models.AgentPoolNetworkProfile(),
57095708
security_profile=ground_truth_security_profile,
57105709
)

src/aks-preview/azext_aks_preview/tests/latest/test_update_agentpool_profile_preview.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ def test_update_agentpool_profile_preview_managed_system_mode(self):
227227
mode=CONST_NODEPOOL_MODE_MANAGEDSYSTEM,
228228
vm_size="Standard_D2s_v3",
229229
count=5,
230-
enable_custom_ca_trust=True,
231230
)
232231

233232
# Mock the update_agentpool_profile_default method
@@ -319,7 +318,6 @@ def test_update_agentpool_profile_preview_system_mode_regular_flow(self):
319318
"resource_group_name": "test_rg",
320319
"cluster_name": "test_cluster",
321320
"nodepool_name": "test_nodepool",
322-
"enable_custom_ca_trust": True,
323321
}
324322

325323
decorator = AKSPreviewAgentPoolUpdateDecorator(

src/aks-preview/azext_aks_preview/tests/latest/test_validators.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,6 @@ def __init__(self, message_of_the_day, os_type):
137137
self.message_of_the_day = message_of_the_day
138138

139139

140-
class EnableCustomCATrustNamespace:
141-
def __init__(self, os_type, enable_custom_ca_trust):
142-
self.os_type = os_type
143-
self.enable_custom_ca_trust = enable_custom_ca_trust
144-
145-
146140
class CustomCATrustCertificatesNamespace:
147141
def __init__(self, os_type, custom_ca_trust_certificates):
148142
self.os_type = os_type
@@ -331,35 +325,6 @@ def test_fail_if_os_type_invalid(self):
331325
)
332326

333327

334-
class TestEnableCustomCATrust(unittest.TestCase):
335-
def test_pass_if_os_type_linux(self):
336-
validators.validate_enable_custom_ca_trust(
337-
EnableCustomCATrustNamespace("Linux", True)
338-
)
339-
340-
def test_fail_if_os_type_windows(self):
341-
with self.assertRaises(CLIError) as cm:
342-
validators.validate_enable_custom_ca_trust(
343-
EnableCustomCATrustNamespace("Windows", True)
344-
)
345-
self.assertTrue(
346-
"--enable_custom_ca_trust can only be set for Linux nodepools"
347-
in str(cm.exception),
348-
msg=str(cm.exception),
349-
)
350-
351-
def test_fail_if_os_type_invalid(self):
352-
with self.assertRaises(CLIError) as cm:
353-
validators.validate_enable_custom_ca_trust(
354-
EnableCustomCATrustNamespace("invalid", True)
355-
)
356-
self.assertTrue(
357-
"--enable_custom_ca_trust can only be set for Linux nodepools"
358-
in str(cm.exception),
359-
msg=str(cm.exception),
360-
)
361-
362-
363328
class TestCustomCATrustCertificates(unittest.TestCase):
364329
def test_valid_cases(self):
365330
valid = ["foo", ""]

src/aks-preview/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from setuptools import find_packages, setup
1111

12-
VERSION = "18.0.0b44"
12+
VERSION = "19.0.0b1"
1313

1414
CLASSIFIERS = [
1515
"Development Status :: 4 - Beta",

0 commit comments

Comments
 (0)