Skip to content

Client needs to be regenerated for Kubernetes 1.33 #4054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
patroldo opened this issue May 20, 2025 · 12 comments
Closed

Client needs to be regenerated for Kubernetes 1.33 #4054

patroldo opened this issue May 20, 2025 · 12 comments

Comments

@patroldo
Copy link

Describe the bug
In kubernetes 1.33 (probably if feature "emulation-version" was enabled), k8s-host/version returns additional fields which breaks JSON-parsing

Client Version
e.g. 23.0.0

Kubernetes Version
e.g. 1.33

Java Version
e.g. Java 17

To Reproduce
Try the following code with server k8s 1.33
"""
CoreV1Api coreV1Api = kubeClientBuilder.getCoreV1Api(kubeConfigFile.toString());

        String kubernetesVersion = new VersionApi(coreV1Api.getApiClient()).getCode().execute().getGitVersion();

"""

Expected behavior
To get version of kubernetes in format "1.33" or something similar

KubeConfig
If applicable, add a KubeConfig file with secrets redacted.

Server (please complete the following information):

  • OS: Linux
  • Environment container
  • Cloud - any platform

Additional context
It looks like in scope of this issue and commit provided below "/version" endpoint response has changed. Basically few additional fields were added:
kubernetes/kubernetes#129969
https://github.com/kubernetes/kubernetes/pull/130019/commits

Error:
An error occurred during validating cluster config: The field emulationMajor in the JSON string is not defined in the VersionInfo properties. JSON:
{"major":"1","minor":"33","emulationMajor":"1","emulationMinor":"33","minCompatibilityMajor":"1","minCompatibilityMinor":"32","gitVersion":"v1.33.0","gitCommit":"65f3ebc02e1db418b0375a4c71c315e12b637b5b","gitTreeState":"clean","buildDate":"2025-05-02T08:36:13Z","goVersion":"go1.24.2","compiler":"gc","platform":"linux/amd64"}

We understand that currently kubernetes java library doesn't support k8s 1.33. Couple of questions:

  1. Could you please help at which version the support of k8s 1.33 is planned
  2. To highlight issue we faced and see if the fix is going to be a part of next release
  3. Is it possible to provide patch-version of library for that specific issue?
@adilGhaffarDev
Copy link

@brendandburns kindly support regarding this issue.

@adilGhaffarDev
Copy link

/cc @yue9944882

@brendandburns
Copy link
Contributor

@adilGhaffarDev we haven't regenerated or released the client for Kubernetes 1.33 yet. If you need access to this right now you will need to use the GenericAPI.

We will regenerate and release the new client soon.

@brendandburns brendandburns changed the title emulation-version feature changing response of "k8s-host/version" which breaks coreV1Api.getApiClient() Client needs to be regenerated for Kubernetes 1.33 May 20, 2025
@yue9944882
Copy link
Member

yue9944882 commented May 20, 2025

https://github.com/kubernetes-client/java/actions/runs/15147500693/job/42586643919

The model regeneration workflow ^^^ was successfully despite that it failed at opening an automated PR at the end, i think it's due to github removed PR-related permissions from the default github token.. Anyway, it's able to push a new branch automated-generate-e5b5abc1 to the repo, so I'm going to manually open a PR from there.. Will also fix the permission issue as follow-up

@patroldo
Copy link
Author

patroldo commented May 21, 2025

Hi all

Thanks for comments and attention to the issue, appreciate it. I checked the branch from pull request and it fixing our issue from code perspective. Couple more questions

  1. @brendandburns - you said new release is soon. By soon you mean upcoming hours, days or weeks? So we can plan properly our activities
  2. If answer are weeks, can we expect a kind of patch version of library? I think it makes sense previous version of library make compatible with emulated version of kubernetes(so like k8s 1.33 which emulates API of k8s 1.32). What you think guys?

Asking in order to properly plan our activities

@brendandburns
Copy link
Contributor

@yue9944882 yeah, that's the way I've been doing it lately unfortunately, it seems like the only way to do it.

@patroldo it will probably be a week or so. We won't patch the library, we release new versions for each version of Kubernetes, we don't back-port newer API changes into older kubernetes versions.

@yue9944882
Copy link
Member

yue9944882 commented May 21, 2025

@adilGhaffarDev
Copy link

1.33 Model regeneration PR

Thank you @yue9944882 , now that the PR is merged, is it possible to do the release soon?

@yue9944882
Copy link
Member

The 24.0.0 and 24.0.0-legacy release is published on maven central, shall be available in ~24hrs.

@yue9944882
Copy link
Member

/close

The new release is out

@k8s-ci-robot
Copy link
Contributor

@yue9944882: Closing this issue.

In response to this:

/close

The new release is out

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@patroldo
Copy link
Author

Hi. Thank you so much guys. Appreciate your help

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

No branches or pull requests

5 participants