aws-eks: max HelmChart Timeout exceeds Lambda Duration #22257
Labels
@aws-cdk/aws-eks
Related to Amazon Elastic Kubernetes Service
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
Describe the bug
The HelmChart construct allows a user to set a Timeout which is passed to the Helm command along with the
--wait
option so that Helm will wait for thetimeout
to elapse before marking the operation as failed. This timeout can be set to a maximum of 15 minutes, which is the same timeout which is given to the kubectl custom resource provider Lambda Function.However, there is initialization latency that results in the Lambda timeout (15m) expiring before the Helm operation reaches it's timeout (also 15m). This results in a severed cluster connection which in turn results in orphaned helm operations that become stuck in the
pending-upgrade
state. This is a tough state to resolve which typically requires a user to manually edit a Helm release secret or to rollback the release (see this issue in the Helm Repo for context).Expected Behavior
Expect timeouts to align in a cooperative manner such that the Lambda will not timeout before the HelmChart can return a response.
Current Behavior
Lambda will timeout first when HelmChart is given max timeout resulting in a severed connection and tainted helm installation.
Reproduction Steps
timeout
prop (Duration.minutes(15)
)Possible Solution
Limit the max timeout for the HelmChart custom resource to be 870s (14.5m) instead of 900s to allow for initialization etc.
https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/aws-eks/lib/helm-chart.ts#L114-L116
Additional Information/Context
No response
CDK CLI Version
2.39.1 (build f188fac)
Framework Version
2.28.1
Node.js Version
v16.14.0
OS
MacOS
Language
Typescript
Language Version
No response
Other information
Related to #22254
The text was updated successfully, but these errors were encountered: