Documenting Helm values.yaml vs. Fleet valuesFiles

This commit is contained in:
hridyesh bisht 2025-09-19 11:28:01 +05:30
parent 8f4e03a7c7
commit b530ff15a9
No known key found for this signature in database
GPG Key ID: 7E30EC522B3FCFBB
3 changed files with 70 additions and 1 deletions

View File

@ -0,0 +1,64 @@
# Understanding Helm values.yaml vs. Fleet valuesFiles
When using Fleet with Helm, you often confuse the charts built-in `values.yaml` with additional values files referenced in `fleet.yaml`. These files serve different purposes, and its important to understand how they interact.
![Understanding Helm values.yaml vs Fleet valuesFiles with best practices](../static/img/helm-value-fleet-yaml.svg)
## Helm charts values.yaml
Every Helm chart includes a `values.yaml`. This file contains the default configuration values used when deploying the chart.
* Its automatically applied by Helm and Fleet. You dont need to reference it in `fleet.yaml`.
* It always acts as the baseline when the Fleet agent installs the chart.
* Any overrides you provide later (via Fleet `valuesFiles` or `values: parameters`) replace or extend these defaults.
**Example directory:**
```bash
.
├── Chart.yaml
├── fleet.yaml
├── README.md
├── templates/
│ ├── deployment.yaml
│ └── service.yaml
└── values.yaml \# chart defaults
```
You can use Helm charts `values.yaml` file to:
* Provide default settings and allow users to override defaults without modifying the chart itself.
* Define common Kubernetes resource defaults.
:::note
Helm chart `values.yaml` does not support templating. Any substitutions happen during chart rendering before Fleet applies the chart.
* You cannot use shell-style variables (for example, `${var}`) inside this file.
* If `${var}` appears, Helm treats it as plain text—you dont need to escape it.
:::
## **Fleet valuesFiles referenced from fleet.yaml**
Fleet lets you reference additional values files through `fleet.yaml`. These files override or extend the charts baseline defaults.
* A values Files entry is equivalent to copy-pasting the contents of that file into the values: section of `fleet.yaml`.
* Its mainly a convenience feature for splitting values into multiple files.
* Unlike Helm chart `values.yaml`, Fleets values files support templating, which enables dynamic configuration per environment.
**Example fleet.yaml:**
```yaml
helm:
valuesFiles:
\- values.prod.yaml \# overrides baseline
```
You can use fleet `valuesFiles` referenced from `fleet.yaml` to:
* Apply environment-specific overrides (dev, staging, prod).
* Enable advanced features not included in chart defaults.
## **Best practice**
Whether you use helm `values.yaml`, `fleet.yaml` values:, or `valuesFiles`, never store credentials in these files.
The recommended and safer approach is to use `valuesFrom`, which references Kubernetes Secrets or ConfigMaps. Although this requires creating the Secrets on downstream clusters, it ensures sensitive data is stored securely.

View File

@ -53,7 +53,8 @@ module.exports = {
{type:'doc', id:'observability'},
{type:'doc', id:'helm-ops'},
{type:'doc', id:'rollout'},
{type:'doc', id:'fine-tune-error'}
{type:'doc', id:'fine-tune-error'},
{type:'doc', id:'valuesYaml-valuesFiles'}
],
},
{

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 15 KiB