Skip to content

feat: Integrate cluster TLS profile with graceful fallback#6567

Merged
ntkathole merged 1 commit into
feast-dev:masterfrom
ugiordan:tls-profile-upstream
Jun 29, 2026
Merged

feat: Integrate cluster TLS profile with graceful fallback#6567
ntkathole merged 1 commit into
feast-dev:masterfrom
ugiordan:tls-profile-upstream

Conversation

@ugiordan

@ugiordan ugiordan commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Integrate the feast-operator with the cluster-wide TLS security profile from apiservers.config.openshift.io/cluster, with graceful fallback for non-OpenShift clusters.

On OpenShift clusters, the operator reads the admin-configured TLS profile (MinVersion, CipherSuites) and applies it to webhook and metrics servers. On vanilla Kubernetes (EKS, GKE, AKS), it falls back to hardened Intermediate defaults (TLS 1.2, ECDHE AEAD ciphers).

Also removes the enableHTTP2 flag since CVE-2023-44487 (HTTP/2 Rapid Reset) is fixed in Go 1.21.3+ and feast uses Go 1.25+.

Changes

  • cmd/main.go: Fetch TLS profile at startup, apply to webhook and metrics servers, register SecurityProfileWatcher for profile changes, always enable HTTP/2 with NextProtos
  • config/rbac/role.yaml: Add RBAC for config.openshift.io/apiservers get/list/watch
  • go.mod/go.sum: Add controller-runtime-common dependency
  • internal/controller/featurestore_controller.go: Remove enableHTTP2 conditional, always set NextProtos

Non-OpenShift behavior

Graceful fallback via IsNoMatchError/IsNotFound handling. No behavior change for vanilla Kubernetes deployments. No new hard dependencies on OpenShift APIs.

Test plan

  • Build passes
  • Existing tests pass

Read the cluster TLS profile from apiservers.config.openshift.io/cluster
at startup. Apply MinVersion, CipherSuites, and NextProtos to webhook
and metrics server TLS configs. Fail closed on unexpected errors.
Use Intermediate defaults on non-OpenShift clusters.

This ensures the feast-operator honors the cluster-wide TLS security
profile, which is required for OCP 5.0. The implementation gracefully
falls back to hardened defaults (TLS 1.2, ECDHE ciphers) on
non-OpenShift clusters, so it does not break vanilla Kubernetes
deployments.

Signed-off-by: Ugo Giordano <ugiordan@redhat.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ugo Giordano <ugiordan@redhat.com>
@ugiordan
ugiordan requested a review from a team as a code owner June 29, 2026 14:35
@ntkathole ntkathole changed the title feat(operator): integrate cluster TLS profile for OCP 5.0 compliance feat: Integrate cluster TLS profile for OCP 5.0 compliance Jun 29, 2026
@ugiordan ugiordan changed the title feat: Integrate cluster TLS profile for OCP 5.0 compliance feat(operator): integrate cluster TLS profile with graceful fallback Jun 29, 2026
@ntkathole ntkathole changed the title feat(operator): integrate cluster TLS profile with graceful fallback feat: Integrate cluster TLS profile with graceful fallback Jun 29, 2026
@ntkathole
ntkathole merged commit 43263a6 into feast-dev:master Jun 29, 2026
38 of 40 checks passed
ugiordan added a commit to ugiordan/feast that referenced this pull request Jul 7, 2026
…sient errors

Follow-up to feast-dev#6567. Two fixes:

1. Move NewTLSConfigFromProfile outside the if/else so it runs on all
   code paths. Previously, error paths skipped TLS configuration entirely,
   leaving the operator running with Go's bare defaults (no MinVersion,
   no cipher restrictions). Now all error paths explicitly fall back to
   the Intermediate TLS profile.

2. Handle transient API errors (ServiceUnavailable, Timeout,
   TooManyRequests) gracefully instead of crashing with os.Exit(1).
   These set tlsProfileFetched=true so the SecurityProfileWatcher
   self-heals when the API recovers.

Also adds a 10-second context timeout on bootstrap API calls and applies
the same transient error handling to the TLS adherence policy fetch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ugo Giordano <ugiordan@redhat.com>
ugiordan added a commit to ugiordan/feast that referenced this pull request Jul 7, 2026
…sient errors

Follow-up to feast-dev#6567. Two fixes:

1. Move NewTLSConfigFromProfile outside the if/else so it runs on all
   code paths. Previously, error paths skipped TLS configuration entirely,
   leaving the operator running with Go's bare defaults (no MinVersion,
   no cipher restrictions). Now all error paths explicitly fall back to
   the Intermediate TLS profile.

2. Handle transient API errors (ServiceUnavailable, Timeout,
   TooManyRequests) gracefully instead of crashing with os.Exit(1).
   These set tlsProfileFetched=true so the SecurityProfileWatcher
   self-heals when the API recovers.

Also adds a 10-second context timeout on bootstrap API calls and applies
the same transient error handling to the TLS adherence policy fetch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ugo Giordano <ugiordan@redhat.com>
ugiordan added a commit to ugiordan/feast that referenced this pull request Jul 7, 2026
…sient errors

Follow-up to feast-dev#6567. Two fixes:

1. Move NewTLSConfigFromProfile outside the if/else so it runs on all
   code paths. Previously, error paths skipped TLS configuration entirely,
   leaving the operator running with Go's bare defaults (no MinVersion,
   no cipher restrictions). Now all error paths explicitly fall back to
   the Intermediate TLS profile.

2. Handle transient API errors (ServiceUnavailable, Timeout,
   TooManyRequests) gracefully instead of crashing with os.Exit(1).
   These set tlsProfileFetched=true so the SecurityProfileWatcher
   self-heals when the API recovers.

Also adds a 10-second context timeout on bootstrap API calls and applies
the same transient error handling to the TLS adherence policy fetch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ugo Giordano <ugiordan@redhat.com>
ugiordan added a commit to ugiordan/feast that referenced this pull request Jul 7, 2026
…sient errors

Follow-up to feast-dev#6567. Two fixes:

1. Move NewTLSConfigFromProfile outside the if/else so it runs on all
   code paths. Previously, error paths skipped TLS configuration entirely,
   leaving the operator running with Go's bare defaults (no MinVersion,
   no cipher restrictions). Now all error paths explicitly fall back to
   the Intermediate TLS profile.

2. Handle transient API errors (ServiceUnavailable, Timeout,
   TooManyRequests) gracefully instead of crashing with os.Exit(1).
   These set tlsProfileFetched=true so the SecurityProfileWatcher
   self-heals when the API recovers.

Also adds a 10-second context timeout on bootstrap API calls and applies
the same transient error handling to the TLS adherence policy fetch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ugo Giordano <ugiordan@redhat.com>
ugiordan added a commit to ugiordan/feast that referenced this pull request Jul 8, 2026
…sient errors

Follow-up to feast-dev#6567. Two fixes:

1. Move NewTLSConfigFromProfile outside the if/else so it runs on all
   code paths. Previously, error paths skipped TLS configuration entirely,
   leaving the operator running with Go's bare defaults (no MinVersion,
   no cipher restrictions). Now all error paths explicitly fall back to
   the Intermediate TLS profile.

2. Handle transient API errors (ServiceUnavailable, Timeout,
   TooManyRequests) gracefully instead of crashing with os.Exit(1).
   These set tlsProfileFetched=true so the SecurityProfileWatcher
   self-heals when the API recovers.

Also adds a 10-second context timeout on bootstrap API calls and applies
the same transient error handling to the TLS adherence policy fetch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ugo Giordano <ugiordan@redhat.com>
ugiordan added a commit to ugiordan/feast that referenced this pull request Jul 9, 2026
…sient errors

Follow-up to feast-dev#6567. Two fixes:

1. Move NewTLSConfigFromProfile outside the if/else so it runs on all
   code paths. Previously, error paths skipped TLS configuration entirely,
   leaving the operator running with Go's bare defaults (no MinVersion,
   no cipher restrictions). Now all error paths explicitly fall back to
   the Intermediate TLS profile.

2. Handle transient API errors (ServiceUnavailable, Timeout,
   TooManyRequests) gracefully instead of crashing with os.Exit(1).
   These set tlsProfileFetched=true so the SecurityProfileWatcher
   self-heals when the API recovers.

Also adds a 10-second context timeout on bootstrap API calls and applies
the same transient error handling to the TLS adherence policy fetch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ugo Giordano <ugiordan@redhat.com>
ntkathole pushed a commit to ugiordan/feast that referenced this pull request Jul 14, 2026
…sient errors

Follow-up to feast-dev#6567. Two fixes:

1. Move NewTLSConfigFromProfile outside the if/else so it runs on all
   code paths. Previously, error paths skipped TLS configuration entirely,
   leaving the operator running with Go's bare defaults (no MinVersion,
   no cipher restrictions). Now all error paths explicitly fall back to
   the Intermediate TLS profile.

2. Handle transient API errors (ServiceUnavailable, Timeout,
   TooManyRequests) gracefully instead of crashing with os.Exit(1).
   These set tlsProfileFetched=true so the SecurityProfileWatcher
   self-heals when the API recovers.

Also adds a 10-second context timeout on bootstrap API calls and applies
the same transient error handling to the TLS adherence policy fetch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ugo Giordano <ugiordan@redhat.com>
ugiordan added a commit to ugiordan/feast that referenced this pull request Jul 16, 2026
…sient errors

Follow-up to feast-dev#6567. Two fixes:

1. Move NewTLSConfigFromProfile outside the if/else so it runs on all
   code paths. Previously, error paths skipped TLS configuration entirely,
   leaving the operator running with Go's bare defaults (no MinVersion,
   no cipher restrictions). Now all error paths explicitly fall back to
   the Intermediate TLS profile.

2. Handle transient API errors (ServiceUnavailable, Timeout,
   TooManyRequests) gracefully instead of crashing with os.Exit(1).
   These set tlsProfileFetched=true so the SecurityProfileWatcher
   self-heals when the API recovers.

Also adds a 10-second context timeout on bootstrap API calls and applies
the same transient error handling to the TLS adherence policy fetch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ugo Giordano <ugiordan@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants