-
Notifications
You must be signed in to change notification settings - Fork 1.5k
(helm/v1-alpha) Helm plugin scaffolding is missing control-plane label on metrics service #4591
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
Comments
The ServiceMonitor is also missing that label, but in this case it has no impact on functionality |
I just noticed the exact same issue. The ServiceMonitor uses In Kustomize the label |
/assign |
This issue is resolved @camilamacedo86 |
Hi @Kuzuri247 We need to merge the PR to do so, I need to ensure that the changes made sort out this issue. |
Yes I can help @camilamacedo86 |
@sarthaksarthak9 @Kuzuri247 @camilamacedo86 Thank you for the fix! |
What broke? What's expected?
Metrics do not work, when generating the helm chart with the kubebuilder helm plugin.
Relevant files:
values.yaml
cmd/main.go
Further details:
When not using the helm plugin, i.e. not generating the helm chart and just installing via the resources in the
config/
folder, the metrics work just fine. Though when generating the helm chart, and then installing the operator that way, the metrics do not show up in our prometheus.I believe this is because the helm plugin forgets the
control-plane: controller-manager
label on the metrics Service in the scaffolding here between lines 51 and 52:Because the Service does not have this label, the ServiceMonitor cannot find it and therefore cannot provide the metrics.
I believe the label is missing in that line (as opposed to the
chart.labels
list from the helm template), because the controller manager deployment also has the label in that position (line 71):manager.go
Reproducing this issue
No response
KubeBuilder (CLI) Version
Version: main.version{KubeBuilderVersion:"4.5.0", KubernetesVendor:"unknown", GitCommit:"7153119ca900994b70507edbde59771ac824f2d9", BuildDate:"2025-01-21T08:28:36Z", GoOs:"darwin", GoArch:"arm64"}
PROJECT version
3
Plugin versions
go.kubebuilder.io/v4
Other versions
Using
helm/v1-alpha
plugin to generate the helm chartExtra Labels
No response
The text was updated successfully, but these errors were encountered: