Skip to content

Commit b672b7e

Browse files
committed
Merge branch 'dev' into lb-create-x-sub
2 parents 3ecd8a5 + c1c0cd9 commit b672b7e

File tree

543 files changed

+93357
-88324
lines changed

Some content is hidden

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

543 files changed

+93357
-88324
lines changed

build_scripts/windows/scripts/build.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if "%ARCH%"=="x86" (
2525
echo Please set ARCH to "x86" or "x64"
2626
goto ERROR
2727
)
28-
set PYTHON_VERSION=3.11.5
28+
set PYTHON_VERSION=3.11.7
2929

3030
set WIX_DOWNLOAD_URL="https://azurecliprod.blob.core.windows.net/msi/wix310-binaries-mirror.zip"
3131
set PYTHON_DOWNLOAD_URL="https://www.python.org/ftp/python/%PYTHON_VERSION%/python-%PYTHON_VERSION%-embed-%PYTHON_ARCH%.zip"

scripts/release/debian/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ set -exv
1515
ls -Rl /mnt/artifacts
1616

1717
WORKDIR=`cd $(dirname $0); cd ../../../; pwd`
18-
PYTHON_VERSION="3.11.5"
18+
PYTHON_VERSION="3.11.7"
1919
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
2020

2121
# Update APT packages
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
homebrew-pypi-poet~=0.10.0
2-
jinja2==3.0.3
2+
jinja2==3.1.3
33
requests>=2.20.0
44
applicationinsights >=0.11.1,<0.11.8

src/azure-cli-core/azure/cli/core/commands/arm.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,9 @@ def __call__(self, parser, namespace, value, option_string=None):
389389
cli_ctx.register_event(EVENT_INVOKER_PRE_LOAD_ARGUMENTS, add_subscription_parameter)
390390

391391

392-
add_usage = '--add property.listProperty <key=value, string or JSON string>'
393-
set_usage = '--set property1.property2=<value>'
394-
remove_usage = '--remove property.list <indexToRemove> OR --remove propertyToRemove'
392+
add_usage = '`--add property.listProperty <key=value, string or JSON string>`'
393+
set_usage = '`--set property1.property2=<value>`'
394+
remove_usage = '`--remove property.list <indexToRemove>` OR `--remove propertyToRemove`'
395395

396396

397397
def _get_operations_tmpl(cmd, custom_command=False):

src/azure-cli-core/azure/cli/core/profiles/_shared.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def default_api_version(self):
261261
ResourceType.MGMT_ARO: '2023-09-04',
262262
ResourceType.MGMT_DATABOXEDGE: '2021-02-01-preview',
263263
ResourceType.MGMT_CUSTOMLOCATION: '2021-03-15-preview',
264-
ResourceType.MGMT_CONTAINERSERVICE: SDKProfile('2023-10-01'),
264+
ResourceType.MGMT_CONTAINERSERVICE: SDKProfile('2023-11-01'),
265265
ResourceType.MGMT_APPCONTAINERS: '2022-10-01',
266266
},
267267
'2020-09-01-hybrid': {

src/azure-cli-core/azure/cli/core/tests/test_aaz_operation.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def test_aaz_generic_update_operation_with_error_response(self):
451451
}
452452
)
453453

454-
with self.assertRaisesRegex(InvalidArgumentValueError, "--set property1.property2=<value>"):
454+
with self.assertRaisesRegex(InvalidArgumentValueError, "`--set property1.property2=<value>`"):
455455
AAZGenericInstanceUpdateOperation(ctx)._update_instance_by_generic(
456456
instance,
457457
{
@@ -514,7 +514,7 @@ def test_aaz_generic_update_operation_with_error_response(self):
514514
}
515515
)
516516

517-
with self.assertRaisesRegex(InvalidArgumentValueError, "--remove property.list <indexToRemove> OR --remove propertyToRemove"):
517+
with self.assertRaisesRegex(InvalidArgumentValueError, "`--remove property.list <indexToRemove>` OR `--remove propertyToRemove`"):
518518
AAZGenericInstanceUpdateOperation(ctx)._update_instance_by_generic(
519519
instance,
520520
{

src/azure-cli-core/azure/cli/core/tests/test_generic_update.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def _execute_with_error(command, error, message):
272272
'index out of range in path')
273273

274274
_execute_with_error('genupdate --remove myList[0]',
275-
'invalid syntax: --remove property.list <indexToRemove> OR --remove propertyToRemove',
275+
'invalid syntax: `--remove property.list <indexToRemove>` OR `--remove propertyToRemove`',
276276
'remove requires index to be space-separated')
277277

278278
cli.invoke("genupdate --set myDict={'foo':'bar'}".split())
@@ -285,7 +285,7 @@ def _execute_with_error(command, error, message):
285285
'Cannot list index from a scalar value')
286286

287287
_execute_with_error('genupdate --add myDict la=da',
288-
"invalid syntax: --add property.listProperty <key=value, string or JSON string>",
288+
"invalid syntax: `--add property.listProperty <key=value, string or JSON string>`",
289289
'Add only works with lists')
290290

291291
# add an entry which makes 'myKey' no longer unique

src/azure-cli-core/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
'jmespath',
5454
'knack~=0.11.0',
5555
'msal-extensions~=1.0.0',
56-
'msal[broker]==1.24.0b2',
56+
'msal[broker]==1.26.0',
5757
'msrestazure~=0.6.4',
5858
'packaging>=20.9',
5959
'paramiko>=2.0.8,<4.0.0',

src/azure-cli/azure/cli/command_modules/acs/_consts.py

+9
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,15 @@
188188
CONST_AUTOUPGRADE_CONFIGURATION_NAME = "aksManagedAutoUpgradeSchedule"
189189
CONST_NODEOSUPGRADE_CONFIGURATION_NAME = "aksManagedNodeOSUpgradeSchedule"
190190

191+
# consts for azure service mesh
192+
CONST_AZURE_SERVICE_MESH_MODE_DISABLED = "Disabled"
193+
CONST_AZURE_SERVICE_MESH_MODE_ISTIO = "Istio"
194+
CONST_AZURE_SERVICE_MESH_INGRESS_MODE_EXTERNAL = "External"
195+
CONST_AZURE_SERVICE_MESH_INGRESS_MODE_INTERNAL = "Internal"
196+
CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_START = "Start"
197+
CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_COMPLETE = "Complete"
198+
CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_ROLLBACK = "Rollback"
199+
191200

192201
# consts for decorator pattern
193202
class DecoratorMode(Enum):

src/azure-cli/azure/cli/command_modules/acs/_format.py

+56
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,59 @@ def _func_set_preview(self, version): # pylint: disable=no-self-use
188188
return version
189189

190190
return CustomFunctions()
191+
192+
193+
def aks_mesh_revisions_table_format(result):
194+
"""Format a list of mesh revisions as summary results for display with "-o table". """
195+
revision_table = flatten_mesh_revision_table(result['meshRevisions'])
196+
parsed = compile_jmes("""[].{
197+
revision: revision,
198+
upgrades: upgrades || [`None available`] | sort_versions(@) | join(`, `, @),
199+
compatibleWith: compatibleWith_name,
200+
compatibleVersions: compatibleVersions || [`None available`] | sort_versions(@) | join(`, `, @)
201+
}""")
202+
# Use ordered dicts so headers are predictable
203+
results = parsed.search(revision_table, Options(
204+
dict_cls=OrderedDict, custom_functions=_custom_functions({})))
205+
206+
return results
207+
208+
209+
# Helper function used by aks_mesh_revisions_table_format
210+
def flatten_mesh_revision_table(revision_info):
211+
"""Flattens revision information"""
212+
flattened = []
213+
for revision_data in revision_info:
214+
flattened.extend(_format_mesh_revision_entry(revision_data))
215+
return flattened
216+
217+
218+
def aks_mesh_upgrades_table_format(result):
219+
"""Format a list of mesh upgrades as summary results for display with "-o table". """
220+
upgrades_table = _format_mesh_revision_entry(result)
221+
parsed = compile_jmes("""[].{
222+
revision: revision,
223+
upgrades: upgrades || [`None available`] | sort_versions(@) | join(`, `, @),
224+
compatibleWith: compatibleWith_name,
225+
compatibleVersions: compatibleVersions || [`None available`] | sort_versions(@) | join(`, `, @)
226+
}""")
227+
# Use ordered dicts so headers are predictable
228+
results = parsed.search(upgrades_table, Options(
229+
dict_cls=OrderedDict, custom_functions=_custom_functions({})))
230+
return results
231+
232+
233+
def _format_mesh_revision_entry(revision):
234+
flattened = []
235+
revision_entry = revision['revision']
236+
upgrades = revision['upgrades']
237+
compatible_with_list = revision['compatibleWith']
238+
for compatible_with in compatible_with_list:
239+
item = {
240+
'revision': revision_entry,
241+
'upgrades': upgrades,
242+
'compatibleWith_name': compatible_with['name'],
243+
'compatibleVersions': compatible_with['versions']
244+
}
245+
flattened.append(item)
246+
return flattened

src/azure-cli/azure/cli/command_modules/acs/_help.py

+143-1
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,9 @@
528528
- name: --crg-id
529529
type: string
530530
short-summary: The crg id used to associate the new cluster with the existed Capacity Reservation Group resource.
531+
- name: --enable-asm --enable-azure-service-mesh
532+
type: bool
533+
short-summary: Enable Azure Service Mesh addon.
531534
532535
examples:
533536
- name: Create a Kubernetes cluster with an existing SSH public key.
@@ -604,6 +607,8 @@
604607
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-vpa
605608
- name: create a kubernetes cluster with a Capacity Reservation Group(CRG) ID.
606609
text: az aks create -g MyResourceGroup -n MyMC --kubernetes-version 1.20.9 --node-vm-size VMSize --assign-identity "subscriptions/SubID/resourceGroups/RGName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID" --enable-managed-identity --crg-id "subscriptions/SubID/resourceGroups/RGName/providers/Microsoft.ContainerService/CapacityReservationGroups/MyCRGID"
610+
- name: Create a kubernetes cluster with Azure Service Mesh enabled.
611+
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-azure-service-mesh
607612
"""
608613

609614
helps['aks update'] = """
@@ -1827,6 +1832,17 @@
18271832
- name: --node-image-only
18281833
type: bool
18291834
short-summary: Only upgrade node image for agent pools.
1835+
- name: --enable-force-upgrade
1836+
type: bool
1837+
short-summary: Enable forceUpgrade cluster upgrade settings override.
1838+
- name: --disable-force-upgrade
1839+
type: bool
1840+
short-summary: Disable forceUpgrade cluster upgrade settings override.
1841+
- name: --upgrade-override-until
1842+
type: string
1843+
short-summary: Until when the cluster upgradeSettings overrides are effective.
1844+
long-summary: 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.
1845+
18301846
examples:
18311847
- name: Upgrade a managed Kubernetes cluster to a newer version. (autogenerated)
18321848
text: az aks upgrade --kubernetes-version 1.12.6 --name MyManagedCluster --resource-group MyResourceGroup
@@ -2072,7 +2088,7 @@
20722088
- name: --roles
20732089
type: string
20742090
short-summary: Specify the comma-separated roles.
2075-
- name: --source-resource-id -r
2091+
- name: --source-resource-id
20762092
type: string
20772093
short-summary: Specify the source resource id of the binding.
20782094
@@ -2101,3 +2117,129 @@
21012117
type: string
21022118
short-summary: Specify the role binding name.
21032119
"""
2120+
2121+
helps['aks mesh'] = """
2122+
type: group
2123+
short-summary: Commands to manage Azure Service Mesh.
2124+
long-summary: A group of commands to manage Azure Service Mesh in given cluster.
2125+
"""
2126+
2127+
helps['aks mesh enable'] = """
2128+
type: command
2129+
short-summary: Enable Azure Service Mesh.
2130+
long-summary: This command enables Azure Service Mesh in given cluster.
2131+
parameters:
2132+
- name: --revision
2133+
type: string
2134+
short-summary: Azure Service Mesh revision to install.
2135+
- name: --key-vault-id
2136+
type: string
2137+
short-summary: The Azure Keyvault id with plugin CA info.
2138+
- name: --ca-cert-object-name
2139+
type: string
2140+
short-summary: Intermediate cert object name in the Azure Keyvault.
2141+
- name: --ca-key-object-name
2142+
type: string
2143+
short-summary: Intermediate key object name in the Azure Keyvault.
2144+
- name: --cert-chain-object-name
2145+
type: string
2146+
short-summary: Cert chain object name in the Azure Keyvault.
2147+
- name: --root-cert-object-name
2148+
type: string
2149+
short-summary: Root cert object name in the Azure Keyvault.
2150+
examples:
2151+
- name: Enable Azure Service Mesh with selfsigned CA.
2152+
text: az aks mesh enable --resource-group MyResourceGroup --name MyManagedCluster
2153+
- name: Enable Azure Service Mesh with plugin CA.
2154+
text: az aks mesh enable --resource-group MyResourceGroup --name MyManagedCluster --key-vault-id /subscriptions/00000/resourceGroups/foo/providers/Microsoft.KeyVault/vaults/foo --ca-cert-object-name my-ca-cert --ca-key-object-name my-ca-key --cert-chain-object-name my-cert-chain --root-cert-object-name my-root-cert
2155+
"""
2156+
2157+
helps['aks mesh disable'] = """
2158+
type: command
2159+
short-summary: Disable Azure Service Mesh.
2160+
long-summary: This command disables Azure Service Mesh in given cluster.
2161+
"""
2162+
2163+
helps['aks mesh enable-ingress-gateway'] = """
2164+
type: command
2165+
short-summary: Enable an Azure Service Mesh ingress gateway.
2166+
long-summary: This command enables an Azure Service Mesh ingress gateway in given cluster.
2167+
parameters:
2168+
- name: --ingress-gateway-type
2169+
type: string
2170+
short-summary: Specify the type of ingress gateway.
2171+
long-summary: Allowed values are "External" which is backed by a load balancer with an external IP address; "Internal" which is backed by a load balancer with an internal IP address.
2172+
examples:
2173+
- name: Enable an internal ingress gateway.
2174+
text: az aks mesh enable-ingress-gateway --resource-group MyResourceGroup --name MyManagedCluster --ingress-gateway-type Internal
2175+
"""
2176+
2177+
helps['aks mesh disable-ingress-gateway'] = """
2178+
type: command
2179+
short-summary: Disable an Azure Service Mesh ingress gateway.
2180+
long-summary: This command disables an Azure Service Mesh ingress gateway in given cluster.
2181+
parameters:
2182+
- name: --ingress-gateway-type
2183+
type: string
2184+
short-summary: Specify the type of ingress gateway.
2185+
long-summary: Allowed values are "External" which is backed by a load balancer with an external IP address, "Internal" which is backed by a load balancer with an internal IP address.
2186+
examples:
2187+
- name: Disable an internal ingress gateway.
2188+
text: az aks mesh disable-ingress-gateway --resource-group MyResourceGroup --name MyManagedCluster --ingress-gateway-type Internal
2189+
"""
2190+
2191+
helps['aks mesh get-revisions'] = """
2192+
type: command
2193+
short-summary: Discover available Azure Service Mesh revisions and their compatibility.
2194+
long-summary: This command lists available Azure Service Mesh revisions and their compatibility information for the given location.
2195+
examples:
2196+
- name: Discover Azure Service Mesh revisions.
2197+
text: az aks mesh get-revisions --location westus2
2198+
crafted: true
2199+
"""
2200+
2201+
helps['aks mesh get-upgrades'] = """
2202+
type: command
2203+
short-summary: Discover available Azure Service Mesh upgrades.
2204+
long-summary: This command lists available Azure Service Mesh upgrades for the mesh revision installed on the cluster.
2205+
examples:
2206+
- name: Discover Azure Service Mesh upgrades.
2207+
text: az aks mesh get-upgrades --resource-group MyResourceGroup --name MyManagedCluster
2208+
"""
2209+
2210+
helps['aks mesh upgrade start'] = """
2211+
type: command
2212+
short-summary: Initiate Azure Service Mesh upgrade.
2213+
long-summary: This command initiates upgrade of Azure Service Mesh to the specified revision.
2214+
parameters:
2215+
- name: --revision
2216+
type: string
2217+
short-summary: Azure Service Mesh revision to upgrade to.
2218+
examples:
2219+
- name: Initiate Azure Service Mesh upgrade.
2220+
text: az aks mesh upgrade start --resource-group MyResourceGroup --name MyManagedCluster --revision asm-1-18
2221+
"""
2222+
2223+
helps['aks mesh upgrade'] = """
2224+
type: group
2225+
short-summary: Commands to manage the upgrades for Azure Service Mesh.
2226+
long-summary: A group of commands to manage the upgrades for Azure Service Mesh in given cluster.
2227+
"""
2228+
2229+
helps['aks mesh upgrade complete'] = """
2230+
type: command
2231+
short-summary: Complete Azure Service Mesh upgrade.
2232+
long-summary: This command completes Azure Service Mesh canary upgrade by removing the previous revision.
2233+
examples:
2234+
- name: Complete Azure Service Mesh upgrade.
2235+
text: az aks mesh upgrade complete --resource-group MyResourceGroup --name MyManagedCluster
2236+
"""
2237+
2238+
helps['aks mesh upgrade rollback'] = """
2239+
type: command
2240+
short-summary: Rollback Azure Service Mesh upgrade.
2241+
long-summary: This command rolls back Azure Service Mesh upgrade to the previous stable revision.
2242+
examples:
2243+
- name: Rollback Azure Service Mesh upgrade.
2244+
text: az aks mesh upgrade rollback --resource-group MyResourceGroup --name MyManagedCluster
2245+
"""

0 commit comments

Comments
 (0)