Skip to content

Commit 3074b39

Browse files
authored
Merge branch 'main' into release/k8s-extension-1.9.4
2 parents 0e62df4 + 0877d22 commit 3074b39

204 files changed

Lines changed: 23001 additions & 15366 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎linter_exclusions.yml‎

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3716,3 +3716,98 @@ cosmosdb sql softdeleted-database list:
37163716
cosmosdb sql softdeleted-container list:
37173717
rule_exclusions:
37183718
- no_ids_for_list_commands
3719+
3720+
oracle-database autonomous-database update:
3721+
parameters:
3722+
is_schedule_az_update_to_earliest:
3723+
rule_exclusions: [option_length_too_long]
3724+
time_scheduled_az_update:
3725+
rule_exclusions: [option_length_too_long]
3726+
3727+
oracle-database cloud-exadata-infrastructure create:
3728+
parameters:
3729+
proximity_placement_group:
3730+
rule_exclusions: [option_length_too_long]
3731+
3732+
oracle-database cloud-vm-cluster create:
3733+
parameters:
3734+
is_accelerated_network_enabled:
3735+
rule_exclusions: [option_length_too_long]
3736+
proximity_placement_group:
3737+
rule_exclusions: [option_length_too_long]
3738+
reco_storage_percentage:
3739+
rule_exclusions: [option_length_too_long]
3740+
sparse_storage_percentage:
3741+
rule_exclusions: [option_length_too_long]
3742+
3743+
oracle-database cloud-vm-cluster update:
3744+
parameters:
3745+
is_accelerated_network_enabled:
3746+
rule_exclusions: [option_length_too_long]
3747+
3748+
oracle-database db-system create:
3749+
parameters:
3750+
data_collection_options:
3751+
rule_exclusions: [option_length_too_long]
3752+
3753+
oracle-database gi-minor-version list:
3754+
parameters:
3755+
is_gi_version_for_provisioning:
3756+
rule_exclusions: [option_length_too_long]
3757+
3758+
oracle-database golden-gate-connection assign-deployment:
3759+
parameters:
3760+
golden_gate_connection_name:
3761+
rule_exclusions: [option_length_too_long]
3762+
3763+
oracle-database golden-gate-connection assigned-deployment list:
3764+
parameters:
3765+
golden_gate_connection_name:
3766+
rule_exclusions: [option_length_too_long]
3767+
3768+
oracle-database golden-gate-connection assigned-deployment show:
3769+
parameters:
3770+
golden_gate_connection_name:
3771+
rule_exclusions: [option_length_too_long]
3772+
3773+
oracle-database golden-gate-connection unassign-deployment:
3774+
parameters:
3775+
golden_gate_connection_name:
3776+
rule_exclusions: [option_length_too_long]
3777+
3778+
oracle-database golden-gate-deployment assign-connection:
3779+
parameters:
3780+
golden_gate_deployment_name:
3781+
rule_exclusions: [option_length_too_long]
3782+
3783+
oracle-database golden-gate-deployment assigned-connection list:
3784+
parameters:
3785+
golden_gate_deployment_name:
3786+
rule_exclusions: [option_length_too_long]
3787+
3788+
oracle-database golden-gate-deployment assigned-connection show:
3789+
parameters:
3790+
golden_gate_deployment_name:
3791+
rule_exclusions: [option_length_too_long]
3792+
3793+
oracle-database golden-gate-deployment create:
3794+
parameters:
3795+
is_auto_scaling_enabled:
3796+
rule_exclusions: [option_length_too_long]
3797+
maintenance_configuration:
3798+
rule_exclusions: [option_length_too_long]
3799+
3800+
oracle-database golden-gate-deployment unassign-connection:
3801+
parameters:
3802+
golden_gate_deployment_name:
3803+
rule_exclusions: [option_length_too_long]
3804+
3805+
oracle-database golden-gate-deployment update:
3806+
parameters:
3807+
maintenance_configuration:
3808+
rule_exclusions: [option_length_too_long]
3809+
3810+
oracle-database network-anchor create:
3811+
parameters:
3812+
proximity_placement_group:
3813+
rule_exclusions: [option_length_too_long]

‎scripts/ci/credscan/CredScanSuppressions.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@
331331
{
332332
"file": [
333333
"src\\oracle-database\\azext_oracle_database\\tests\\latest\\test_oracle_db_systems.py",
334-
"src\\oracle-database\\azext_oracle_database\\tests\\latest\\recordings\\test_create_db_system.yaml"
334+
"src\\oracle-database\\azext_oracle_database\\tests\\latest\\test_oracle_database_golden_gate.py",
335+
"src\\oracle-database\\azext_oracle_database\\tests\\latest\\recordings\\test_oracledatabase_golden_gate_deployment_create_show.yaml"
335336
],
336337
"_justification": "[Oracle Database] False positive."
337338
},

‎src/aks-preview/HISTORY.rst‎

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

1212
Pending
1313
+++++++
14+
* `az aks create`: Add `--enable-upgrade-gate` to enable health-aware upgrade gating for the cluster.
15+
* `az aks update`: Add `--enable-upgrade-gate` and `--disable-upgrade-gate` to enable or disable health-aware upgrade gating for the cluster.
16+
* `az aks nodepool add/update`: Add `--enable-upgrade-gate` and `--disable-upgrade-gate` to enable or disable health-aware upgrade gating for the node pool.
17+
18+
22.0.0b13
19+
+++++++++
20+
* `az aks kollect`, `az aks kanalyze`, `az aks get-credentials` and `az aks bastion tunnel`: Use resolved executable paths consistently.
21+
* `az aks bastion tunnel`: Report unsuccessful tunnel process exits instead of returning success.
22+
* `az aks bastion tunnel`: Identify interactive shells by executable name rather than directory names.
1423
* `az aks create`: Add `--enable-disk-driver` so the AzureDisk CSI Driver can be enabled explicitly on create. The driver is already on by default, but `storageProfile.diskCSIDriver` was omitted from the create request unless `--disable-disk-driver` was passed, which blocked features that validate `storageProfile.diskCSIDriver.enabled` on the request body. `az aks update` already accepted this flag.
1524

1625
22.0.0b12

‎src/aks-preview/azext_aks_preview/_help.py‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,13 @@
794794
Provides scaled and performance-guaranteed control plane capacity for AKS clusters.
795795
Enables customers to select a control plane scaling size that delivers higher API server throughput,
796796
increased etcd capacity, and faster pod scheduling rates. Available values are 'H2', 'H4', and 'H8'.
797+
- name: --enable-upgrade-gate
798+
type: bool
799+
short-summary: Enable upgrade gate for the cluster. Agent pool upgrades wait for health signal validation and abort if unhealthy signals are observed.
800+
long-summary: This is a cluster-wide opt-in that applies to all agent pools in the cluster; an agent pool cannot opt out of it. Health signals are HealthSignal custom resources published by monitoring components running in the cluster. Force upgrade (--enable-force-upgrade) overrides the gate. For more information, see https://aka.ms/aks/upgrade-gate.
797801
examples:
802+
- name: Create a kubernetes cluster with upgrade gate enabled.
803+
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-upgrade-gate
798804
- name: Create a Kubernetes cluster with an existing SSH public key.
799805
text: az aks create -g MyResourceGroup -n MyManagedCluster --ssh-key-value /path/to/publickey
800806
- name: Create a Kubernetes cluster with a specific version.
@@ -1120,6 +1126,14 @@
11201126
- name: --upgrade-override-until
11211127
type: string
11221128
short-summary: Until when the cluster upgradeSettings overrides are effective. It needs to be in a valid date-time format that's within the next 30 days. For example, 2023-04-01T13:00:00Z. Note that if --force-upgrade is set to true and --upgrade-override-until is not set, by default it will be set to 3 days from now.
1129+
- name: --enable-upgrade-gate
1130+
type: bool
1131+
short-summary: Enable upgrade gate for the cluster. Agent pool upgrades wait for health signal validation and abort if unhealthy signals are observed.
1132+
long-summary: This is a cluster-wide opt-in that applies to all agent pools in the cluster; an agent pool cannot opt out of it. Health signals are HealthSignal custom resources published by monitoring components running in the cluster. Force upgrade (--enable-force-upgrade) overrides the gate. For more information, see https://aka.ms/aks/upgrade-gate.
1133+
- name: --disable-upgrade-gate
1134+
type: bool
1135+
short-summary: Disable upgrade gate for the cluster.
1136+
long-summary: Agent pools that explicitly enabled upgrade gate keep their own setting and remain gated.
11231137
- name: --enable-managed-identity
11241138
type: bool
11251139
short-summary: Update current cluster to managed identity to manage cluster resource group.
@@ -1655,6 +1669,8 @@
16551669
examples:
16561670
- name: Reconcile the cluster back to its current state.
16571671
text: az aks update -g MyResourceGroup -n MyManagedCluster
1672+
- name: Enable upgrade gate for a kubernetes cluster.
1673+
text: az aks update -g MyResourceGroup -n MyManagedCluster --enable-upgrade-gate
16581674
- name: Enable cluster-autoscaler within node count range [1,5]
16591675
text: az aks update --enable-cluster-autoscaler --min-count 1 --max-count 5 -g MyResourceGroup -n MyManagedCluster
16601676
- name: Disable cluster-autoscaler for an existing cluster
@@ -2701,6 +2717,14 @@
27012717
- name: --final-soak-duration
27022718
type: int
27032719
short-summary: Wait time (in minutes) after all old nodes are drained before removing them. Default is 60 minutes. Only for blue-green upgrades.
2720+
- name: --enable-upgrade-gate
2721+
type: bool
2722+
short-summary: Enable upgrade gate for the node pool. Upgrades of this node pool wait for health signal validation and abort if unhealthy signals are observed.
2723+
long-summary: When the cluster-level upgrade gate is enabled, a new node pool inherits it by default. Health signals are HealthSignal custom resources published by monitoring components running in the cluster. Force upgrade (--enable-force-upgrade) overrides the gate. For more information, see https://aka.ms/aks/upgrade-gate.
2724+
- name: --disable-upgrade-gate
2725+
type: bool
2726+
short-summary: Disable upgrade gate for the node pool.
2727+
long-summary: Rejected by the service when the cluster-level upgrade gate is enabled, since a node pool cannot opt out of a cluster-wide opt-in.
27042728
examples:
27052729
- name: Create a nodepool in an existing AKS cluster with ephemeral os enabled.
27062730
text: az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --node-osdisk-type Ephemeral --node-osdisk-size 48
@@ -2728,6 +2752,8 @@
27282752
text: az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --upgrade-strategy BlueGreen
27292753
- name: Create a node pool with an ordered mixed MIG profile layout
27302754
text: az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --enable-managed-gpu --gpu-mig-strategy Mixed --gpu-mig-profiles MIG1g MIG2g MIG2g MIG2g
2755+
- name: Create a node pool with upgrade gate enabled
2756+
text: az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --enable-upgrade-gate
27312757
"""
27322758

27332759
helps['aks nodepool scale'] = """
@@ -2943,13 +2969,23 @@
29432969
- name: --crg-id
29442970
type: string
29452971
short-summary: The Capacity Reservation Group (CRG) ID used to associate the existing nodepool with the existing Capacity Reservation Group resource.
2972+
- name: --enable-upgrade-gate
2973+
type: bool
2974+
short-summary: Enable upgrade gate for the node pool. Upgrades of this node pool wait for health signal validation and abort if unhealthy signals are observed.
2975+
long-summary: Health signals are HealthSignal custom resources published by monitoring components running in the cluster. Force upgrade (--enable-force-upgrade) overrides the gate. For more information, see https://aka.ms/aks/upgrade-gate.
2976+
- name: --disable-upgrade-gate
2977+
type: bool
2978+
short-summary: Disable upgrade gate for the node pool.
2979+
long-summary: Rejected by the service when the cluster-level upgrade gate is enabled, since a node pool cannot opt out of a cluster-wide opt-in. Use 'az aks update --disable-upgrade-gate' instead.
29462980
- name: --node-public-ip-prefix-ids
29472981
type: string
29482982
short-summary: Comma-separated list of public IP prefix resource IDs for dual-stack node public IPs (IPv4 and/or IPv6).
29492983
long-summary: At most one IPv4 and one IPv6 prefix may be specified. On an existing node pool this adds or replaces the assigned prefixes; an accepted change rolls the pool so existing nodes are recreated with the new public IPs. Requires the NodePublicIPv6PrefixPreview feature flag.
29502984
examples:
29512985
- name: Reconcile the nodepool back to its current state.
29522986
text: az aks nodepool update -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster
2987+
- name: Enable upgrade gate for a node pool.
2988+
text: az aks nodepool update -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --enable-upgrade-gate
29532989
- name: Enable cluster-autoscaler within node count range [1,5]
29542990
text: az aks nodepool update --enable-cluster-autoscaler --min-count 1 --max-count 5 -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster
29552991
- name: Disable cluster-autoscaler for an existing cluster

‎src/aks-preview/azext_aks_preview/_helpers.py‎

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,17 +136,31 @@ def reset_agentpool_to_name_and_mode(agentpool, mode):
136136

137137

138138
def which(binary):
139-
path_var = os.getenv('PATH')
140-
if platform.system() == 'Windows':
141-
binary = binary + '.exe'
142-
parts = path_var.split(';')
139+
"""Resolve an explicit executable path or search absolute directories in PATH."""
140+
is_windows = platform.system() == 'Windows'
141+
binaries = [binary]
142+
if is_windows and not os.path.splitext(binary)[1]:
143+
extensions = os.getenv('PATHEXT') or '.COM;.EXE;.BAT;.CMD'
144+
binaries = [binary + extension for extension in extensions.split(';') if extension]
145+
146+
explicit_path = bool(os.path.dirname(binary))
147+
if explicit_path:
148+
parts = ['']
143149
else:
144-
parts = path_var.split(':')
150+
parts = os.getenv('PATH', '').split(';' if is_windows else ':')
145151

