Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 14 additions & 1 deletion .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,6 @@ configuration:
- mentionUsers:
mentionees:
- sourabhguha
- inesk-vt
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
Expand Down Expand Up @@ -2990,6 +2989,20 @@ configuration:
- xgithubtriage
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
- hasLabel:
label: Service Attention
- hasLabel:
label: Storage Action
then:
- mentionUsers:
mentionees:
- blueww
- sshankMSFT
- golddove
- S-J-M
replyTemplate: Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc ${mentionees}.
assignMentionees: False
- if:
- hasLabel:
label: Service Attention
Expand Down
15 changes: 15 additions & 0 deletions linter_exclusions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,15 @@ aks create:
azure_keyvault_kms_key_vault_network_access:
rule_exclusions:
- option_length_too_long
enable_ai_toolchain_operator:
rule_exclusions:
- option_length_too_long
azure_keyvault_kms_key_vault_resource_id:
rule_exclusions:
- option_length_too_long
node_provisioning_default_pools:
rule_exclusions:
- option_length_too_long
aks enable-addons:
parameters:
workspace_resource_id:
Expand Down Expand Up @@ -362,9 +368,18 @@ aks update:
azure_keyvault_kms_key_vault_network_access:
rule_exclusions:
- option_length_too_long
enable_ai_toolchain_operator:
rule_exclusions:
- option_length_too_long
disable_ai_toolchain_operator:
rule_exclusions:
- option_length_too_long
azure_keyvault_kms_key_vault_resource_id:
rule_exclusions:
- option_length_too_long
node_provisioning_default_pools:
rule_exclusions:
- option_length_too_long
aks update-credentials:
parameters:
aad_server_app_secret:
Expand Down
12 changes: 10 additions & 2 deletions scripts/ci/test_extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,16 @@ set +e

for ext in $output; do
echo
# Use regex to detect if $ext is in $ignore_list
if [[ $ignore_list =~ $ext ]]; then
# Exact string matching against each item in the ignore list
ignore_match=0
for item in $ignore_list; do
if [ "$ext" = "$item" ]; then
ignore_match=1
break
fi
done

if [ $ignore_match -eq 1 ]; then
echo "Ignore extension: $ext"
continue
fi
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli-core/azure/cli/core/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ class CloudNameEnum: # pylint: disable=too-few-public-methods
gallery='https://gallery.usgovcloudapi.net/',
active_directory='https://login.microsoftonline.us',
active_directory_resource_id='https://management.core.usgovcloudapi.net/',
active_directory_graph_resource_id='https://graph.windows.net/',
active_directory_graph_resource_id='https://graph.microsoftazure.us/',
microsoft_graph_resource_id='https://graph.microsoft.us/',
vm_image_alias_doc='https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/arm-compute/quickstart-templates/aliases.json',
media_resource_id='https://rest.media.usgovcloudapi.net',
Expand Down
8 changes: 8 additions & 0 deletions src/azure-cli/azure/cli/command_modules/acs/_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,14 @@
CONST_ARTIFACT_SOURCE_DIRECT = "Direct"
CONST_ARTIFACT_SOURCE_CACHE = "Cache"

# node provisioning mode
CONST_NODE_PROVISIONING_MODE_MANUAL = "Manual"
CONST_NODE_PROVISIONING_MODE_AUTO = "Auto"

# node provisioning default pools
CONST_NODE_PROVISIONING_DEFAULT_POOLS_NONE = "None"
CONST_NODE_PROVISIONING_DEFAULT_POOLS_AUTO = "Auto"


