feat: Apply Intermediate TLS defaults on API fallback and handle transient errors#6587
Open
ugiordan wants to merge 419 commits into
Open
feat: Apply Intermediate TLS defaults on API fallback and handle transient errors#6587ugiordan wants to merge 419 commits into
ugiordan wants to merge 419 commits into
Conversation
Signed-off-by: Srihari <svenkata@redhat.com>
Signed-off-by: Aniket Paluskar <apaluska@redhat.com> # Conflicts: # sdk/python/feast/offline_server.py
…ts-0702 Fix conflicts 0702
ugiordan
force-pushed
the
feat/tls-intermediate-fallback
branch
from
July 7, 2026 16:03
c9041d5 to
e3c4048
Compare
ugiordan
force-pushed
the
feat/tls-intermediate-fallback
branch
3 times, most recently
from
July 7, 2026 16:32
846c5a6 to
60296ac
Compare
ugiordan
force-pushed
the
feat/tls-intermediate-fallback
branch
2 times, most recently
from
July 9, 2026 08:38
1375b6f to
748ecc5
Compare
ntkathole
force-pushed
the
feat/tls-intermediate-fallback
branch
from
July 14, 2026 06:01
748ecc5 to
fe29daa
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6587 +/- ##
==========================================
- Coverage 46.02% 46.01% -0.02%
==========================================
Files 402 406 +4
Lines 47656 48175 +519
Branches 6741 6816 +75
==========================================
+ Hits 21936 22166 +230
- Misses 24196 24463 +267
- Partials 1524 1546 +22
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
…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>
When context.WithTimeout fires due to a slow API server, the resulting context.DeadlineExceeded error does not match any apierrors.Is* check and falls into the fatal default case with os.Exit(1), crashing the operator. Add it to the transient error branch so the operator gracefully falls back to Intermediate TLS defaults instead. 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
force-pushed
the
feat/tls-intermediate-fallback
branch
from
July 16, 2026 15:03
4591db8 to
da15060
Compare
StatusReasonServerTimeout is a distinct Kubernetes error from StatusReasonTimeout. Without handling it, a server-side API timeout during TLS profile fetch causes the operator to fail to start instead of falling back to Intermediate defaults. Signed-off-by: Ugo Giordano <ugiordan@redhat.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ugiordan
force-pushed
the
feat/tls-intermediate-fallback
branch
from
July 17, 2026 13:33
da15060 to
c7b9f67
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Follow-up to #6567. Fixes two issues in the TLS profile integration:
Else-only pattern:
NewTLSConfigFromProfilewas only called in the success branch of the TLS profile fetch. On any error path (non-OpenShift cluster, resource not found), no TLS config was applied, leaving the operator running with Go's bare defaults (noMinVersion, no cipher restrictions). This PR movesNewTLSConfigFromProfileoutside the if/else and explicitly falls back toconfigv1.TLSProfiles[TLSProfileIntermediateType]on all error paths.No transient error handling: The error switch only handled
IsNotFoundandIsNoMatchError. Transient API errors (ServiceUnavailable,Timeout,TooManyRequests) hit thedefaultcase and crashed the operator withos.Exit(1). This PR adds a dedicated case for these errors with a graceful Intermediate fallback.tlsProfileFetchedis set totrueso theSecurityProfileWatcherself-heals when the API recovers.Additionally:
context.Background()with no deadline).Which issue(s) this PR fixes:
Follow-up to #6567.
Checks
git commit -s)Testing Strategy
Misc
The operator Go module builds cleanly with
go build ./...frominfra/feast-operator/.