-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Kubebuilder scaffolding with HTTPS endpoint for metrics endpoint with custom certs doesn't work #4533
Comments
Workaround/fix for now (until this is fixed) :
The resultant ServiceMonitor file will look like this:
|
To do this change we need change the template here: Lines 45 to 65 in d908e83
Then, run Would you like to push a PR with this fix? Again, thank you a lot for raising this one. 🥇 |
Hi @camilamacedo86 , yes will raise a PR in some time. |
For some reason, the tests were not executed, and the change was merged without properly passing them. Unfortunately, we need to revert the change as it does not work well and is breaking the test data: link to PR. |
It was my mistake—I overlooked it during the review. Also, we were unlucky because, for some reason, the tests were skipped when they shouldn't have been, and the issue wasn't caught. I've now added your changes and credited you for the fix here: https://github.com/kubernetes-sigs/kubebuilder/pull/4558/files. The missing pieces were: Fixing the uncommented lines in the GitHub Action that runs the E2E tests for the samples. |
What broke? What's expected?
Broken:
Metrics server with HTTPS and cert-manager certs doesn't work
config/prometheus/monitor_tls_patch.yaml
path completely overwrites the ServiceMonitorendpoints
field, resulting in omission of existing fields likepath
,scheme
etcPFA screenshot for the same:
Expected:
config/prometheus/monitor_tls_patch.yaml
patch should only update thetlsConfig
field with the required certs, leaving all existing fields intact.Reproducing this issue
No response
KubeBuilder (CLI) Version
4.4.0
PROJECT version
3
Plugin versions
go.kubebuilder.io/v4
Other versions
No response
Extra Labels
No response
The text was updated successfully, but these errors were encountered: