Update generated client to Kubernetes v1.37 (SDK 21.0) - #1889
Conversation
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
|
51f50cc to
b67ce11
Compare
There was a problem hiding this comment.
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.revisionbeing 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.Revisionis along, but the null-coalescing fallback uses anintliteral (0). Consider using0Lfor 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.
| return new RolloutHistoryEntry | ||
| { | ||
| Revision = cr.Revision, | ||
| Revision = cr.Revision ?? 0, | ||
| ChangeCause = changeCause, | ||
| }; |
Tracks the upstream v1.37 API surface and bumps the SDK accordingly.
csharp.settingsnow targetsKUBERNETES_BRANCH=v1.37.0.swagger.jsonwas regenerated withkubernetes-client/genatd01fc8a15955e08c5102b7f9916a99b094ebd0e1.version.jsonis raised to21.0, and the compatibility table includes Kubernetes 1.37.ControllerRevision.revisionoptional, 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
genrevision: the injected API discovery models now includeGroupVersionKind, and the C# source generator completes successfully.Validation
dotnet build kubernetes-client.proj --configuration Release --no-restore --nologodotnet 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)