Skip to content

Reduce SSL setup overhead in async Kubernetes triggers - #73399

Open
xvega wants to merge 3 commits into
apache:mainfrom
xvega:fix-cncf-async-client-reuse
Open

xvega wants to merge 3 commits into
apache:mainfrom
xvega:fix-cncf-async-client-reuse

Conversation

@xvega

@xvega xvega commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

I extracted the cncf.kubernetes changes from #71349 so they can be reviewed and merged independently.

  • Reuse the API client, connection pool, and SSL context when the hook’s configuration is cached.
  • Preserve per-call clients for detected exec-based authentication.
  • Release cached clients during pod and job trigger cleanup, including early returns and errors.
  • Cover client reuse, close/reopen behavior, and cleanup paths.

Direct hook users must call await hook.close() when finished. Cached TLS material is retained until the client is recreated.


Was generative AI tooling used to co-author this PR?
  • No

@boring-cyborg boring-cyborg Bot added area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues labels Sep 20, 2026
@xvega
xvega force-pushed the fix-cncf-async-client-reuse branch from 55a76bf to e069fec Compare September 20, 2026 09:42
@xvega
xvega force-pushed the fix-cncf-async-client-reuse branch 2 times, most recently from 631c695 to 8de245a Compare September 21, 2026 15:51

@Miretpl Miretpl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that I approved this modification in the past, but after taking a bit more deeper look, I think that we have to do some modifications here to not make optimalization more important than operation stability.

@xvega
xvega force-pushed the fix-cncf-async-client-reuse branch from 8de245a to 71a1821 Compare September 22, 2026 13:13
@xvega
xvega force-pushed the fix-cncf-async-client-reuse branch from 71a1821 to d270ed2 Compare October 2, 2026 19:01
@xvega
xvega requested a review from Miretpl October 2, 2026 19:05
@xvega
xvega force-pushed the fix-cncf-async-client-reuse branch from 8988227 to 470d848 Compare October 4, 2026 18:51

This branch has not been deployed

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

Labels

area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants