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

provider-http in Composition with function-go-templating does not work with secrets #75

Closed
briantopping opened this issue Dec 31, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@briantopping
Copy link

What happened?

#66 (comment) indicates to the reporter that they could try using function-go-templating.

provider-http provides a means to resolve the contents of secrets, delimiting the secret name as {{ name:namespace:key }}.

How can these be used together? The inclusion of this content causes the function-go-templating engine to fail while processing the interpolation key because of the double-squigglies.

This would be an excellent addition to the composition example.

What environment did it happen in?

Crossplane version: 1.17.1

@briantopping briantopping added the bug Something isn't working label Dec 31, 2024
@arielsepton
Copy link
Member

Hi @briantopping,

To resolve this error, you can escape the curly braces so that the Go function doesn’t try to process them as template syntax.

Here’s an example to escape the curly braces:

"Authorization": 'Bearer {{`{{`}} bearerToken:crossplane-system:http-provider {{`}}`}}'

Please give the escaping method a try and let me know if it resolves your issue. If you have any further questions or concerns, feel free to reach out.

@briantopping
Copy link
Author

Ah, very cool! I was looking around for that and didn't find it anywhere. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants