Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parameter to set revision --revision for the Azure Service Mesh addon while creating AKS cluster. #7270

Merged
merged 12 commits into from
Feb 29, 2024
1 change: 1 addition & 0 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Pending
* Add `--ssh-access` to the `az aks nodepool add` command.
* Add `--ssh-access` to the `az aks nodepool update` command.
* Implicitly enable istio when ingress or egress gateway is enabled for Azure Service Mesh.
* Add parameter to set revision `--revision` for the Azure Service Mesh addon while creating AKS cluster.
deveshdama marked this conversation as resolved.
Show resolved Hide resolved
* Add `az aks nodepool delete-machines` command.

1.0.0b5
Expand Down
3 changes: 3 additions & 0 deletions src/aks-preview/azext_aks_preview/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,9 @@
- name: --enable-asm --enable-azure-service-mesh
type: bool
short-summary: Enable Azure Service Mesh.
- name: --revision
type: string
short-summary: Azure Service Mesh revision to install.
- name: --enable-azuremonitormetrics
type: bool
short-summary: Enable Azure Monitor Metrics Profile
Expand Down
1 change: 1 addition & 0 deletions src/aks-preview/azext_aks_preview/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,7 @@ def load_arguments(self, _):
action="store_true",
is_preview=True,
)
c.argument("revision", validator=validate_azure_service_mesh_revision)
c.argument("image_cleaner_interval_hours", type=int)
c.argument(
"cluster_snapshot_id",
Expand Down
1 change: 1 addition & 0 deletions src/aks-preview/azext_aks_preview/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ def aks_create(
guardrails_excluded_ns=None,
# azure service mesh
enable_azure_service_mesh=None,
revision=None,
# azure monitor profile
enable_azuremonitormetrics=False,
enable_azure_monitor_metrics=False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2068,10 +2068,16 @@ def get_initial_service_mesh_profile(self) -> ServiceMeshProfile:

# returns a service mesh profile only if '--enable-azure-service-mesh' is applied
enable_asm = self.raw_param.get("enable_azure_service_mesh", False)
revision = self.raw_param.get("revision", None)
revisions = None
if revision is not None:
revisions = [revision]
if enable_asm:
return self.models.ServiceMeshProfile( # pylint: disable=no-member
mode=CONST_AZURE_SERVICE_MESH_MODE_ISTIO,
istio=self.models.IstioServiceMesh(), # pylint: disable=no-member
istio=self.models.IstioServiceMesh(
revisions=revisions
), # pylint: disable=no-member
)

return None
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,46 +13,44 @@ interactions:
ParameterSetName:
- -l
User-Agent:
- AZURECLI/2.54.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10
(Linux-6.2.0-1016-azure-x86_64-with-glibc2.29)
- AZURECLI/2.57.0 azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1019-azure-x86_64-with-glibc2.29)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/meshRevisionProfiles?api-version=2024-01-02-preview
response:
body:
string: "{\n \"value\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/meshRevisionProfiles/istio\",\n
\ \"name\": \"istio\",\n \"type\": \"Microsoft.ContainerService/locations/meshRevisionProfiles\",\n
\ \"properties\": {\n \"meshRevisions\": [\n {\n \"revision\":
\"asm-1-17\",\n \"upgrades\": [\n \"asm-1-18\"\n ],\n \"compatibleWith\":
\"asm-1-18\",\n \"upgrades\": [\n \"asm-1-19\"\n ],\n \"compatibleWith\":
[\n {\n \"name\": \"kubernetes\",\n \"versions\": [\n
\ \"1.25.11\",\n \"1.25.15\",\n \"1.26.6\",\n \"1.26.10\",\n
\ \"1.27.3\",\n \"1.27.7\",\n \"1.28.0\",\n \"1.28.3\"\n
\ ]\n }\n ]\n },\n {\n \"revision\": \"asm-1-18\",\n
\ \"compatibleWith\": [\n {\n \"name\": \"kubernetes\",\n
\ \"versions\": [\n \"1.25.11\",\n \"1.25.15\",\n
\ \"1.26.6\",\n \"1.26.10\",\n \"1.27.3\",\n \"1.27.7\",\n
\ \"1.28.0\",\n \"1.28.3\"\n ]\n }\n ]\n
\ \"1.26.10\",\n \"1.26.12\",\n \"1.27.7\",\n \"1.27.9\",\n
\ \"1.28.3\",\n \"1.28.5\"\n ]\n }\n ]\n
\ },\n {\n \"revision\": \"asm-1-19\",\n \"compatibleWith\":
[\n {\n \"name\": \"kubernetes\",\n \"versions\": [\n
\ \"1.26.10\",\n \"1.26.12\",\n \"1.27.7\",\n \"1.27.9\",\n
\ \"1.28.3\",\n \"1.28.5\"\n ]\n }\n ]\n
\ }\n ]\n }\n }\n ]\n }"
headers:
cache-control:
- no-cache
content-length:
- '1040'
- '958'
content-type:
- application/json
date:
- Sat, 25 Nov 2023 12:31:30 GMT
- Tue, 27 Feb 2024 23:45:59 GMT
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding
x-cache:
- CONFIG_NOCACHE
x-content-type-options:
- nosniff
x-msedge-ref:
- 'Ref A: E490D4E66F3A4B3C8A90882B7B6A04D1 Ref B: MNZ221060608021 Ref C: 2024-02-27T23:46:00Z'
status:
code: 200
message: OK
Expand Down
Loading
Loading