Skip to content

feat: Add kube-api-linter and fix ProwJob API type annotations#750

Open
dongjiang1989 wants to merge 4 commits into
kubernetes-sigs:mainfrom
iflytek:add-kube-api
Open

feat: Add kube-api-linter and fix ProwJob API type annotations#750
dongjiang1989 wants to merge 4 commits into
kubernetes-sigs:mainfrom
iflytek:add-kube-api

Conversation

@dongjiang1989

Copy link
Copy Markdown
Member

Summary

  • Integrate kube-api-linter (KAL) into the CI pipeline to enforce Kubernetes API conventions on ProwJob CRD types
  • Fix pkg/apis/prowjobs/v1/types.go to comply with KAL rules:
    • commentstart: Lowercase the first word of field comments to match JSON tag names (e.g. // Type is...// type is...)
    • optionalorrequired: Add // +optional / // +required markers to all struct fields, replacing +kubebuilder:validation:Required where applicable
  • Add hack/tools/.golangci-kal.yml KAL configuration with enabled rules: commentstart, conflictingmarkers, duplicatemarkers, nofloats, optionalorrequired, uniquemarkers, nophase,
    nonullable
  • Add make lint-api target and integrate KAL into make verify pipeline
  • Regenerate CRD YAML and config documentation to reflect updated field descriptions
  • Add hack/tools/tmp/ and _bin/ to make clean for proper build artifact cleanup

Files changed (13 files, +766 / -389)

Area Files
KAL infrastructure hack/tools/.custom-gcl.yaml, .golangci-kal.yml, build-kal, go.mod, go.sum, tools.go
CI integration Makefile (lint-api target, clean), hack/make-rules/verify/all.sh, kube-api-lint.sh
API types pkg/apis/prowjobs/v1/types.go
Generated code prowjob_customresourcedefinition.yaml, prow-config-documented.yaml, plugin-config-documented.yaml

Signed-off-by: dongjiang <dongjiang1989@126.com>
@netlify

netlify Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploy Preview for k8s-prow ready!

Name Link
🔨 Latest commit bec45be
🔍 Latest deploy log https://app.netlify.com/projects/k8s-prow/deploys/6a30d02401de6b0008a2dc78
😎 Deploy Preview https://deploy-preview-750--k8s-prow.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added the area/plugins Issues or PRs related to prow's plugins for the hook component label Jun 11, 2026
@k8s-ci-robot k8s-ci-robot requested a review from cjwagner June 11, 2026 13:12
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot added 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. labels Jun 11, 2026
@dongjiang1989

Copy link
Copy Markdown
Member Author

/test pull-prow-verify-lint

Signed-off-by: dongjiang <dongjiang1989@126.com>
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 15, 2026
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 16, 2026
Signed-off-by: dongjiang <dongjiang1989@126.com>
@k8s-ci-robot k8s-ci-robot added area/deck Issues or PRs related to prow's deck component area/spyglass Issues or PRs related to prow's spyglass UI area/tide Issues or PRs related to prow's tide component labels Jun 16, 2026
@dongjiang1989

Copy link
Copy Markdown
Member Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/deck Issues or PRs related to prow's deck component area/plugins Issues or PRs related to prow's plugins for the hook component area/spyglass Issues or PRs related to prow's spyglass UI area/tide Issues or PRs related to prow's tide component cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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