This repository was archived by the owner on Nov 12, 2026. It is now read-only.
Repository navigation
🐛 Handle Empty imageRegistry in Image Reference Construction - #126
Merged
Merged
Conversation
Signed-off-by: Jarek Cwiklik <[email protected]>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds conditional logic to handle image name formatting based on whether an image registry is specified. The change allows the Kubernetes deployer to support both external registry images (with full registry path) and local images (without registry prefix).
- Adds conditional check for
ImageRegistryfield to determine image name format - External registry images use the format
registry/image:tag - Local images use the simplified format
image:tag
Comments suppressed due to low confidence (1)
platform-operator/internal/deployer/kubernetes/kubernetes.go:1
- The
ImageRegistryfield is marked as+kubebuilder:validation:Requiredin the API schema (line 398 of component_types.go), but this change treats it as optional by checking if it's empty. This creates an inconsistency between the API validation and runtime behavior. Either remove theRequiredvalidation attribute to allow empty strings, or update the logic to handle the required field appropriately. Consider using theomitemptyJSON tag and removing theRequiredvalidation if the field should be optional.
/*
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Jarek Cwiklik <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Fixes the operator bug where empty
imageRegistryvalues cause invalid image references like/my_app:latest, preventing deployment of local container images.Problem
When deploying Components with local images (e.g., images loaded into kind), the operator always constructs image references using the pattern:
This creates invalid references like /my_app:latest when imageRegistry is empty, causing Kubernetes to reject the image with InvalidImageName errors.
Related issue(s)
Related to rossoctl/rossoctl#364
Fixes #125