Skip to content

feat(operator)!: Support dynamic product image selection#1199

Draft
Techassi wants to merge 2 commits intomainfrom
feat/operator-remove-hardcoded-registry
Draft

feat(operator)!: Support dynamic product image selection#1199
Techassi wants to merge 2 commits intomainfrom
feat/operator-remove-hardcoded-registry

Conversation

@Techassi
Copy link
Copy Markdown
Member

@Techassi Techassi commented Apr 21, 2026

Note

This PR requires a few decisions and needs to update documentation when merged. The current PR description will most likely change!

Overview of changes

Part of stackabletech/issues#716. This PR introduces the following changes:

  • Two new, non-optional CLI arguments (which can also be set via environment variable) to be able to set the image registry and repository:

    • --image-registry: Set the image registry which should be used by the operator to construct image names for provisioned containers, eg. oci.stackable.tech.
    • --image-repository: Set the image repository which should be used by the operator to construct image names for provisioned containers, eg. sdp/airflow-operator.
  • Adjustments to the product image selection to use dynamic registry and repository values instead of using hard-coded values.

  • Adjustments to the product image selection CRD interface to be more precise.

    Before:

    spec:
      # Setting those field will select the ProductImageSelection::StackableVersion variant
      image:
        productVersion: 3.3.1
        stackableVersion: 25.7.0 # Optional
        repo: example.org/myteam/stackable # Optional

    After:

    spec:
      # Setting those field will select the ProductImageSelection::StackableVersion variant
      image:
        productVersion: 3.3.1
        stackableVersion: 25.7.0 # Optional
        registry: example.org # Optional
        repository: myteam/stackable/product

Decisions

The following decisions need to be taken:

@Techassi Techassi self-assigned this Apr 21, 2026
@Techassi Techassi added release-note Denotes a PR that will be considered when it comes time to generate release notes. scheduled-for/26.7.0 labels Apr 21, 2026
@Techassi Techassi moved this to Development: In Progress in Stackable Engineering Apr 21, 2026
@Techassi Techassi marked this pull request as ready for review April 21, 2026 12:42
@Techassi Techassi moved this from Development: In Progress to Development: Waiting for Review in Stackable Engineering Apr 21, 2026
@NickLarsenNZ
Copy link
Copy Markdown
Member

NickLarsenNZ commented Apr 21, 2026

Just writing this out with some real examples:

spec:
  image:
    productVersion: 3.3.1
    stackableVersion: 25.7.0 # Optional
    # the registry just happens to be at the root `/`
    registry: oci.stackable.tech
    # the repository structure is all the same from here (once we make it that way)
    repository: sdp/product
    # Q: So how the does UIF or bundle builder gets it's location currently?
    # A: I think this actually comes from the operator since it is the same code
spec:
  image:
    productVersion: 3.3.1
    stackableVersion: 25.7.0 # Optional
    # This is a shared service, our registry (called a namespace) is under /stackable
    registry: quay.io/stackable
    # the repository structure is all the same from here (once we make it that way)
    repository: sdp/product # was just `product` in the flat mirrored structure
    # Q: So how will UIF or bundle builder gets it's sauce
    # A: I think this is the same image as the operator, so nothing related to the product

A simpler form (unless we have a reason to know about the registry itself would just be:

spec:
  image:
    productVersion: 3.3.1
    stackableVersion: 25.7.0 # Optional
    # the repository structure is all the same from here (once we make it that way)
    repository: oci.stackable.tech/sdp/product
spec:
  image:
    productVersion: 3.3.1
    stackableVersion: 25.7.0 # Optional
    # the repository structure is all the same from here (once we make it that way)
    repository: quay.io/stackable/sdp/product # was quay.io/stackable/product in the flat structure

Do we ever need to append anything to that, other than the product?

- BREAKING: The product image selection mechanism via `ProductImage::resolve` now takes three
parameters instead of two. The new parameters are: `image_registry`, `image_repository`, and
`operator_version`.
- BREAKING: The product image selection CRD interface splits up the `repo` key into `registry` and
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Asking the obvious question: How hard would it be to use CRD versioning for this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This depends on what the exact final CRD interface will look like. I will come back to this once the design is finalized.

@NickLarsenNZ
Copy link
Copy Markdown
Member

NickLarsenNZ commented Apr 21, 2026

Just another idea...

Currently we have:

spec:
  image:
    # this is needed regardless of variant
    productVersion: 3.3.1
    # ProductImageSelection::StackableVersion
    stackableVersion: 25.7.0
    repo: oci.stackable.tech/sdp # or quay.io/stackable/sdp - NO PRODUCT INFO HERE
    # ProductImageSelection::Custom
    custom: oci.stackable.tech/sdp/hadoop:3.3.1-stackable25.7.0 # or anything you want

What about we just get rid of the variants, and make it image:

If the operator requires this --image-repository=oci.stackable.tech/sdp... (whether one or two options... I prefer one), it can construct the rest of the image value.
And, it can still be overridden.

spec:
  # sucks that this is called image... maybe we should revise that since it would be a breaking change anyway.
  image:
    productVersion: 3.3.1
    # The stackableVersion field _could_ remain, but become optional if we want to allow that.
    stackableVersion: 25.7.0 # defaults to 26.3.0
    # Make image field optional (as it can still be constructed by the above information and constants in the operator).
    # image: oci.stackable.tech/sdp/hadoop:3.3.1-stackable25.7.0
    # The admin/user can still override the image:
    image: localboi/whatami

@Techassi Techassi marked this pull request as draft April 21, 2026 14:12
@Techassi Techassi moved this from Development: Waiting for Review to Development: In Progress in Stackable Engineering Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note Denotes a PR that will be considered when it comes time to generate release notes. scheduled-for/26.7.0

Projects

Status: Development: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants