rancher / fleet

Deploy workloads from Git to large fleets of Kubernetes clusters
https://fleet.rancher.io/
Apache License 2.0
1.52k stars 229 forks source link

Feature Request: access BundleDeploymentOptions as templated values #2210

Open jhoblitt opened 8 months ago

jhoblitt commented 8 months ago

Is your feature request related to a problem?

I would like to be able to generate helm values which use the namespace the bundle/chart is being deployed into. However, neither ${ .DefaultNamespace } or ${ .defaultNamespace } are available as a templated value. E.g.

    - "${ .defaultNamespace }.${ .ClusterName }.${ .ClusterLabels.site }.example.org"
Results in time="2024-03-05T23:47:40Z" level=error msg="error syncing 'fleet-default/pillan-fleet-lib-snmp-exporter': handler bundle: failed to render helm values template: template: values:36:7: executing \"values\" at <.defaultNamespace>: map has no entry for key \"defaultNamespace\", requeuing"

Solution you'd like

I would like all of the BundleDeploymentOptions fields to be available as a template.

Alternatives you've considered

I don't think there are any alternatives at this point since all of the template data seems to be tied to the cluster CR.

Anything else?

No response

manno commented 7 months ago

I think that's the same as .Release.Namespace, because defaultNamespace is where the helm chart is installed to?