146152
for part in parts:
147-
bin_path = os.path.join(part, binary)
148-
if os.path.exists(bin_path) and os.path.isfile(bin_path) and os.access(bin_path, os.X_OK):
149-
return bin_path
153+
if is_windows:
154+
part = part.strip('"')
155+
# Empty, relative and drive-relative entries depend on the working directory.
156+
if not explicit_path and (
157+
not os.path.isabs(part) or (is_windows and not os.path.splitdrive(part)[0])
158+
):
159+
continue
160+
for executable in binaries:
161+
bin_path = os.path.abspath(os.path.join(part, executable))
162+
if os.path.isfile(bin_path) and os.access(bin_path, os.X_OK):
163+
return bin_path
150164

151165
return None
152166

‎src/aks-preview/azext_aks_preview/_params.py‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@
257257
validate_system_node_subnet_id,
258258
validate_node_subnet_id,
259259
validate_force_upgrade_disable_and_enable_parameters,
260+
validate_upgrade_gate_disable_and_enable_parameters,
260261
validate_azure_service_mesh_revision,
261262
validate_artifact_streaming,
262263
validate_os_disk_full_caching,
@@ -1478,6 +1479,8 @@ def load_arguments(self, _):
14781479
help='The resource ID of the prepared image specification to use for provisioning nodes in the default '
14791480
'node pool.'
14801481
)
1482+
# upgrade gate
1483+
c.argument("enable_upgrade_gate", action="store_true", is_preview=True)
14811484

14821485
with self.argument_context("aks update") as c:
14831486
# managed cluster paramerters
@@ -1584,6 +1587,19 @@ def load_arguments(self, _):
15841587
validator=validate_force_upgrade_disable_and_enable_parameters,
15851588
)
15861589
c.argument("upgrade_override_until", is_preview=True)
1590+
# upgrade gate
1591+
c.argument(
1592+
"enable_upgrade_gate",
1593+
action="store_true",
1594+
is_preview=True,
1595+
validator=validate_upgrade_gate_disable_and_enable_parameters,
1596+
)
1597+
c.argument(
1598+
"disable_upgrade_gate",
1599+
action="store_true",
1600+
is_preview=True,
1601+
validator=validate_upgrade_gate_disable_and_enable_parameters,
1602+
)
15871603
c.argument(
15881604
"cluster_autoscaler_profile",
15891605
nargs="+",
@@ -2578,6 +2594,19 @@ def load_arguments(self, _):
25782594
validator=validate_prepared_image_specification_id,
25792595
help='The resource ID of the prepared image specification to use for provisioning nodes in the node pool.'
25802596
)
2597+
# upgrade gate
2598+
c.argument(
2599+
"enable_upgrade_gate",
2600+
action="store_true",
2601+
is_preview=True,
2602+
validator=validate_upgrade_gate_disable_and_enable_parameters,
2603+
)
2604+
c.argument(
2605+
"disable_upgrade_gate",
2606+
action="store_true",
2607+
is_preview=True,
2608+
validator=validate_upgrade_gate_disable_and_enable_parameters,
2609+
)
25812610

25822611
with self.argument_context("aks nodepool update") as c:
25832612
c.argument(
@@ -2746,6 +2775,19 @@ def load_arguments(self, _):
27462775
validator=validate_prepared_image_specification_id,
27472776
help='The resource ID of the prepared image specification to use for provisioning nodes in the node pool.'
27482777
)
2778+
# upgrade gate
2779+
c.argument(
2780+
"enable_upgrade_gate",
2781+
action="store_true",
2782+
is_preview=True,
2783+
validator=validate_upgrade_gate_disable_and_enable_parameters,
2784+
)
2785+
c.argument(
2786+
"disable_upgrade_gate",
2787+
action="store_true",
2788+
is_preview=True,
2789+
validator=validate_upgrade_gate_disable_and_enable_parameters,
2790+
)
27492791

27502792
with self.argument_context("aks nodepool upgrade") as c:
27512793
# upgrade strategy

‎src/aks-preview/azext_aks_preview/_validators.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,13 @@ def validate_force_upgrade_disable_and_enable_parameters(namespace):
859859
)
860860

861861

862+
def validate_upgrade_gate_disable_and_enable_parameters(namespace):
863+
if namespace.disable_upgrade_gate and namespace.enable_upgrade_gate:
864+
raise MutuallyExclusiveArgumentError(
865+
'Providing both --disable-upgrade-gate and --enable-upgrade-gate flags is invalid'
866+
)
867+
868+
862869
def sanitize_resource_id(resource_id):
863870
resource_id = resource_id.strip()
864871
if not resource_id.startswith("/"):

0 commit comments

Comments
 (0)