When running function-kcl v0.9.4 and using it in a composition as inline code, there comes a time where you can end up without space left on device. This happens because the function-kcl reaches this point in the code( which uses the krm-kcl lib) and this one eventually reaches to the line that creates the folder.
The issue is that these folders are not cleaned up ever, so they remain there forever til the pod eventually gets blocked repoducing issues like the following one in a CompositeResource:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning ComposeResources 72s (x1220837 over 2d22h) defined/compositeresourcedefinition.apiextensions.crossplane.io (combined from similar events): cannot compose resources: pipeline step "sqs-queue" returned a fatal result: failed to run kcl function pipelines: error creating temp directory: mkdir /tmp/sandbox2528510530: no space left on device
Is there a way to clean this up from within the function-kcl or this requires to adapt krm-kcl? Could it be that I'm doing something wrong? It seems the Function pod ends up being highly unstable and bringing issues in the mid-long term.
What happened?
When running function-kcl
v0.9.4
and using it in a composition as inline code, there comes a time where you can end up without space left on device. This happens because the function-kcl reaches this point in the code( which uses the krm-kcl lib) and this one eventually reaches to the line that creates the folder.The issue is that these folders are not cleaned up ever, so they remain there forever til the pod eventually gets blocked repoducing issues like the following one in a
CompositeResource
:Is there a way to clean this up from within the function-kcl or this requires to adapt krm-kcl? Could it be that I'm doing something wrong? It seems the Function pod ends up being highly unstable and bringing issues in the mid-long term.
How can we reproduce it?
What environment did it happen in?
Function version:
v0.9.4
Function image:kcl-arm64