Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/aks-preview/azext_aks_preview/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -2604,7 +2604,7 @@
- name: Enable Azure Service Mesh with selfsigned CA.
text: az aks mesh enable --resource-group MyResourceGroup --name MyManagedCluster
- name: Enable Azure Service Mesh with plugin CA.
text: az aks mesh enable --resource-group MyResourceGroup --name MyManagedCluster --key-vault-id my-akv-id --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
text: az aks mesh enable --resource-group MyResourceGroup --name MyManagedCluster --key-vault-id /subscriptions/8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8/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

"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2162,6 +2162,12 @@ def update_azure_service_mesh_profile(self) -> ServiceMeshProfile:
if cert_chain_object_name is None:
raise InvalidArgumentValueError('--cert-chain-object-name is required to use Azure Service Mesh plugin CA feature.')

if key_vault_id is not None and (
not is_valid_resource_id(key_vault_id) or "providers/Microsoft.KeyVault/vaults" not in key_vault_id):
raise InvalidArgumentValueError(
key_vault_id + " is not a valid Azure Keyvault resource ID."
)

if enable_asm and all([key_vault_id, ca_cert_object_name, ca_key_object_name, root_cert_object_name, cert_chain_object_name]):
if new_profile.istio.certificate_authority is None:
new_profile.istio.certificate_authority = self.models.IstioCertificateAuthority()
Expand Down
Loading