Skip to content

Use YEAR in hack/boilerplate.go.txt as a literal for the current year#272

Draft
felix-kaestner wants to merge 1 commit intomainfrom
license-header
Draft

Use YEAR in hack/boilerplate.go.txt as a literal for the current year#272
felix-kaestner wants to merge 1 commit intomainfrom
license-header

Conversation

@felix-kaestner
Copy link
Copy Markdown
Contributor

The YEAR string in the boilerplate header file will be replaced by controller-gen1 and kubebuilder2.

This change also requires to define a YEAR variable in the Makefile (holding the current year) which is passed as year=$(YEAR) to the controller-gen crd generation. The applyconfiguration generator of controller-gen handles this substitution automatically by using kubernetes/gengo3 and does not need the explicit parameter.

Requires: sapcc/go-makefile-maker#477.

Footnotes

  1. https://github.com/kubernetes-sigs/controller-tools/commit/54a2e9f1ac63927545179bb8cd82aff15540a418

  2. https://github.com/kubernetes-sigs/kubebuilder/commit/890b11808e0d932de4dcc92a742e5b7f0c532298

  3. https://github.com/kubernetes/gengo/blob/5ee0d033ba5bcb073f0e69c32057520b82d75ccb/v2/execute.go#L59

@felix-kaestner felix-kaestner requested a review from a team as a code owner March 31, 2026 10:44
The YEAR string in the boilerplate header file will be replaced by
controller-gen[^1] and kubebuilder[^2].

This change also requires to define a YEAR variable in the Makefile
(holding the current year) which is passed as year=$(YEAR) to the
controller-gen crd generation. The applyconfiguration generator of
controller-gen handles this substitution automatically by using
kubernetes/gengo[^3] and does not need the explicit parameter.

[^1]: kubernetes-sigs/controller-tools@54a2e9f
[^2]: kubernetes-sigs/kubebuilder@890b118
[^3]: https://github.com/kubernetes/gengo/blob/5ee0d033ba5bcb073f0e69c32057520b82d75ccb/v2/execute.go#L59
@felix-kaestner felix-kaestner marked this pull request as draft March 31, 2026 10:45
@github-actions
Copy link
Copy Markdown

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/api/cisco/nx/v1alpha1 0.00% (ø)
github.com/ironcore-dev/network-operator/api/core/v1alpha1 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/api/cisco/nx/v1alpha1/zz_generated.deepcopy.go 0.00% (ø) 0 0 0
github.com/ironcore-dev/network-operator/api/core/v1alpha1/zz_generated.deepcopy.go 0.00% (ø) 0 0 0

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Apr 1, 2026
@hardikdr hardikdr added this to Roadmap Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/switch-automation Automation processes for network switch management and operations.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants