Hi all, I'm new to Fleet so I'll start this with the usual: "not sure if this is a bug or by design" disclaimer. I've got a GitRepo defined with multiple paths, each of which points to a directory in the repo that contains a Chart.yaml and the usual helm artifacts. (templates folder, values.yaml, and values subfolder with specific values files within it) I also created a fleet.yaml file in each of the chart directories which is mostly empty except for a valuesFiles block like this:
In my case, I'm using fleet local (single cluster), so I don't have any targets defined so that explains why it's not getting read there at line 48. But the earlier call at line 41 requires a non-empty string chart to be defined. If I change that to just a dot like this:
chart: "."then everything works. By I don't understand why this check in the code exists... Because my GitRepo already has a path defined to the directory where the Chart.yaml lives, I shouldn't need to specify this right - my fleet.yaml is already in this path.
It's an easy workaround to "fix" this, but it feels like I shouldn't need to and it's definitely not documented from what I can tell. That said, I'm new to Fleet so maybe there's a reason for this behavior. At a minimum though, it seems like something that should be documented. I spent more time than I care to admit stuck on this until I finally decided to look through the code. :). Thanks!
Expected Behavior
No response
Steps To Reproduce
Create a bundle with chart:"" left as an empty string and specify a values file using the helm.valuesFiles object. Notice that the values file you specified is not used in templating.
Is there an existing issue for this?
Current Behavior
Hi all, I'm new to Fleet so I'll start this with the usual: "not sure if this is a bug or by design" disclaimer. I've got a GitRepo defined with multiple paths, each of which points to a directory in the repo that contains a Chart.yaml and the usual helm artifacts. (templates folder, values.yaml, and values subfolder with specific values files within it) I also created a fleet.yaml file in each of the chart directories which is mostly empty except for a valuesFiles block like this:
The problem is my values file (values-1.yaml in the values folder) is not getting picked up. I looked through the code and it looks like there are 2 places where the valuesFiles gets read. Here: https://github.com/rancher/fleet/blob/master/internal/bundlereader/resources.go#L41 and here: https://github.com/rancher/fleet/blob/master/internal/bundlereader/resources.go#L48
In my case, I'm using fleet local (single cluster), so I don't have any targets defined so that explains why it's not getting read there at line 48. But the earlier call at line 41 requires a non-empty string
chart
to be defined. If I change that to just a dot like this:chart: "."
then everything works. By I don't understand why this check in the code exists... Because my GitRepo already has a path defined to the directory where the Chart.yaml lives, I shouldn't need to specify this right - my fleet.yaml is already in this path.It's an easy workaround to "fix" this, but it feels like I shouldn't need to and it's definitely not documented from what I can tell. That said, I'm new to Fleet so maybe there's a reason for this behavior. At a minimum though, it seems like something that should be documented. I spent more time than I care to admit stuck on this until I finally decided to look through the code. :). Thanks!
Expected Behavior
No response
Steps To Reproduce
Create a bundle with
chart:""
left as an empty string and specify a values file using thehelm.valuesFiles
object. Notice that the values file you specified is not used in templating.Environment
Logs
No response
Anything else?
No response