fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Assigning a variable inside templating

Open shane-davidson opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] 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

shane-davidson avatar Aug 20 '24 22:08 shane-davidson

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.

bigkevmcd avatar Sep 04 '24 08:09 bigkevmcd

No further comments.

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

kkaempf avatar Feb 12 '25 14:02 kkaempf