Skip to content

Conversation

@derekhiggins
Copy link
Collaborator

@derekhiggins derekhiggins commented Oct 1, 2025

feat: ConfigMap image mapping overrides for LLS Distro

Implements a mechanism for the Llama Stack Operator to read and apply
LLS Distribution image updates from a ConfigMap, enabling independent patching
for security fixes or bug fixes without requiring a new LLS Operator.

- Add ImageMappingOverrides field to LlamaStackDistributionReconciler
- Implement parseImageMappingOverrides() to read image-overrides from ConfigMap
- Support symbolic name mapping (e.g., rh-dev) to specific images
- Included unit tests

The operator now reads image overrides from the 'image-overrides' key in the
operator ConfigMap, supporting YAML format with version-to-image mappings.
Overrides take precedence over default distribution images and are refreshed
on each reconciler initialization.

Closes: RHAIENG-1079
Signed-off-by: Derek Higgins <[email protected]>

Fix operator config ConfigMap watching

o Add operator config detection in configMapUpdatePredicate
o Update feature flags when operator config changes
o Trigger reconciliation of all LlamaStackDistributions on operator config change

Also

 fix: Replace deprecated corev1.Endpoints with discoveryv1.EndpointSlice 

Fix for deprecated Endpoints Generated by cursor but output tested here here , search for the string "Found 1 pods in namespace"

rhuss
rhuss previously requested changes Oct 8, 2025
Copy link
Collaborator

@rhuss rhuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, great stuff :). Here's my first round of review.

My main points are:

  • We must not reference RHODS in this upstream operator. Why and where do you need the RHODS version ? (i can't really see why this is needed). This is really important.
  • Probably not related to this PR, nevertheless: The enabling of network policies should not be a 'feature flag' (which is about enabling/disabling feature that has its own configuration), but a 'configuration option' (you can combine both, feature flag and configuration option but you should not 'misuse' a feature flag as configuration of a permanent feature)

@derekhiggins
Copy link
Collaborator Author

We must not reference RHODS in this upstream operator. Why and where do you need the RHODS version ? (i can't really see why this is needed). This is really important.

Lets deal with this first as the rest of the PR might change based on this, So the objective of this PR is to allow the operator to set a new image for a specific major/minor version. The code needs to know the RHODS version in order to know if a config map for rh-dev-2.25 is relevant i.e. to stop using it when we move onto rh-dev-2.26.

If ^ is correct then perhaps at least part of this PR should be mid/downstream ?

@rhuss
Copy link
Collaborator

rhuss commented Oct 9, 2025

I wonder why we need to add the version number at all to the key. Couldn't the operator just unconditionally pick up the image under the key rh-dev for the default image and the image just is either a 2.25 or 2.26 version ? Does the operator really need to know about this version or just deploy the configured image ?

@derekhiggins
Copy link
Collaborator Author

I wonder why we need to add the version number at all to the key. Couldn't the operator just unconditionally pick up the image under the key rh-dev for the default image and the image just is either a 2.25 or 2.26 version ? Does the operator really need to know about this version or just deploy the configured image ?

Because we've asserted "The major and minor versions of the LLS distribution and the LLS operator must match, but the z-stream version can differ.", if the minor version is upgrade (either manually or automatically) then the operator needs to know to stop using the image and instead switch over to the default for the new version.

If what we want is to unconditionally use a specific image, we already have distribution.image for that in the llsd resource

@derekhiggins
Copy link
Collaborator Author

derekhiggins commented Nov 10, 2025

Updated to remove the inclusion of the version number in the mapping key

@mergify
Copy link

mergify bot commented Nov 20, 2025

This pull request has merge conflicts that must be resolved before it can be merged. @derekhiggins please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@VaishnaviHire
Copy link
Collaborator

@mergify rebase

@mergify
Copy link

mergify bot commented Dec 1, 2025

rebase

✅ Branch has been successfully rebased

@VaishnaviHire
Copy link
Collaborator

@rhdedgar @rhuss Is this PR okay to merge?

@derekhiggins
Copy link
Collaborator Author

derekhiggins commented Dec 3, 2025

rebased to prompt CI into running (small change to the way the context is passed into ParseImageMappingOverrides to keep the linter happy)

@VaishnaviHire
Copy link
Collaborator

@mergify rebase

@mergify
Copy link

mergify bot commented Dec 9, 2025

rebase

✅ Branch has been successfully rebased

@VaishnaviHire
Copy link
Collaborator

@derekhiggins The image overrides tests continue to fail

@derekhiggins
Copy link
Collaborator Author

@derekhiggins The image overrides tests continue to fail

Thanks @VaishnaviHire I hadn't noticed the failure, I'll take a look

@derekhiggins
Copy link
Collaborator Author

@derekhiggins The image overrides tests continue to fail

Thanks @VaishnaviHire I hadn't noticed the failure, I'll take a look

Done,

@VaishnaviHire
Copy link
Collaborator

@mergify rebase

@mergify
Copy link

mergify bot commented Dec 10, 2025

rebase

✅ Branch has been successfully rebased

@nathan-weinberg
Copy link
Collaborator

@mergify rebase

@mergify
Copy link

mergify bot commented Dec 10, 2025

rebase

✅ Branch has been successfully rebased

@VaishnaviHire
Copy link
Collaborator

@mergify rebase

o Add operator config detection in configMapUpdatePredicate
o Update feature flags when operator config changes
o Trigger reconciliation of all LlamaStackDistributions on operator config change

Signed-off-by: Derek Higgins <[email protected]>
Implements a mechanism for the Llama Stack Operator to read and apply
LLS Distribution image updates from a ConfigMap, enabling independent patching
for security fixes or bug fixes without requiring a new LLS Operator.

- Add ImageMappingOverrides field to LlamaStackDistributionReconciler
- Implement parseImageMappingOverrides() to read image-overrides from ConfigMap
- Support symbolic name mapping (e.g., `starter`) to specific images
- Included unit tests

The operator now reads image overrides from the 'image-overrides' key in the
operator ConfigMap, supporting YAML format with version-to-image mappings.
Overrides take precedence over default distribution images and are refreshed
on each reconciler initialization.

Closes: RHAIENG-1079
Signed-off-by: Derek Higgins <[email protected]>
@mergify
Copy link

mergify bot commented Dec 10, 2025

rebase

✅ Branch has been successfully rebased

@derekhiggins derekhiggins dismissed rhuss’s stale review December 11, 2025 09:08

Dismissing Russ review, as it was based on an older version
After it was made requirements were discuses and the PR adjusted appropriately.
He isn't available at the moment to Ack the PR and we'd like to merge it this week.

@derekhiggins derekhiggins merged commit 0e459af into llamastack:main Dec 11, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants