Skip to content

feat(feast-operator): add metrics server certificate flags - #7243

Draft
antowaddle wants to merge 1 commit into
feast-dev:masterfrom
antowaddle:codex/metrics-cert-path
Draft

antowaddle wants to merge 1 commit into
feast-dev:masterfrom
antowaddle:codex/metrics-cert-path

Conversation

@antowaddle

Copy link
Copy Markdown

What this PR does / why we need it:

The operator metrics server serves HTTPS by default, but it always generates a
self-signed certificate: metricsserver.Options is built without CertDir, so
there is no way to point it at an externally managed serving certificate.

That is a problem for deployments that mount a certificate (for example,
OpenShift's service-ca or a cert-manager Secret) and run the manager with
readOnlyRootFilesystem: true, where generating a self-signed certificate under
/tmp is not a good option.

This adds three flags to the manager:

  • --metrics-cert-path: directory containing the metrics server certificate and key
  • --metrics-cert-name: certificate filename (default tls.crt)
  • --metrics-cert-key: key filename (default tls.key)

and wires them to metricsserver.Options.CertDir, CertName, and KeyName.

The defaults preserve current behavior: when --metrics-cert-path is empty,
controller-runtime continues to generate self-signed certificates. The flag
names match the Kubebuilder cert-manager scaffold and implement the existing
TODO in cmd/main.go. Controller-runtime's certificate watcher handles rotation
of a mounted Secret.

Which issue(s) this PR fixes:

No upstream issue. Downstream context: RHOAIENG-100779 and
opendatahub-io#312.

The midstream RHOAI overlay mounts a service-ca Secret at /etc/metrics-certs
and passes --metrics-cert-path=/etc/metrics-certs. The released
quay.io/feastdev/feast-operator image currently rejects the flag (flag provided but not defined: -metrics-cert-path), which forces a downstream image
pin. With this flag upstream, the overlay can use the release-managed upstream
image.

Checks

  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits
  • I've made sure the tests are passing.

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

Manual verification:

  • go build ./cmd
  • ./manager --help lists -metrics-cert-key, -metrics-cert-name, and
    -metrics-cert-path
  • Kind verification from the midstream PR: with a mounted Secret, the manager
    serves HTTPS metrics from /etc/metrics-certs,
    certwatcher_read_certificate_errors_total stays 0, and an unauthenticated
    request returns 401 over HTTPS.

Misc

This is a draft while I confirm the approach with the operator maintainers. The
full operator test suite is run by the operator-pr workflow.

Release note

Adds --metrics-cert-path, --metrics-cert-name, and --metrics-cert-key so
the operator metrics server can use a mounted serving certificate.

The operator metrics server is HTTPS by default but always generates a self-signed certificate. Deployments that mount an externally managed serving certificate have no way to point the server at it.

Add --metrics-cert-path, --metrics-cert-name, and --metrics-cert-key and wire them to metricsserver.Options.CertDir, CertName, and KeyName. The defaults preserve the current behavior: without a path, controller-runtime still generates self-signed certificates.

The flag names match the Kubebuilder cert-manager scaffold and implement the existing TODO in cmd/main.go.

Co-authored-by: Ugo Giordano <ugiordan@redhat.com>
Signed-off-by: Anthony Coughlin <acoughli@redhat.com>
antowaddle added a commit to antowaddle/feast-module-operator that referenced this pull request Nov 26, 2026
Harden the PR validation helpers: preserve raw Git paths, follow RESOLVE_IMAGE_REF for the expected image, require the exact upstream flag diagnostic, compare manifest subPaths and writability, preserve PipelineRun parameters, propagate chart-drift errors, scope local image tags per run, record registry ownership before start, and validate Kind node discovery and the builder Go pin.

Also point the RHOAI expected-failure gate at feast-dev/feast#7243, which supersedes opendatahub-io/feast#312.

This branch has not been deployed

No deployments
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.

1 participant