helm-charts
helm-charts copied to clipboard
fluent-operator: missing dependencies for enabling/disabling CRD installation in Chart.yaml
Hi everyone!
Context
I'm trying to use the fluent-operator chart to install the operator with fluent-bit enabled and fluentd disabled.
The issue
I've found that the chart in this repository will install the fluentd CRDs even if fluentd.crdsEnable=false
.
The chart in fluent/fluent-operator contains local charts which contain the CRDs for fluent-bit and fluentd, respectively, and can be enabled/disabled as needed. This functionality appears to be provided by the dependencies in the Chart.yaml file.
It appears these dependencies are missing from the chart in the fluent/helm-charts repository - (Chart.yaml here). I've had a look at adding the dependencies and raising a PR, but I can't find the remote chart repository to reference in the dependencies.
Reproducing the issue
Cloning via SSH in the below examples.
fluent/fluent-operator chart
- Clone the repository :
git clone [email protected]:fluent/fluent-operator.git
- Change directory to chart directory:
cd fluent-operator/charts/fluent-operator
- Template the chart, including CRDs, with fluentd CRDs disabled:
Thehelm template fluent-operator . --set fluentd.crdsEnable=false --include-crds
--include-crds
is required, otherwise CRDs will not be included in the template.
[!IMPORTANT] The Helm template produced by this command doesn't contain CRDs that are part of the
fluentd.fluent.io
group.
To confirm the flag is working, you can remove it:
helm template fluent-operator . --include-crds
The Helm template from this command does contain the fluentd CRDs.
fluent/helm-charts chart
- Clone the repository:
git clone [email protected]:fluent/helm-charts.git
- Change directory to chart directory:
cd helm-charts/charts/fluent-operator
- Template the chart, including CRDs, with fluentd CRDs disabled:
Thehelm template fluent-operator . --set fluentd.crdsEnable=false --include-crds
--include-crds
is required, otherwise CRDs will not be included in the template.
[!IMPORTANT] The Helm template produced by this command does contain CRDs that are part of the
fluentd.fluent.io
group.
Proposed solutions
I think there are two possible solutions:
- Follow a similar approach to fluent/fluent-operator chart with local sub-charts.
- Publish the CRD charts to a remote repository, versioned, and reference the URL in the dependency.
I'm happy to raise a PR to address this, but looking for guidance on what you think the best approach is.