Skip to content

add rendering of ref.name#108

Open
gschei wants to merge 1 commit into
crossplane-contrib:mainfrom
gschei:main
Open

add rendering of ref.name#108
gschei wants to merge 1 commit into
crossplane-contrib:mainfrom
gschei:main

Conversation

@gschei

@gschei gschei commented Jul 15, 2026

Copy link
Copy Markdown

Description of your changes

The function-extra-resources misses an important feature: to dynamically select a specific secret which was created by a previous step of the composition pipeline. Example

  1. I create an S3 bucket, create credentials to access it and store the credentials in a Secret in Namespace "crossplane-system"
  2. I want to forward these credentials into a target cluster so they can access that bucket.

Therefore I need the ability to reference a secret by a custom name. Currently the name

ref:
  name: mysecret

must be hardcoded and cannot be set dynamically.

instead I would like to reference it like this:

ref:
  name: {{ .observed.composite.resource.spec.parameters.name }}-mysecret

So I can dynamically load exactly one secret.

I successfully tested the solution below.

Signed-off-by: Gilbert Scheiblhofer <gilbert.scheiblhofer@gmx.at>
@gschei
gschei requested review from phisco and reedjosh as code owners July 15, 2026 17:07
@gschei gschei changed the title add renderingn of ref.name add rendering of ref.name Jul 15, 2026
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.

1 participant