# consts for decorator pattern
class DecoratorMode(Enum):
Expand Down
42 changes: 42 additions & 0 deletions src/azure-cli/azure/cli/command_modules/acs/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,12 +590,26 @@
short-summary: Configure artifact source when bootstraping the cluster.
long-summary: |
The artifacts include the addon image. Use "Direct" to download artifacts from MCR, "Cache" to downalod artifacts from Azure Container Registry.
- name: --enable-ai-toolchain-operator
type: bool
short-summary: Enable AI toolchain operator to the cluster.
- name: --bootstrap-container-registry-resource-id
type: string
short-summary: Configure container registry resource ID. Must use "Cache" as bootstrap artifact source.
- name: --enable-static-egress-gateway
type: bool
short-summary: Enable Static Egress Gateway addon to the cluster.
- name: --node-provisioning-mode
type: string
short-summary: Set the node provisioning mode of the cluster. Valid values are "Auto" and "Manual". For more information on "Auto" mode see aka.ms/aks/nap.
- name: --node-provisioning-default-pools
type: string
short-summary: The set of default Karpenter NodePools configured for node provisioning. Valid values are "Auto" and "None".
long-summary: |-
The set of default Karpenter NodePools configured for node provisioning. Valid values are "Auto" and "None".
Auto: A standard set of Karpenter NodePools are provisioned.
None: No Karpenter NodePools are provisioned.
WARNING: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools to be deleted, which will in turn drain and delete the nodes associated with those pools. It is strongly recommended to not do this unless there are idle nodes ready to take the pods evicted by that action.
examples:
- name: Create a Kubernetes cluster with an existing SSH public key.
text: az aks create -g MyResourceGroup -n MyManagedCluster --ssh-key-value /path/to/publickey
Expand Down Expand Up @@ -675,6 +689,10 @@
text: az aks create -g MyResourceGroup -n MyManagedCluster --os-sku Ubuntu --max-pods MaxPodsPerNode --network-plugin azure --vnet-subnet-id /subscriptions/SubID/resourceGroups/AnotherResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/NodeSubnet --pod-subnet-id /subscriptions/SubID/resourceGroups/AnotherResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/PodSubnet --pod-ip-allocation-mode StaticBlock
- name: Create a kubernetes cluster with VirtualMachines vm set type.
text: az aks create -g MyResourceGroup -n MyManagedCluster --vm-set-type VirtualMachines --vm-sizes "VMSize1,VMSize2" --node-count 3
- name: Create a kubernetes cluster with auto node provisioning.
text: az aks create -g MyResourceGroup -n MyManagedCluster --node-provisioning-mode Auto
- name: Create a kubernetes cluster with auto node provisioning and no default pools.
text: az aks create -g MyResourceGroup -n MyManagedCluster --node-provisioning-mode Auto --node-provisioning-default-pools None
"""

helps['aks update'] = """
Expand Down Expand Up @@ -1048,6 +1066,12 @@
short-summary: Configure artifact source when bootstraping the cluster.
long-summary: |
The artifacts include the addon image. Use "Direct" to download artifacts from MCR, "Cache" to downalod artifacts from Azure Container Registry.
- name: --enable-ai-toolchain-operator
type: bool
short-summary: Enable AI toolchain operator to the cluster
- name: --disable-ai-toolchain-operator
type: bool
short-summary: Disable AI toolchain operator.
- name: --bootstrap-container-registry-resource-id
type: string
short-summary: Configure container registry resource ID. Must use "Cache" as bootstrap artifact source.
Expand All @@ -1057,6 +1081,20 @@
- name: --disable-static-egress-gateway
type: bool
short-summary: Disable Static Egress Gateway addon to the cluster.
- name: --migrate-vmas-to-vms
type: bool
short-summary: Migrate cluster with VMAS node pool to VMS node pool.
- name: --node-provisioning-mode
type: string
short-summary: Set the node provisioning mode of the cluster. Valid values are "Auto" and "Manual". For more information on "Auto" mode see aka.ms/aks/nap.
- name: --node-provisioning-default-pools
type: string
short-summary: The set of default Karpenter NodePools configured for node provisioning. Valid values are "Auto" and "None".
long-summary: |-
The set of default Karpenter NodePools configured for node provisioning. Valid values are "Auto" and "None".
Auto: A standard set of Karpenter NodePools are provisioned.
None: No Karpenter NodePools are provisioned.
WARNING: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools to be deleted, which will in turn drain and delete the nodes associated with those pools. It is strongly recommended to not do this unless there are idle nodes ready to take the pods evicted by that action.
examples:
- name: Reconcile the cluster back to its current state.
text: az aks update -g MyResourceGroup -n MyManagedCluster
Expand Down Expand Up @@ -1116,6 +1154,10 @@
text: az aks update -g MyResourceGroup -n MyManagedCLuster --enable-vpa
- name: Disable VPA(Vertical Pod Autoscaler) for an existing kubernetes cluster.
text: az aks update -g MyResourceGroup -n MyManagedCLuster --disable-vpa
- name: Update a kubernetes cluster to use auto node provisioning.
text: az aks update -g MyResourceGroup -n MyManagedCluster --node-provisioning-mode Auto
- name: Update a kubernetes cluster to use auto node provisioning mode with no default pools.
text: az aks update -g MyResourceGroup -n MyManagedCluster --node-provisioning-mode Auto --node-provisioning-default-pools None
"""

helps['aks delete'] = """
Expand Down
67 changes: 66 additions & 1 deletion src/azure-cli/azure/cli/command_modules/acs/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@
CONST_APP_ROUTING_ANNOTATION_CONTROLLED_NGINX,
CONST_APP_ROUTING_EXTERNAL_NGINX,
CONST_APP_ROUTING_INTERNAL_NGINX,
CONST_APP_ROUTING_NONE_NGINX)
CONST_APP_ROUTING_NONE_NGINX,
CONST_NODE_PROVISIONING_MODE_MANUAL,
CONST_NODE_PROVISIONING_MODE_AUTO,
CONST_NODE_PROVISIONING_DEFAULT_POOLS_NONE,
CONST_NODE_PROVISIONING_DEFAULT_POOLS_AUTO)
from azure.cli.command_modules.acs.azurecontainerstorage._consts import (
CONST_ACSTOR_ALL,
CONST_DISK_TYPE_EPHEMERAL_VOLUME_ONLY,
Expand Down Expand Up @@ -192,6 +196,16 @@
CONST_NODE_OS_CHANNEL_SECURITY_PATCH,
]

