Skip to content

Commit

Permalink
Remove HelmRelease guide section which is in spec
Browse files Browse the repository at this point in the history
Signed-off-by: Hidde Beydals <[email protected]>
  • Loading branch information
hiddeco committed Dec 12, 2023
1 parent 6997351 commit 319dc58
Showing 1 changed file with 9 additions and 56 deletions.
65 changes: 9 additions & 56 deletions content/en/flux/guides/helmreleases.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ metadata:
namespace: default
stringData:
username: example
password: 123456
password: "123456"
```

For OCI repositories, the credentials can be provided alternatively as a secret reference
Expand Down Expand Up @@ -200,7 +200,7 @@ for more details.
### Cloud Storage

It is inadvisable while still possible to use a `Bucket` as a source for a `HelmRelease`,
as the whole storage bucket will be downloaded by source controller at each sync. The
as the source-controller will download the whole storage bucket at each sync. The
bucket can easily become very large if there are frequent releases of multiple charts
that are stored in the same bucket.

Expand Down Expand Up @@ -232,15 +232,15 @@ spec:
replicaCount: 2
```

The `chart.spec` values are used by the helm-controller as a template
The `.chart.spec` values are used by the helm-controller as a template
to create a new `HelmChart` resource in the same namespace as the
`sourceRef`. The source-controller will then look up the chart in the
`.sourceRef`. The source-controller will then look up the chart in the
artifact of the referenced source, and either fetch the chart for a
`HelmRepository`, or build it from a `GitRepository` or `Bucket`.
It will then make it available as a `HelmChart` artifact to be used by
the helm-controller.

The `chart.spec.chart` can either contain:
The `.chart.spec.chart` can either contain:

* The name of the chart as made available by the `HelmRepository`
(without any aliases), for example: `podinfo`
Expand All @@ -249,7 +249,7 @@ The `chart.spec.chart` can either contain:
* The relative path the chart package can be found at in the
`GitRepository` or `Bucket`, for example: `./charts/podinfo-1.2.3.tgz`

The `chart.spec.version` can be a fixed semver, or any semver range
The `.chart.spec.version` can be a fixed semver, or any semver range
(i.e. `>=4.0.0 <5.0.0`). It is only taken into account for `HelmRelease`
resources that reference a `HelmRepository` source.

Expand All @@ -260,53 +260,6 @@ See the [`HelmRelease` CRD docs](../components/helm/helmreleases.md)
for more details.
{{% /alert %}}

## Refer to values in `ConfigMap` and `Secret` resources

It is possible to define a list of `ConfigMap` and `Secret` resources
from which to take values. The values are merged in the order given,
with the later values overwriting earlier. These values always have a
lower priority than the values inlined in the `HelmRelease` via the
`spec.values` parameter.

```yaml
spec:
valuesFrom:
- kind: ConfigMap
name: prod-env-values
valuesKey: values-prod.yaml
- kind: Secret
name: prod-tls-values
valuesKey: crt
targetPath: tls.crt
```

The definition of the listed keys is as follows:

- `kind`: Kind of the values referent (`ConfigMap` or `Secret`).
- `name`: Name of the values referent, in the same namespace as the
`HelmRelease`.
- `valuesKey` _(Optional)_: The data key where the values.yaml or a
specific value can be found. Defaults to `values.yaml` when omitted.
- `targetPath` _(Optional)_: The YAML dot notation path at which the
value should be merged. When set, the `valuesKey` is expected to be
a single flat value. Defaults to `None` when omitted, which results
in the values getting merged at the root.

{{% alert color="info" title="Note" %}}
The `targetPath` supports the same formatting as you would supply
as an argument to the `helm` binary using `--set [path]=[value]`.
In addition to this, the referred value can contain the same
value formats (e.g. `{a,b,c}` for a list).
You can read more about the available formats and limitations in
the [Helm documentation](https://helm.sh/docs/intro/using_helm/#the-format-and-limitations-of---set).
{{% /alert %}}

{{% alert color="info" title="TargetPath and JSON values" color="warning" %}}
When using `TargetPath` in combination with a JSON string, the
[limitations are the same as while using `helm`](https://github.com/helm/helm/issues/5618),
and require you to escape the full JSON string (including `=`, `[`, `,`, `.`).
{{% /alert %}}

## Refer to values in `ConfigMaps` generated with Kustomize

It is possible to use Kustomize [ConfigMap generator](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/configmapgenerator/)
Expand Down Expand Up @@ -381,8 +334,8 @@ spec:

{{% alert color="info" title="Garbage Collection" %}}
Stale `ConfigMaps`, previously generated by Kustomize, will be
removed from the cluster by kustomize-controller if
[pruning](/flux/components/kustomize/kustomizations/#prune) is enabled.
removed from the cluster by kustomize-controller if [pruning](/flux/components/kustomize/kustomizations/#prune)
is enabled.
{{% /alert %}}

## Refer to values in Secret generated with Kustomize and SOPS
Expand Down Expand Up @@ -640,7 +593,7 @@ See the [Receiver CRD docs](../components/notification/receivers.md) for more de

## Release when a source revision changes for Git and Cloud Storage

It is possible create a new chart artifact when a Source's revision has changed, but the
It is possible to create a new chart artifact when a Source's revision has changed, but the
`version` in the Chart.yml has not been bumped, for `GitRepository` and `Bucket` sources.

```yaml
Expand Down

0 comments on commit 319dc58

Please sign in to comment.