Open JosepSampe opened 1 year ago
@JosepSampe We are looking into it and get back to you for any additional information.
route to CXP team
@JosepSampe Do you happen to have the yaml file which you are using ?
Here you go
Note that some of the fields are filled in at runtime
Also note that now, as a workaroud, I simply removed these lines from my local installation and everything works fine https://github.com/Azure/azure-cli-extensions/blob/91447b8387457aa03052c37dd152412967fbe799/src/containerapp/azext_containerapp/custom.py#L294-L297
@JosepSampe I am able to reproduce this issue without ingress and checking internally with the team the rationale behind it.
I will update you as soon as I have an answer. Thanks.
I think this is resolved by #5969
I think this is resolved by #5969
To whom it may concern... I am still getting an error as of containerapp version 0.3.25 when trying to "disable" ingress via the YAML file.
Confirming I am on 0.3.25
I have tried setting the "ingress" block various ways in my YAML, but keep getting a similar error:
Bad Request({"type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","title":"One or more validation errors occurred.","status":400,"traceId":"00-801b153f799168f14863e8b9e12177ec-f08ea81a3ca3ebab-01","errors":{"$":["The JSON value could not be converted to System.Boolean. Path: $ | LineNumber: 0 | BytePositionInLine: 4."]}})
I have tried:
Leaving the "ingress" property off entirely (commented out)
and setting it like this
ingress:
external: false
Please let me know if I am missing something....
Any resolution? I can't set ingress via yaml
@maxiedaniels @SaurabhSharma-MSFT
The error suggest there should be a boolean. So I checked the booleans in the Ingress...
There is another boolean in ingress allowInsecure
and when you have corsPolicy
specified include the allowCredentials
boolean, when set it does work for me! Can you try this?
# az containerapp create -n alex-test -g rg-alex-apps --yaml "app.yaml"
# This works, with ingress specified!
name: alex-test
api-version: 2023-08-01-preview
properties:
environmentId: "/subscriptions/<subscription_id>/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/<name>"
configuration:
ingress:
external: true
allowInsecure: false # specify all booleans
targetPort: 80
# Same happens here, boolean(s) need to be specified when cors is included:
# corsPolicy:
# allowCredentials: true
# allowedOrigins:
# - https://a.test.com
template:
containers:
- image: nginx
name: nginx
that's crazy @abij . AllowInsecure unblocked me. How did you find this property ? It's not even listed in the documentation: https://learn.microsoft.com/en-us/azure/container-apps/azure-resource-manager-api-spec?tabs=yaml#examples
Eyh ACA Team, one year to fix this small bug :)
I checked the API specs: https://learn.microsoft.com/en-us/rest/api/containerapps/container-apps/create-or-update?view=rest-containerapps-2023-08-01-preview&tabs=HTTP.
Here I found the booleans 🕵️♂️.
got me today as well. needed to add these false
for
ingress:
allowInsecure: false
external: false
exposedPort: 12434
targetPort: 12434
transport: Tcp
Describe the bug
ingress
parameter underproperties
-configuration
is defaulted toNone
if not provided in the yaml file. This causes this expression to fail:https://github.com/Azure/azure-cli-extensions/blob/91447b8387457aa03052c37dd152412967fbe799/src/containerapp/azext_containerapp/custom.py#L294-L297
Command Name
az containerapp create Extension Name: containerapp. Version: 0.3.20.
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az containerapp create --name {} --resource-group {} --yaml {}
Expected Behavior
Environment Summary
Additional Context