Open
Description
Hello!
I'm trying to setup the ADOT for ECS using Fargate, following the link (https://aws-otel.github.io/docs/setup/ecs/cfn-for-ecs-fargate).
But when I create the container using CDK, while using the healthcheck from addContainer method, CDK always forces the use o CMD/CMD-SHELL in the command attribute, this way the healtcheck don't work as expected.
CDK
healthCheck: {
startPeriod: Duration.seconds(5),
command: ['/healthcheck'],
interval: Duration.seconds(5),
retries: 2,
timeout: Duration.seconds(3),
}
At the end, my task definition JSON is
"healthCheck": {
"command": [
"CMD",
"/healthcheck"
],
"interval": 5,
"timeout": 3,
"retries": 2,
"startPeriod": 5
},
This way, the healthcheck NEVER WORKS! And can't bypass this behavior in CDK.
If I remove the CMD manually in my task definition, it works as expected (with only the "/heathcheck").
I even thought it was a CDK problem but it was clarified that it wasn't, as follows: aws/aws-cdk#34389
Will be nice if the container works with CMD/CMD-SHELL.
Metadata
Metadata
Assignees
Labels
No labels