-
Notifications
You must be signed in to change notification settings - Fork 31
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
use kubebuilder go/v4 template #236
Conversation
fd52f7f
to
ebb3a6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- When I ran
go mod tidy
on my environment, go.mod and go.sum was changed. Could you check it? - Because you deleted
config/default/kustomization.yaml
, the release procedure should be changed. Now step 2 to 6 can be deleted.- It will be your help to compare it with the TopoLVM's release procedure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see separate commits for change set to migrate from kubebuilder go/v3 to go/v4 and those that are not. My understanding is as follows:
What are related:
PROJECT
file,- moving
main.go
tocmd/main.go
and related changes, - comment in
Dockerfile
, - part of changes in
Makefile
.
What are not related:
- golangci-lint related stuff,
- part of changes in
Dockerfile
, - CONTRIBUTING.md,
- moving
e2e
totest/e2e
, - removing
config
andhack
, - changes in
runners
,metrics
.
It seems that the change in the project layout might affect in our code not only main.go
, but also codes for the controller and the webhook. Shouldn't this be addressed?
change the layout to accommodate the community request to follow the Standard Go Project Layout by moving the api(s) under a new directory called api, controller(s) under a new directory called internal and the main.go under a new directory named cmd
9de57a6
to
160567a
Compare
- regenerate PROJECT file - move main.go to cmd dir - change codes due to controller-runtime versionup - add .golangci.yml file generated by kubebuilder command - apply simple changes to Dockerfile and Makefile Signed-off-by: Yuji Ito <[email protected]>
160567a
to
2e4b940
Compare
It was an incomplete work, so I updated it.
The change was added in the following commit. |
I reworked the split of the commits.
Since the official layout was defined differently from the Standard Go Project Layout, I wondered whether I should include it or not. However, the internal/ directory was the same for both, so I changed it. Since there was no specification for constants, I moved it to the top directory in the same as TopoLVM. |
`hack/boilerplate.go.txt` file is not generated when execute `kubebuilder init` command with `--license none` option to keep the head of each file. And since this project does not use custom resources, generate-api is not generated either. Therefore, the related codes are removed. Signed-off-by: Yuji Ito <[email protected]>
2e4b940
to
51db0f7
Compare
In go/v4 template, files related to test except unit test are generated in `test/` dir, so move e2e to the same dir. Signed-off-by: Yuji Ito <[email protected]>
Signed-off-by: Yuji Ito <[email protected]>
…aintained Signed-off-by: Yuji Ito <[email protected]>
…ands Signed-off-by: Yuji Ito <[email protected]>
Signed-off-by: Yuji Ito <[email protected]>
Since kubebuilder's layout is now Standard Go Project Layout, some modules have been re-located. Since there is no specification as to where the constants should be located, they were moved to the top directory, similar to TopoLVM. Signed-off-by: Yuji Ito <[email protected]>
51db0f7
to
a80ee88
Compare
I mistakenly upgraded to kubernetes v1.29 when applying kubebuilder go/v4, so I downgraded to v1.28. ref: #236 Signed-off-by: Yuji Ito <[email protected]>
I mistakenly upgraded to kubernetes v1.29 when applying kubebuilder go/v4, so I downgraded to v1.28. ref: topolvm#236 Signed-off-by: Yuji Ito <[email protected]> Signed-off-by: Vladislav Tropnikov <[email protected]>
parent b0b3861 author ESASHIKA Kaoru <[email protected]> 1706848848 +0900 committer Vladislav Tropnikov <[email protected]> 1707128256 +0100 gpgsig -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQmHpo/j4LoqRn/bA7vN/+knMKRrQUCZcC1wAAKCRDvN/+knMKR rc/9AQCKVgC1eny4vfTqlMXRsyVPLM9p0BZoBd7Ob+QrVgnYkwEA+yr0d4cE9ous Yq/DQbQkqsK4ck9gqfE/6foiHdG23QM= =1yTD -----END PGP SIGNATURE----- Merge pull request topolvm#239 from topolvm/bump-chart-0.10.2 Bump chart version to 0.10.2 Bump the github-actions-update group with 2 updates Bumps the github-actions-update group with 2 updates: [actions/setup-go](https://github.com/actions/setup-go) and [actions/stale](https://github.com/actions/stale). Updates `actions/setup-go` from 4 to 5 - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](actions/setup-go@v4...v5) Updates `actions/stale` from 8 to 9 - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](actions/stale@v8...v9) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-update - dependency-name: actions/stale dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-update ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Vladislav Tropnikov <[email protected]> start to migrate kubebuilder go/v3 to go/v4 - regenerate PROJECT file - move main.go to cmd dir - change codes due to controller-runtime versionup - add .golangci.yml file generated by kubebuilder command - apply simple changes to Dockerfile and Makefile Signed-off-by: Yuji Ito <[email protected]> Signed-off-by: Vladislav Tropnikov <[email protected]> remove unused boilerplate and target of Makefile `hack/boilerplate.go.txt` file is not generated when execute `kubebuilder init` command with `--license none` option to keep the head of each file. And since this project does not use custom resources, generate-api is not generated either. Therefore, the related codes are removed. Signed-off-by: Yuji Ito <[email protected]> Signed-off-by: Vladislav Tropnikov <[email protected]> move e2e dir to test/e2e In go/v4 template, files related to test except unit test are generated in `test/` dir, so move e2e to the same dir. Signed-off-by: Yuji Ito <[email protected]> Signed-off-by: Vladislav Tropnikov <[email protected]> aligned kubebuilder marker Signed-off-by: Yuji Ito <[email protected]> Signed-off-by: Vladislav Tropnikov <[email protected]> remove the manifests below config, since those are neither used nor maintained Signed-off-by: Yuji Ito <[email protected]> Signed-off-by: Vladislav Tropnikov <[email protected]> move some modules to internal dir Since kubebuilder's layout is now Standard Go Project Layout, some modules have been re-located. Since there is no specification as to where the constants should be located, they were moved to the top directory, similar to TopoLVM. Signed-off-by: Yuji Ito <[email protected]> Signed-off-by: Vladislav Tropnikov <[email protected]> Support Kubernetes v1.28 I mistakenly upgraded to kubernetes v1.29 when applying kubebuilder go/v4, so I downgraded to v1.28. ref: topolvm#236 Signed-off-by: Yuji Ito <[email protected]> Signed-off-by: Vladislav Tropnikov <[email protected]> Bump chart version to 0.10.2 Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Vladislav Tropnikov <[email protected]> add support for K8s metrics API as a source of PVC usage data Signed-off-by: Vladislav Tropnikov <[email protected]> Update makefile config Signed-off-by: Vladislav Tropnikov <[email protected]>
resolve: #213