Skip to content
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

✨ Add kubebuilderVersion field to PROJECT file #4621

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vitorfloriano
Copy link
Contributor

@vitorfloriano vitorfloriano commented Mar 19, 2025

This PR adds a new field to the PROJECT file: kubebuilderVersion.

Additionally, it updates the documentation in the Project Configuration Reference to include the new kubebuilderVersion field.

It also updates the PROJECT file scaffolded in the docs and in testdata.

Closes: #4398

Test Steps:

  1. Build a snapshot release using GoReleaser:
~/kubebuilder$ goreleaser release --snapshot --skip=publish -f ./build/.goreleaser.yml
  1. Create a new test project directory:
mkdir -p ~/projects/test-project-file && cd ~/projects/test-project-file
  1. Initialize the test project using the Kubebuilder snapshot:
~/kubebuilder/dist/kubebuilder_linux_amd64_v1/kubebuilder init --domain example.com --repo github.com/test/example-operator
  1. Verify the generated PROJECT file:
$ cat PROJECT
# Code generated by tool. DO NOT EDIT.
# This file is used to track the info used to scaffold your project
# and allow the plugins properly work.
# More info: https://book.kubebuilder.io/reference/project-config.html
domain: example.com
kubebuilderVersion: 4.5.1-SNAPSHOT-07689e23e
layout:
- go.kubebuilder.io/v4
projectName: test-project-file
repo: github.com/test/example-operator
version: "3"

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vitorfloriano
Once this PR has been reviewed and has the lgtm label, please assign camilamacedo86 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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 19, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @vitorfloriano. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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.

Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Terrific 🎉 . Thank you a lot for your contribution 🥇

@@ -61,6 +61,7 @@ type Cfg struct {
Domain string `json:"domain,omitempty"`
Repository string `json:"repo,omitempty"`
Name string `json:"projectName,omitempty"`
KubebuilderVersion string `json:"kubebuilderVersion,omitempty"`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change this to CliVersion as well? (and keep the tag)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we said in the issue to be KubebuilderVersion, but because other projects can use it as a lib. I think a generic name might be better.

@vitorfloriano vitorfloriano force-pushed the feature/4398-add-kubebuilderVersion branch 2 times, most recently from 07689e2 to dff6ef1 Compare March 21, 2025 02:44
This commit adds a new field to the PROJECT file: kubebuilderVersion.

Additionally, it updates the documentation in the Project Configuration Reference
to include the new kubebuilderVersion field.

It also updates the PROJECT file scaffolded in the docs and in testdata.
@vitorfloriano vitorfloriano force-pushed the feature/4398-add-kubebuilderVersion branch from dff6ef1 to 6ab4d37 Compare March 21, 2025 02:46
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add kubebuilderVersion Field in PROJECT File for Tracking Kubebuilder CLI Version
5 participants