Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support writing to Context #66

Closed
phisco opened this issue Jan 31, 2024 · 3 comments · Fixed by #128
Closed

Support writing to Context #66

phisco opened this issue Jan 31, 2024 · 3 comments · Fixed by #128
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@phisco
Copy link
Collaborator

phisco commented Jan 31, 2024

What problem are you facing?

Currently this function allows reading from the Context:

{{- $environmentConfig := index .context "apiextensions.crossplane.io/environment" }}

But one can not write to the context.

How could this Function help solve your problem?

Adding a Context resource similar to what already done with CompositeConnectionDetails, could be an option.

apiVersion: meta.gotemplating.fn.crossplane.io/v1alpha1
kind: Context
data:
  apiextensions.crossplane.io/environment: ....
  another.key: ...

TBD how to handle it w.r.t. the input Context, we could replace it altogether, but merging could be a little bit hard with this function, probably it's the best thing to do though.

@phisco phisco added the enhancement New feature or request label Jan 31, 2024
@ma-ble
Copy link

ma-ble commented Jan 31, 2024

Thank you for opening the enhancement.

@stevendborrelli
Copy link
Contributor

I can take a look at implementing this.

@phisco
Copy link
Collaborator Author

phisco commented Oct 3, 2024

Awesome @stevendborrelli! Let me know if you want to discuss options w.r.t. merging 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants