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

Closed
1 task done
shane-davidson opened this issue Aug 20, 2024 · 2 comments
Closed
1 task done

Assigning a variable inside templating #2758

shane-davidson opened this issue Aug 20, 2024 · 2 comments
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.

@kkaempf
Copy link
Collaborator

kkaempf commented Feb 12, 2025

No further comments.

Please check with latest version and reopen if the problem still happens.

@kkaempf kkaempf closed this as completed Feb 12, 2025
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Fleet Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants