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

Assigning a variable inside templating #2758

Open
1 task done
shane-davidson opened this issue Aug 20, 2024 · 1 comment
Open
1 task done

Assigning a variable inside templating #2758

shane-davidson opened this issue Aug 20, 2024 · 1 comment
Labels

Comments

@shane-davidson
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Not sure if this is expected bahaviour on not but I have tried the following (inside the values block) of the fleet.yaml file:

${ $variable := "value" }

and then the following:
${ $variable }

expecting the template to render value but inside fleet does not show any errors.

The git repo (commit SHA) updates but the bundle (commit label) does not

Expected Behavior

No response

Steps To Reproduce

No response

Environment

Rancher v2.8.4

Logs

No response

Anything else?

No response

@bigkevmcd
Copy link
Contributor

Hi @shane-davidson Can you provide a small snippet of your .helm.values illustrating this?

I've tested it, and it seems to be working?

clusterName: '${ .ClusterLabels.name } ${- $variable := "value" }'
testVariable: "${ $variable }"

Gets rendered correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants