Skip to content

feat: Support placeholder substitution in container image - #538

Open
joeljeske wants to merge 1 commit into
score-spec:mainfrom
joeljeske:feat/image-ref
Open

feat: Support placeholder substitution in container image#538
joeljeske wants to merge 1 commit into
score-spec:mainfrom
joeljeske:feat/image-ref

Conversation

@joeljeske

@joeljeske joeljeske commented Jul 31, 2026

Copy link
Copy Markdown

Description

Placeholders already resolve in containers.*.variables, containers.*.files,
containers.*.volumes.source and resources.*.params, but
containers.*.image was passed through verbatim. This resolves the image with
the same substituter already used for variables, so it sees exactly the same
refs:

What does this PR do?

It makes the image field composable from resource outputs and workload
metadata, instead of requiring the caller to rewrite the score file or pass
--image. --image takes a single value per invocation, so it can't serve
multiple workloads generated together, and it only applies to image: ".".

The omission looks incidental rather than deliberate: the substitution
machinery is generic, resources are fully provisioned before conversion so
outputs are already available, and no test asserted that a placeholder in
image stays literal.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • New chore (expected functionality to be implemented)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've signed off with an email address that matches the commit author.

Related: score-spec/score-k8s#350

@mathieu-benoit

Copy link
Copy Markdown
Contributor

Thanks for your contribution, @joeljeske!

The DCO is failing, to fix it you can run this in your local branch:

git rebase HEAD~1 --signoff
git push --force-with-lease origin feat/image-ref

Signed-off-by: Joel Jeske <joeljeske14@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants