-
Notifications
You must be signed in to change notification settings - Fork 54
OLS-3450: Add credentialHotReload flag to skip app-server restart on LLM secret rotation #1779
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
Open
lalan7
wants to merge
6
commits into
openshift:main
Choose a base branch
from
lalan7:feat/credential-hot-reload
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e575a33
OLS-3450: Add credentialHotReload flag to skip app-server restart on …
lalan7 5fe9618
OLS-3450: Rework hot-reload to annotation-based approach per review
lalan7 36f9d6a
Address code review: collect annotation removal errors, use constant,…
lalan7 c40bb3f
Update bundle CRD with credentialHotReload field
lalan7 5fc2b74
Make annotation errors non-blocking to prevent ConfigMap update starv…
lalan7 3310923
fix(e2e): clear dangling AdditionalCAConfigMapRef before hot-reload test
lalan7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Credential Hot-Reload (RFE-9380) | ||
|
|
||
| ## Overview | ||
|
|
||
| When `credentialHotReload` is enabled on the OLSConfig CR, the operator skips | ||
| rolling restarts of the app-server pod when LLM credential secret **data** | ||
| changes. The service re-reads credential files from disk on every LLM request, | ||
| so rotated tokens take effect without downtime. | ||
|
|
||
| This feature is a companion to | ||
| [lightspeed-service PR #2955](https://github.com/openshift/lightspeed-service/pull/2955), | ||
| which adds the in-process credential reload on the service side. | ||
|
|
||
| ## Configuration | ||
|
|
||
| ```yaml | ||
| apiVersion: ols.openshift.io/v1alpha1 | ||
| kind: OLSConfig | ||
| metadata: | ||
| name: cluster | ||
| spec: | ||
| ols: | ||
| credentialHotReload: true # default: false | ||
| ``` | ||
|
|
||
| ## Behavior | ||
|
|
||
| | Event | `credentialHotReload: false` (default) | `credentialHotReload: true` | | ||
| |---|---|---| | ||
| | LLM secret **data** rotated (same secret name) | Rolling restart | **No restart** — service picks up new credentials on next request | | ||
| | LLM secret **ref** changed in CR (different secret name) | Rolling restart | Rolling restart (deployment volume spec changes) | | ||
| | TLS / MCP / Postgres secret changed | Rolling restart | Rolling restart (unchanged) | | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - The lightspeed-service image must include the `get_credentials()` hot-reload | ||
| support (lightspeed-service >= the version containing PR #2955). If an older | ||
| service image is used with this flag enabled, rotated credentials will not be | ||
| picked up until the pod is manually restarted. | ||
|
|
||
| ## How It Works | ||
|
|
||
| 1. During reconciliation, the operator reads `spec.ols.credentialHotReload` from | ||
| the OLSConfig CR and stores it in the internal `WatcherConfig`, along with the | ||
| set of LLM provider secret names. | ||
|
|
||
| 2. When the secret watcher detects a `.data` change on an annotated secret, it | ||
| checks whether the secret is an LLM credential and the hot-reload flag is | ||
| enabled. If both conditions are true, the restart is skipped. | ||
|
|
||
| 3. Non-LLM secrets (TLS, MCP headers, Postgres) always trigger restarts | ||
| regardless of the flag. |
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
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
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
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
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.