Closed merou closed 1 year ago
route to CXP team
Hello @merou
Can you confirm you were using a customer VNET in your test ?
The feature seems to be implemented since version 0.3.12, and merged in this PR: https://github.com/Azure/azure-cli-extensions/pull/5392
thanks
@merou why you have Tcp
with the capital T
?
From the docs should be tcp
https://learn.microsoft.com/en-us/azure/container-apps/ingress?tabs=bash#configuration
Having the wrong capitalization is a problem because exposed_port
is used only for transport == "tcp"
https://github.com/Azure/azure-cli-extensions/blob/de78ea0f46f1ef43e83ce571289d90db1acd18dc/src/containerapp/azext_containerapp/custom.py#L1844
@merou Apologies for the late reply. Thanks for reaching out to us and reporting this issue. Please let us know if you had a chance to look at the suggestions in the above comments.
@navba-MSFT
It is very confusing how in the command line the customer should use --transport tcp
but in the values returned by the API it is returned Tcp
.
What is the correct value to specify in the yaml file then ? tcp
or Tcp
?
@zioproto I just looked at the REST API Specs for the Ingress transport
property and it expects the enum value to be tcp.
Apologies I was away.
I also tried tcp
but I get the same result, it is a custom vnet.
Is it possible to have a validator before submitting to API, e.g:
$ az containerapp validate --yaml deployment.yml
@merou Thanks for your reply. Could you please run the same CLI command again with--debug
switch and share the detailed output here ? Awaiting your reply.
@navba-MSFT I cannot submit the whole debug - but I noticed exposedPort had a value of 0
in the API response.
In the yaml file I have:
exposedPort: 9115
I also tried to quote it - in your code format is int32 so it should work without.
"ingress":{"fqdn":"xxxxxxxxx.westeurope.azurecontainerapps.io",
"external":true,"targetPort":9115,"exposedPort":0,"transport":"Tcp","traffic":[{"weight":100,"latestRevision":true}],
"customDomains":null,"allowInsecure":false,"ipSecurityRestrictions":null,"corsPolicy":null,"clientCertificateMode":null}
,"registries":[{"server":"xxxxxx.azurecr.io","username":"nmbrs","passwordSecretRef":"xxxxxx","identity":""}],"dapr":null,"maxInactiveRevisions":null},
"template":{"revisionSuffix":"","containers":[{"image":"xxxxxxx/monitoring/blackbox-exporter:latest","name":"blackbox-exporter","resources":{"cpu":1.0,"memory":"2Gi","ephemeralStorage":"4Gi"}}],"initContainers":null,"scale":{"minReplicas":1,"maxReplicas":10,"rules":null},"volumes":null},
"eventStreamEndpoint":"https://westeurope.azurecontainerapps.dev/subscriptions/xxxxxxx/resourceGroups/rg-aca-dev/containerApps/blackbox-exporter/eventstream"},"identity":{"type":"None"}}
\ Running ..cli.azure.cli.core.util: Found subscription ID xxxxxxxxxx in the URL https://management.azure.com/subscriptions/xxxxxxxxxx/resourceGroups/rg-aca-dev/providers/Microsoft.App/containerApps/blackbox-exporter?api-version=2022-10-01
In the above comment in the yaml file you have Tcp
with the capital letter, correct ?
correct but also tried tcp
and same output
I also did the following test:
Exposed port
via Azure Portal$ az containerapp show -n blackbox-exporter -g rg-aca-dev -o yaml > deployment.yml
$ az containerapp update -n blackbox-exporter -g rg-aca-dev --yaml deployment.yml
Problem remains.
@merou I have discussed this issue internally with our Product owners. They have confirmed that the exposedPort
is not supported in Azure CLI and ContainerApp PS cmdlet. We will support it soon. Until then you could leverage the below workaround:
You can use the following CLI command as alternative solution:
• Fix Exposed port via Azure Portal • Export yaml current state:
$ az rest -u /subscriptions//resourceGroups/
• Revert change in Azure Portal • Push generated json:
$ az rest -u /subscriptions//resourceGroups/
@merou I hope you had a chance to look at my above comment. The above workaround should be followed until the support is provided for the exposedPort
property. If you need any further assistance on this issue in future, please feel free to reopen this thread. We would be happy to help.
How do we track when the feature is released ? Should we keep this GitHub issue open until the release ?
Apologizes @navba-MSFT I am not tracking those notifications via email - thank you for the workaround but for us, it is not that urgent ATM - I will wait for the fix
How do we track when the feature is released ? Should we keep this GitHub issue open until the release ?
@zioproto @merou I will update this thread once the fix is released.
Description
When enabling Tcp transport and exposedPort in yaml deployment file - exposedPort is ignored.
Command Name
az containerapp update Extension Name: containerapp. Version: 0.3.23.
Errors:
To Reproduce:
az containerapp update -n {} -g {} --yaml {}
Expected Behavior
exposedPort is set and visible in Azure Portal.
Environment Summary
Additional Context