Skip to content

[improve][build] Upgrade kubernetes client-java to 26.0.0#25856

Merged
lhotari merged 1 commit into
apache:masterfrom
lhotari:lh-improve-upgrade-k8s-client-26
May 22, 2026
Merged

[improve][build] Upgrade kubernetes client-java to 26.0.0#25856
lhotari merged 1 commit into
apache:masterfrom
lhotari:lh-improve-upgrade-k8s-client-26

Conversation

@lhotari
Copy link
Copy Markdown
Member

@lhotari lhotari commented May 22, 2026

Motivation

Previously it wasn't possible to upgrade beyond 23.0.0 due to the bug that is fixed by OpenAPITools/openapi-generator#22498 . The 26.0.0 client-java release uses 7.18.0 openapi-generator and the stubs were generated in PR kubernetes-client/java#4535.

The io.kubernetes:client-java 26.0.0 release adds software.amazon.awssdk:sts as a direct dependency to support EKS IAM authentication (IRSA). That single dependency transitively pulls in ~28 AWS SDK v2 jars (about 8 MB) plus software.amazon.eventstream:eventstream.

Pulsar uses the kubernetes client only for in-cluster API access (functions runtime, OIDC auth, secrets, integration tests) and does not need the AWS authentication path. Bundling the AWS SDK jars in the binary distribution would be pure dead weight.

Modifications

  • Bumped kubernetesclient from 23.0.0 to 26.0.0 in gradle/libs.versions.toml.
  • Added exclude(group = "software.amazon.awssdk") to every consumer of libs.kubernetes.client.java (and libs.kubernetes.client.java.api.fluent):
    • pulsar-broker-auth-oidc/build.gradle.kts
    • pulsar-functions/runtime/build.gradle.kts
    • pulsar-functions/secrets/build.gradle.kts
    • tests/integration/build.gradle.kts
  • Updated the three io.kubernetes-client-java* jar version entries in distribution/server/src/assemble/LICENSE.bin.txt from 23.0.0 to 26.0.0. No AWS SDK LICENSE entries were added because the jars are no longer bundled.

The commit also pulls along a few unrelated in-flight changes in tests/integration (joda-time test dep, TestNG suite handling that defers to --tests CLI filter, and small fixes in AbstractPulsarStandaloneK8STest) that were already staged on this branch.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests:

  • ./gradlew checkBinaryLicense passes (verifies no missing LICENSE/NOTICE entries against the produced apache-pulsar-*-bin.tar.gz, confirming the AWS SDK is no longer bundled).
  • ./gradlew spotlessCheck checkstyleMain checkstyleTest passes on the modified modules.

Does this pull request potentially affect one of the following parts:

  • Dependencies (add or upgrade a dependency)

The io.kubernetes:client-java runtime dependency moves from 23.0.0 to 26.0.0. Transitive software.amazon.awssdk:* and software.amazon.eventstream:eventstream (newly introduced by 26.0.0) are excluded everywhere client-java is consumed, so the binary distribution gains only the kubernetes-client version bump.

… AWS SDK transitives

The kubernetes client-java 26.0.0 release adds software.amazon.awssdk:sts
for EKS IAM authentication, which transitively pulls in ~28 AWS SDK v2 jars.
Pulsar does not use the AWS auth path, so exclude software.amazon.awssdk from
every consumer of libs.kubernetes.client.java to keep the binary distribution
free of these dependencies. Only the kubernetes-client-java version entries
in LICENSE.bin.txt are updated; no AWS SDK LICENSE entries are needed since
the jars are no longer bundled.

Verified with ./gradlew checkBinaryLicense.
@lhotari lhotari changed the title [improve][build] Upgrade kubernetes client-java to 26.0.0 and exclude AWS SDK transitives [improve][build] Upgrade kubernetes client-java to 26.0.0 May 22, 2026
Copy link
Copy Markdown
Member

@dao-jun dao-jun left a comment

Choose a reason for hiding this comment

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

LGTM

@dao-jun dao-jun added dependencies Pull requests that update a dependency file ready-to-test labels May 22, 2026
@lhotari lhotari merged commit c26d612 into apache:master May 22, 2026
80 of 83 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants