Skip to content

Update generated client to Kubernetes v1.37 (SDK 21.0) - #1889

Open
tg123 wants to merge 1 commit into
kubernetes-client:masterfrom
tg123:bolian/kubernetes-1-37-api
Open

Update generated client to Kubernetes v1.37 (SDK 21.0)#1889
tg123 wants to merge 1 commit into
kubernetes-client:masterfrom
tg123:bolian/kubernetes-1-37-api

Conversation

@tg123

@tg123 tg123 commented Sep 1, 2026

Copy link
Copy Markdown
Member

Tracks the upstream v1.37 API surface and bumps the SDK accordingly.

  • Generation inputs: csharp.settings now targets KUBERNETES_BRANCH=v1.37.0.
  • Generated artifacts: swagger.json was regenerated with kubernetes-client/gen at d01fc8a15955e08c5102b7f9916a99b094ebd0e1.
  • Versioning and docs: version.json is raised to 21.0, and the compatibility table includes Kubernetes 1.37.
  • Compatibility: Kubernetes 1.37 makes ControllerRevision.revision optional, so rollout history preserves the API's zero-value behavior when the field is absent.

The generator issue documented in #1733 is fixed in the current gen revision: the injected API discovery models now include GroupVersionKind, and the C# source generator completes successfully.

Validation

  • dotnet build kubernetes-client.proj --configuration Release --no-restore --nologo
  • dotnet test tests\KubernetesClient.Tests\KubernetesClient.Tests.csproj --configuration Release --no-build --no-restore --nologo (627 passed)
  • dotnet test tests\Kubectl.Tests\Kubectl.Tests.csproj --configuration Release --no-build --no-restore --nologo (102 Minikube tests skipped)

Copilot AI lite review requested due to automatic review settings September 1, 2026 18:23
@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tg123

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 1, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 1, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: tg123 / name: Boshi LIAN (b67ce11)

@kubernetes-prow kubernetes-prow Bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Sep 1, 2026
@tg123
tg123 force-pushed the bolian/kubernetes-1-37-api branch from 51f50cc to b67ce11 Compare September 1, 2026 18:25
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Sep 1, 2026

Copilot AI 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.

Pull request overview

Updates this repo’s generated Kubernetes client to align with the upstream Kubernetes v1.37 API surface and bumps the SDK versioning/docs to match.

Changes:

  • Bump SDK version to 21.0 and update the README compatibility table for Kubernetes 1.37.
  • Update generation inputs to target KUBERNETES_BRANCH=v1.37.0.
  • Adjust rollout history handling to tolerate ControllerRevision.revision being absent by defaulting it to zero.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
version.json Bumps SDK version to 21.0.
src/KubernetesClient.Kubectl/Beta/AsyncKubectl.Rollout.cs Defaults nullable ControllerRevision.Revision to zero for rollout history.
README.md Adds the 21.0 / 1.37 compatibility row.
csharp.settings Updates generator branch target to v1.37.0.
Suppressed comments (1)

src/KubernetesClient.Kubectl/Beta/AsyncKubectl.Rollout.cs:458

  • RolloutHistoryEntry.Revision is a long, but the null-coalescing fallback uses an int literal (0). Consider using 0L for consistency and to avoid implicit numeric conversion.
                return new RolloutHistoryEntry
                {
                    Revision = cr.Revision ?? 0,
                    ChangeCause = changeCause,
                };

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 425 to 429
return new RolloutHistoryEntry
{
Revision = cr.Revision,
Revision = cr.Revision ?? 0,
ChangeCause = changeCause,
};
Copilot AI review requested due to automatic review settings September 1, 2026 18:25

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants