Skip to content

chore: move controller main to cmd/controller#1962

Merged
oliverbaehler merged 1 commit into
projectcapsule:mainfrom
bakito:cmd-submodule
Jun 9, 2026
Merged

chore: move controller main to cmd/controller#1962
oliverbaehler merged 1 commit into
projectcapsule:mainfrom
bakito:cmd-submodule

Conversation

@bakito

@bakito bakito commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Moves the controller main.go into the module path cmd/controller.
This is in preparation for #1959 where an traditional cli binary is introduced.

Minor formatting issues are also addressed and a make task added to run roreleaser local. make test-release

Copilot AI review requested due to automatic review settings June 9, 2026 19:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR refactors build/version plumbing to use a dedicated internal version package and updates build tooling/config to build the controller binary from ./cmd/controller instead of ./cmd/.

Changes:

  • Switch version variable references to internal/version and update linker flags accordingly.
  • Update ko / GoReleaser / GH workflow build entrypoints to ./cmd/controller.
  • Add local Makefile targets for testing releases (goreleaser) and SBOM generation (syft).

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/utils/node_selector_test.go Adds a blank line after the license header for formatting consistency.
pkg/template/reference.go Adds a blank line after the license header for formatting consistency.
pkg/template/functions/uuid.go Adds a blank line after the license header for formatting consistency.
pkg/template/functions/funcmap.go Adds a blank line after the license header for formatting consistency.
pkg/template/functions/conversion.go Adds a blank line after the license header for formatting consistency.
pkg/template/functions/age.go Adds a blank line after the license header for formatting consistency.
pkg/runtime/admission/utils.go Adds a blank line after the license header for formatting consistency.
internal/webhook/customquota/utils.go Adds a blank line after the license header for formatting consistency.
internal/webhook/customquota/globalcustomquota_validating.go Adds a blank line after the license header for formatting consistency.
internal/webhook/customquota/customquota_validating.go Adds a blank line after the license header for formatting consistency.
internal/webhook/customquota/calculation.go Adds a blank line after the license header for formatting consistency.
internal/controllers/tenantowner/manager.go Adds a blank line after the license header for formatting consistency.
internal/controllers/tenantowner/enqueue.go Adds a blank line after the license header for formatting consistency.
e2e/tenantowner_status_test.go Adds a blank line after the license header for formatting consistency.
cmd/version.go Changes the package declaration (impacts how version vars are compiled/linked).
cmd/main.go Switches version printing to internal/version and removes redundant parentheses in route wiring.
Makefile Updates ldflags to internal/version, changes ko build path, and adds goreleaser/syft helper targets.
.ko.yaml Updates ko build entrypoint to ./cmd/controller.
.goreleaser.yml Updates GoReleaser build entrypoint and ldflags to internal/version.
.github/workflows/docker-publish.yml Updates workflow build entrypoint path to ./cmd/controller/.

Comment thread .goreleaser.yml
-X github.com/projectcapsule/capsule/internal/version.Version={{ .Tag }}
-X github.com/projectcapsule/capsule/internal/version.GitCommit={{ .Commit }}
-X github.com/projectcapsule/capsule/internal/version.GitTag={{ .Tag }}
-X github.com/projectcapsule/capsule/internal/version.GitDirty={{ .Date }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

true

Copilot AI review requested due to automatic review settings June 9, 2026 20:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 3 comments.

Comment thread pkg/runtime/handlers/handlers.go
Comment thread pkg/tenant/metdata.go
Comment thread pkg/tenant/metdata.go
Signed-off-by: bakito <github@bakito.ch>
@bakito bakito requested a review from Copilot June 9, 2026 20:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.

}

type HanderWithTenant interface {
type HandlerWithTenant interface {
@oliverbaehler oliverbaehler merged commit f4af5c8 into projectcapsule:main Jun 9, 2026
19 of 23 checks passed
@bakito bakito deleted the cmd-submodule branch June 9, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants