• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubeflow / trainer / 32304804390
68%

Build:
DEFAULT BRANCH: master
Ran 19 Aug 2026 09:45PM UTC
Jobs 1
Files 43
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Aug 2026 09:37PM UTC coverage: 68.464% (-0.5%) from 68.982%
32304804390

push

github

web-flow
feat(controller): secure metrics endpoint with TLS and RBAC-based auth (#3912)

* fix(controller): wire webhook cert to metrics server to fix first-boot race

When secureServing is enabled, the manager's built-in metrics server was
being configured with TLS certificates at startup before the cert manager
goroutine had written them to disk. On the first boot this caused a TLS
handshake failure since the key/cert files didn't exist yet.

Fix the race by starting the metrics server inside setupManagerComponents,
after the certsReady channel fires. The manager's built-in metrics server
is always disabled (BindAddress="0") so it never races for the same port.
metricsserver.NewServer handles cert rotation internally, so no separate
certwatcher setup is needed.

Changes:
- pkg/metrics/setup.go: new SetupServer helper, always called from main
  regardless of SecureServing; uses tlsconfig.Apply for TLS options;
  metricsserver.NewServer handles cert rotation; returns nil when disabled
- pkg/config/config.go: always set BindAddress="0" to disable the
  manager's built-in metrics server; remove unused IsAuthenticatedMetricsEnabled
- cmd/trainer-controller-manager/main.go: always call metrics.SetupServer,
  remove SecureServing gate
- pkg/apis/config/v1alpha1/configuration_types.go: replace flat
  AuthenticatedMetrics *bool with Auth *MetricsAuthConfig nested struct
- pkg/apis/config/v1alpha1/defaults.go: initialise new Auth subobject
- pkg/apis/config/v1alpha1/zz_generated.deepcopy.go: regenerated
- pkg/config/config_test.go: update test fixtures for new Auth subobject
  and always-disabled built-in metrics server; fix stale comment
- Makefile: add ./pkg/metrics/... to controller-gen paths so RBAC markers
  in setup.go are picked up
- manifests/base/rbac/role.yaml: regenerated with tokenreviews and
  subjectaccessreviews rules
- go.mod/go.sum: bump k8s.io/streaming to v0.36.3 to match CI environment

Signed-off-by: Ugo Giordano <ugiordan@redhat.com>

* fix(metri... (continued)

4 of 33 new or added lines in 3 files covered. (12.12%)

2603 of 3802 relevant lines covered (68.46%)

0.8 hits per line

Uncovered Changes

Lines Coverage ∆ File
28
0.0
pkg/metrics/setup.go
1
28.85
-0.57% pkg/util/cert/cert.go
Jobs
ID Job ID Ran Files Coverage
1 32304804390.1 19 Aug 2026 09:45PM UTC 43
68.46
GitHub Action Run
Source Files on build 32304804390
  • Tree
  • List 43
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 322be905 on github
  • Prev Build on master (#32153247293)
  • Next Build on master (#32415808468)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc