Skip to content

gomod: use top level go mod for controller/sidecar #49

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

Conversation

BlaineEXE
Copy link
Contributor

To help with dependency management, shift from using separate go mods for controller and sidecar, and instead use a top level go mod for these buildable components. client and proto still have separate go (sub)mods because they are pulled in by drivers or other operators, and keeping their dependency lists small is important.

This also allows us to deduplicate the vendor dir that was previously kept separately for both components.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 24, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BlaineEXE

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 24, 2025
@BlaineEXE BlaineEXE force-pushed the gomod-use-top-level-gomod-for-controller-and-sidecar branch from 6b8fefe to 5632027 Compare April 24, 2025 19:00
controller-gen.kubebuilder.io/version: v0.16.4
controller-gen.kubebuilder.io/version: v0.17.3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change isn't ideal, but it seems to be because of #39

Dependabot updated the lib, but it doesn't know how to run make generate, so this didn't appear until my PR here. We might want to follow up with dependabot config to handle controller-gen differently in the future

@BlaineEXE BlaineEXE requested a review from shanduur April 24, 2025 19:08
To help with dependency management, shift from using separate go mods
for controller and sidecar, and instead use a top level go mod for these
buildable components. client and proto still have separate go (sub)mods
because they are pulled in by drivers or other operators, and keeping
their dependency lists small is important.

This also allows us to deduplicate the vendor dir that was previously
kept separately for both components.

Signed-off-by: Blaine Gardner <[email protected]>
@BlaineEXE BlaineEXE force-pushed the gomod-use-top-level-gomod-for-controller-and-sidecar branch from 5632027 to 19e639b Compare April 24, 2025 19:11
@shanduur
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 24, 2025
@k8s-ci-robot k8s-ci-robot merged commit f73677d into kubernetes-sigs:main Apr 24, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

3 participants