Skip to content

[LIVY-1063] Fix resource leak in Kubernetes service account token refresh - #536

Open
nileshrathi345 wants to merge 1 commit into
apache:masterfrom
nileshrathi345:master_LIVY-1063
Open

[LIVY-1063] Fix resource leak in Kubernetes service account token refresh#536
nileshrathi345 wants to merge 1 commit into
apache:masterfrom
nileshrathi345:master_LIVY-1063

Conversation

@nileshrathi345

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Reuse the existing KubernetesClient during service account token refresh instead of
recreating DefaultKubernetesClient every 5 minutes without closing the old client.

JIRA: https://issues.apache.org/jira/browse/LIVY-1063

How was this patch tested?

  • Existing unit tests: mvn -pl server -am -DskipITs test
  • Manual review: refresh loop only calls config.setOauthToken(); no new client creation
  • Manual testing: deployed on Kubernetes with in-cluster SA auth;
    verified "Refreshed Kubernetes service account token." logs every ~5 minutes and
    native/HTTP client thread count remains stable over several refresh cycles

Was this patch authored or co-authored using generative AI tooling?

No

@nileshrathi345

Copy link
Copy Markdown
Contributor Author

@gyogal and @roczei could please take a look when possible and review.
thanks..!!!

@gyogal gyogal 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.

LGTM, thanks @nileshrathi345 !

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.

2 participants