Wanted to test the new timeout parameter in the EKS Helm construct as I had problems deploying a large Helm chart like the prometheus-operator chart. But I just ran it and hit a problem: CDK translates the timeout to an integer value in seconds but the Helm version used (v3) expects a duration specification. So 900s instead of 900.
cluster.addChart('prometheus-operator', {
chart: 'prometheus-operator',
namespace: 'monitoring',
release: 'prometheus-operator',
repository: 'https://kubernetes-charts.storage.googleapis.com',
timeout: Duration.minutes(15),
wait: true
[ERROR] Exception: b'Error: invalid argument "900" for "--timeout" flag: time: missing unit in duration 900\n' Traceback (most recent call last): File "/var/task/index.py", line 16, in handler return helm_handler(event, context) File "/var/task/helm/__init__.py", line 49, in helm_handler helm('upgrade', release, chart, repository, values_file, namespace, version, wait, timeout) File "/var/task/helm/__init__.py", line 90, in helm raise Exception(output)
Not sure if this could be related to an upgrade @pahud is working on in aws-lambda-layer-kubectl?
This is :bug: Bug Report
cdk 1.46.0 has a pinned version of aws-lambda-layer-kubectl 2.0.0-beta2, which should be immutable.
https://github.com/aws/aws-cdk/blob/509133373679fe514be5b4ce8d58988e3eecdd90/packages/%40aws-cdk/aws-eks/lib/kubectl-provider.ts#L27
I haven't tried the helm timeout feature yet. Was it working and now it just failed?
No @pahud It was the first time I used it as well. Then it is not related to your last change. As for as I can find in the Helm documentation the --timeout switch from Integer to Duration with the launch of Helm V3, so I'm a bit surprised I'm running into this issue.
I believe we just supported Helm --timeout in https://github.com/aws/aws-cdk/pull/8338 by @eduardomourar
Hi @eduardomourar , any idea on this issue?
I believe it was my mistake, so I will gladly fix it.
@eduardomourar thanks! let me know if you need assistance.
Most helpful comment
I believe it was my mistake, so I will gladly fix it.