node_provisioning_modes = [
CONST_NODE_PROVISIONING_MODE_MANUAL,
CONST_NODE_PROVISIONING_MODE_AUTO,
]

node_provisioning_default_pools = [
CONST_NODE_PROVISIONING_DEFAULT_POOLS_NONE,
CONST_NODE_PROVISIONING_DEFAULT_POOLS_AUTO,
]

dev_space_endpoint_types = ['Public', 'Private', 'None']

keyvault_network_access_types = [CONST_AZURE_KEYVAULT_NETWORK_ACCESS_PUBLIC, CONST_AZURE_KEYVAULT_NETWORK_ACCESS_PRIVATE]
Expand Down Expand Up @@ -434,6 +448,7 @@ def load_arguments(self, _):
c.argument('rotation_poll_interval')
c.argument('enable_sgxquotehelper', action='store_true')
c.argument('enable_app_routing', action="store_true")
c.argument('enable_ai_toolchain_operator', action='store_true')
c.argument(
"app_routing_default_nginx_controller",
arg_type=get_enum_type(app_routing_nginx_configs),
Expand Down Expand Up @@ -533,6 +548,28 @@ def load_arguments(self, _):
c.argument('disable_acns_security', action='store_true')
c.argument("if_match")
c.argument("if_none_match")
# node provisioning
c.argument(
"node_provisioning_mode",
arg_type=get_enum_type(node_provisioning_modes),
help=(
'Set the node provisioning mode of the cluster. Valid values are "Auto" and "Manual". '
'For more information on "Auto" mode see aka.ms/aks/nap.'
)
)
c.argument(
"node_provisioning_default_pools",
arg_type=get_enum_type(node_provisioning_default_pools),
help=(
'The set of default Karpenter NodePools configured for node provisioning. '
'Valid values are "Auto" and "None". Auto: A standard set of Karpenter NodePools are provisioned. '
'None: No Karpenter NodePools are provisioned. '
'WARNING: Changing this from Auto to None on an existing cluster will cause the default Karpenter '
'NodePools to be deleted, which will in turn drain and delete the nodes associated with those pools. '
'It is strongly recommended to not do this unless there are idle nodes ready to take the pods evicted '
'by that action.'
)
)

with self.argument_context('aks update') as c:
# managed cluster paramerters
Expand Down Expand Up @@ -633,6 +670,8 @@ def load_arguments(self, _):
# addons
c.argument('enable_secret_rotation', action='store_true')
c.argument('disable_secret_rotation', action='store_true', validator=validate_keyvault_secrets_provider_disable_and_enable_parameters)
c.argument('enable_ai_toolchain_operator', action='store_true')
c.argument('disable_ai_toolchain_operator', action='store_true')
c.argument('rotation_poll_interval')
c.argument('enable_static_egress_gateway', action='store_true')
c.argument('disable_static_egress_gateway', action='store_true')
Expand All @@ -649,6 +688,8 @@ def load_arguments(self, _):
c.argument('nodepool_labels', nargs='*', validator=validate_nodepool_labels,
help='space-separated labels: key[=value] [key[=value] ...]. See https://aka.ms/node-labels for syntax of labels.')
c.argument('nodepool_taints', validator=validate_nodepool_taints)
c.argument('migrate_vmas_to_vms', action='store_true')

# azure monitor profile
c.argument('enable_azure_monitor_metrics', action='store_true')
c.argument('azure_monitor_workspace_resource_id', validator=validate_azuremonitorworkspaceresourceid)
Expand Down Expand Up @@ -706,6 +747,30 @@ def load_arguments(self, _):
c.argument('disable_cost_analysis', action='store_true')
c.argument("if_match")
c.argument("if_none_match")
# node provisioning
c.argument(
"node_provisioning_mode",
is_preview=True,
arg_type=get_enum_type(node_provisioning_modes),
help=(
'Set the node provisioning mode of the cluster. Valid values are "Auto" and "Manual". '
'For more information on "Auto" mode see aka.ms/aks/nap.'
)
)
c.argument(
"node_provisioning_default_pools",
is_preview=True,
arg_type=get_enum_type(node_provisioning_default_pools),
help=(
'The set of default Karpenter NodePools configured for node provisioning. '
'Valid values are "Auto" and "None". Auto: A standard set of Karpenter NodePools are provisioned. '
'None: No Karpenter NodePools are provisioned. '
'WARNING: Changing this from Auto to None on an existing cluster will cause the default Karpenter '
'NodePools to be deleted, which will in turn drain and delete the nodes associated with those pools. '
'It is strongly recommended to not do this unless there are idle nodes ready to take the pods evicted '
'by that action.'
)
)
with self.argument_context('aks disable-addons', resource_type=ResourceType.MGMT_CONTAINERSERVICE, operation_group='managed_clusters') as c:
c.argument('addons', options_list=['--addons', '-a'])

Expand Down
12 changes: 11 additions & 1 deletion src/azure-cli/azure/cli/command_modules/acs/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ def aks_create(
enable_secret_rotation=False,
rotation_poll_interval=None,
enable_app_routing=False,
enable_ai_toolchain_operator=False,
app_routing_default_nginx_controller=None,
enable_static_egress_gateway=False,
# nodepool paramerters
Expand Down Expand Up @@ -673,6 +674,9 @@ def aks_create(
# apiserver vnet integration
enable_apiserver_vnet_integration=False,
apiserver_subnet_id=None,
# node provisioning
node_provisioning_mode=None,
node_provisioning_default_pools=None,
):
# DO NOT MOVE: get all the original parameters and save them as a dictionary
raw_parameters = locals()
Expand Down Expand Up @@ -803,6 +807,8 @@ def aks_update(
# addons
enable_secret_rotation=False,
disable_secret_rotation=False,
enable_ai_toolchain_operator=False,
disable_ai_toolchain_operator=False,
rotation_poll_interval=None,
enable_static_egress_gateway=False,
disable_static_egress_gateway=False,
Expand All @@ -814,6 +820,7 @@ def aks_update(
max_count=None,
nodepool_labels=None,
nodepool_taints=None,
migrate_vmas_to_vms=False,
# azure monitor profile
enable_azure_monitor_metrics=False,
azure_monitor_workspace_resource_id=None,
Expand Down Expand Up @@ -845,7 +852,10 @@ def aks_update(
enable_apiserver_vnet_integration=False,
apiserver_subnet_id=None,
enable_private_cluster=False,
disable_private_cluster=False
disable_private_cluster=False,
# node provisioning
node_provisioning_mode=None,
node_provisioning_default_pools=None,
):
# DO NOT MOVE: get all the original parameters and save them as a dictionary
raw_parameters = locals()
Expand Down
Loading