Skip to content

Conversation

@moko-poi
Copy link
Contributor

@moko-poi moko-poi commented Nov 21, 2025

#2419

Summary

This PR addresses non-breaking kube-api-linter issues identified in #2618 by adding appropriate kubebuilder markers to API field definitions.

Changes

Added kubebuilder markers:

  • List fields: Added +listType=atomic to Taints, StartupTaints, Requirements, and Budgets
  • List fields: Added +listType=set to Reasons (no duplicates allowed)
  • List fields: Added +listType=map with +listMapKey=type to Conditions (indexed by type)
  • Map fields: Added +mapType=atomic to Labels
  • Map fields: Added +mapType=granular to Annotations

Retained //nolint:kubeapilinter for:

  • Embedded fields (metav1.ObjectMeta, Status, etc.)
  • Pointer types (*NodeClassReference, *metav1.Duration, etc.)
  • Primitive fields in Status structs
  • Fields with design constraints requiring breaking changes

Testing

All changes are non-breaking and only add metadata markers that don't affect runtime behavior or API compatibility.

Related to #2618

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: moko-poi
Once this PR has been reviewed and has the lgtm label, please assign engedaam for approval. For more information see the Code Review Process.

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

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

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 21, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @moko-poi. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 21, 2025
@moko-poi moko-poi force-pushed the chore/fix-non-breaking-kube-api-linter-issues branch from 92f94f0 to a9109c3 Compare November 21, 2025 14:19
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 21, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 19573601249

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.01%) to 81.198%

Files with Coverage Reduction New Missed Lines %
pkg/controllers/disruption/drift.go 2 88.0%
Totals Coverage Status
Change from base Build 19556891395: -0.01%
Covered Lines: 11807
Relevant Lines: 14541

💛 - Coveralls

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants