Skip to content

feat: add TTL configuration for function response#171

Open
alperencelik wants to merge 2 commits intocrossplane-contrib:mainfrom
alperencelik:main
Open

feat: add TTL configuration for function response#171
alperencelik wants to merge 2 commits intocrossplane-contrib:mainfrom
alperencelik:main

Conversation

@alperencelik
Copy link

Description of your changes

This PR aims to make the TTL value of the function configurable via DeploymentRuntimeConfig.

Fixes #170

I have:

@alperencelik
Copy link
Author

alperencelik commented Jan 19, 2026

Also if you guys agree, once this merged I think we can backport it to the function-template-go

@Ata-NovacekJan
Copy link

Hi @alperencelik , may I ask what drove this change on your side?
We're facing performance issues after switching to realtime compositions and came to conclusion that the response's TTL is the root cause, so wondering if we are the only ones with such as problem. We ended up with fork + own implementation (as function arguments - so you can set the TTL in function call in composition pipeline).
It's quite a downer tbh as we were really looking forward to get better performance out of Crossplane v2, we basically got poll-based reconciliation with hardcoded 1 minute interval.

@alperencelik
Copy link
Author

Hi @alperencelik , may I ask what drove this change on your side? We're facing performance issues after switching to realtime compositions and came to conclusion that the response's TTL is the root cause, so wondering if we are the only ones with such as problem. We ended up with fork + own implementation (as function arguments - so you can set the TTL in function call in composition pipeline). It's quite a downer tbh as we were really looking forward to get better performance out of Crossplane v2, we basically got poll-based reconciliation with hardcoded 1 minute interval.

Hi @Ata-NovacekJan, I was observing that my function has been invoked quite frequently and am trying to understand the underlying reason behind it. The problem is that my current function is unfortunately too heavy to operate (even runFunction took ~30 s). I modified the TTL on my function response to the amount that I need, but since I do have a function pipeline in my composition, the last step of the pipeline (function-auto-ready) is always sending the TTL as 1 minute. It's causing my function to run unnecessarily and do the heavy work over and over again. I'm currently in a state where I don't have that many actors that can interfere with my resources, so I just would like to set the TTL for a reasonable time to reconcile after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make FunctionResponse.TTL configurable

3 participants