Skip to content

Commit

Permalink
Merge pull request #1718 from fluxcd/nc-v1beta3
Browse files Browse the repository at this point in the history
Update HelmRelease, Alerts and Providers to Flux v2.2.0
  • Loading branch information
makkes authored Dec 12, 2023
2 parents 3ba5bd2 + 89c4444 commit 7420f13
Show file tree
Hide file tree
Showing 17 changed files with 74 additions and 74 deletions.
2 changes: 1 addition & 1 deletion content/en/flagger/install/flagger-install-with-flux.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Define a Flux `HelmRelease` that verifies and installs Flagger's latest version

```yaml
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: flagger
Expand Down
8 changes: 4 additions & 4 deletions content/en/flux/cheatsheets/oci-artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ spec:
type: oci
url: oci://ghcr.io/stefanprodan/charts
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo
Expand Down Expand Up @@ -452,7 +452,7 @@ spec:
url: oci://<registry-host>/<org>/charts
type: oci
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: <app-name>
Expand All @@ -479,7 +479,7 @@ please see the [HelmChart documentation](/flux/components/source/helmcharts/#ver
Configure alerting for when new artifacts are pulled and reconciled:

```yaml
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: podinfo
Expand Down Expand Up @@ -683,7 +683,7 @@ spec:
Then add the policy marker to the `HelmRelease` manifest in Git:

```yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo
Expand Down
2 changes: 1 addition & 1 deletion content/en/flux/cheatsheets/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ Deployment is not ready: default/podinfo. 0 out of 1 expected pods are ready
To inspect the failing resources, you can disable the health checks with:

```yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo
Expand Down
8 changes: 4 additions & 4 deletions content/en/flux/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ spec:
url: oci://ghcr.io/kyverno/charts
type: oci
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: kyverno
Expand Down Expand Up @@ -450,7 +450,7 @@ spec:
interval: 30m
url: https://charts.bitnami.com/bitnami
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: metrics-server
Expand Down Expand Up @@ -480,7 +480,7 @@ when Bitnami publishes a new version of the metrics-server chart.
Lets assume we have a common `HelmRelease` definition we use as a base and we
we need to further customize it e.g per cluster, tenant, environment and so on:
```yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo
Expand Down Expand Up @@ -534,7 +534,7 @@ spec:
#### Using Kustomize variable substitution

```yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo
Expand Down
2 changes: 1 addition & 1 deletion content/en/flux/flux-e2e.md
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ The health checking feature is called [Health Checks][] in the Flux Kustomizatio
[Helm Use Case]: /flux/use-cases/helm/
[HelmRepository API]: /flux/components/source/helmrepositories/
[HelmChart API]: /flux/components/source/helmcharts/
[HelmChartTemplate.spec.reconcileStrategy]: /flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.HelmChartTemplate
[HelmChartTemplate.spec.reconcileStrategy]: /flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.HelmChartTemplate
[Setup Notifications]: /flux/guides/notifications/
[Alert API]: /flux/components/notification/alert/
[Event API]: /flux/components/notification/event/
Expand Down
14 changes: 7 additions & 7 deletions content/en/flux/gitops-toolkit/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ go get github.com/fluxcd/helm-controller/api
Import package

```go
import helmv2 "github.com/fluxcd/helm-controller/api/v2beta1"
import helmv2 "github.com/fluxcd/helm-controller/api/v2beta2"
```

API Types

| Name | Version |
|---------------------------------------------------|---------|
| [HelmRelease](../components/helm/helmreleases.md) | v2beta1 |
| [HelmRelease](../components/helm/helmreleases.md) | v2beta2 |

### notification.toolkit.fluxcd.io

Expand All @@ -101,7 +101,7 @@ go get github.com/fluxcd/notification-controller/api
Import package

```go
import notificationv1b2 "github.com/fluxcd/notification-controller/api/v1beta2"
import notificationv1b3 "github.com/fluxcd/notification-controller/api/v1beta3"
```

and for `Receiver` objects:
Expand All @@ -114,9 +114,9 @@ API Types

| Name | Version |
|----------------------------------------------------|---------|
| [Receiver](../components/notification/receivers.md)| v1 |
| [Provider](../components/notification/providers.md) | v1beta2 |
| [Alert](../components/notification/alerts.md) | v1beta2 |
| [Receiver](../components/notification/receiver.md) | v1 |
| [Provider](../components/notification/provider.md) | v1beta3 |
| [Alert](../components/notification/alert.md) | v1beta3 |

### image.toolkit.fluxcd.io

Expand Down Expand Up @@ -166,7 +166,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

helmv2 "github.com/fluxcd/helm-controller/api/v2beta1"
helmv2 "github.com/fluxcd/helm-controller/api/v2beta2"
apimeta "github.com/fluxcd/pkg/apis/meta"
sourcev1 "github.com/fluxcd/source-controller/api/v1beta2"
)
Expand Down
14 changes: 7 additions & 7 deletions content/en/flux/guides/helmreleases.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ With the chart source created, define a new `HelmRelease` to release
the Helm chart:

```yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo
Expand Down Expand Up @@ -327,7 +327,7 @@ nameReference:
Create a `HelmRelease` definition that references a `ConfigMap`:

```yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo
Expand Down Expand Up @@ -368,7 +368,7 @@ When [kustomize-controller](../components/kustomize/_index.md) reconciles the ab
a unique name of the `ConfigMap` every time `my-values.yaml` content is updated in Git:

```yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo
Expand Down Expand Up @@ -408,7 +408,7 @@ nameReference:
Create a `HelmRelease` definition that references a `Secret`:

```yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo
Expand Down Expand Up @@ -511,7 +511,7 @@ in the context then they can recover decrypted values using `helm get values`.
It is possible to replace the `values.yaml` with a different file present inside the Helm chart.

```yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: mongodb
Expand Down Expand Up @@ -552,7 +552,7 @@ the `flux-system` to start receiving notifications about the Helm
release:

```yaml
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: helm-podinfo
Expand Down Expand Up @@ -644,7 +644,7 @@ It is possible create a new chart artifact when a Source's revision has changed,
`version` in the Chart.yml has not been bumped, for `GitRepository` and `Bucket` sources.

```yaml
apiVersion: source.toolkit.fluxcd.io/v2beta1
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmChart
metadata:
name: podinfo
Expand Down
2 changes: 1 addition & 1 deletion content/en/flux/guides/image-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ Here are some examples of using this marker in a variety of Kubernetes resources
`HelmRelease` example:

```yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo
Expand Down
2 changes: 1 addition & 1 deletion content/en/flux/guides/repository-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ metadata:
spec:
url: https://<host>/<org>/charts
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: app
Expand Down
2 changes: 1 addition & 1 deletion content/en/flux/guides/sealed-secrets.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ spec:
Helm release manifest:
```yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: sealed-secrets
Expand Down
4 changes: 2 additions & 2 deletions content/en/flux/installation/configuration/sharding.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ spec:
type: oci
url: oci://ghcr.io/stefanprodan/charts
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo
Expand Down Expand Up @@ -309,7 +309,7 @@ spec:
- target:
kind: HelmRelease
patch: |
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: all
Expand Down
38 changes: 19 additions & 19 deletions content/en/flux/migration/helm-operator-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ From a technical perspective, this also means less overhead, as the resources ma

Due to the Helm Controller becoming part of the extensive set of controller components Flux now has, the Custom Resource group domain has changed from `helm.fluxcd.io` to `helm.toolkit.fluxcd.io`.

Together with the new API version (`v2beta1` at time of writing), the full `apiVersion` you use in your YAML document becomes `helm.toolkit.fluxcd.io/v2beta1`.
Together with the new API version (`v2beta2` at time of writing), the full `apiVersion` you use in your YAML document becomes `helm.toolkit.fluxcd.io/v2beta2`.

### The API specification changed (quite a lot), for the better

Expand Down Expand Up @@ -76,7 +76,7 @@ Getting similar behaviour is still possible [using a workaround that makes use o

There was a long outstanding request for the Helm Operator to support merging single values at a given path.

With the Helm Controller this now possible by defining a [`targetPath` in the `ValuesReference`](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.ValuesReference), which 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).
With the Helm Controller this now possible by defining a [`targetPath` in the `ValuesReference`](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.ValuesReference), which 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).

### Support added for depends-on relationships

Expand Down Expand Up @@ -131,7 +131,7 @@ $ flux create helmrelease podinfo \
--chart-version=">4.0.0" \
--export
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo
Expand Down Expand Up @@ -220,11 +220,11 @@ spec:
name: my-repository-creds
```

In the `HelmRelease`, you then use a reference to the `HelmRepository` resource in the `spec.chart.spec` (for all available fields, consult the [Helm API reference](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.HelmChartTemplate)):
In the `HelmRelease`, you then use a reference to the `HelmRepository` resource in the `spec.chart.spec` (for all available fields, consult the [Helm API reference](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.HelmChartTemplate)):

```yaml
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: my-release
Expand Down Expand Up @@ -322,11 +322,11 @@ spec:
name: my-repository-creds
```

In the `HelmRelease`, you then use a reference to the `GitRepository` resource in the `spec.chart.spec` (for all available fields, consult the [Helm API reference](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.HelmChartTemplate)):
In the `HelmRelease`, you then use a reference to the `GitRepository` resource in the `spec.chart.spec` (for all available fields, consult the [Helm API reference](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.HelmChartTemplate)):

```yaml
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: my-release
Expand Down Expand Up @@ -356,7 +356,7 @@ Inlined values (defined in the `spec.values` of the `HelmRelease`) still work as

```yaml
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: my-release
Expand Down Expand Up @@ -404,11 +404,11 @@ spec:
optional: true
```

In the new API spec the individual `configMapKeyRef` and `secretKeyRef` objects are bundled into a single [`ValuesReference`](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.ValuesReference) which [does no longer allow refering to resources in other namespaces](#values-from-external-source-references-urls-are-no-longer-supported):
In the new API spec the individual `configMapKeyRef` and `secretKeyRef` objects are bundled into a single [`ValuesReference`](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.ValuesReference) which [does no longer allow refering to resources in other namespaces](#values-from-external-source-references-urls-are-no-longer-supported):

```yaml
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: my-release
Expand Down Expand Up @@ -452,7 +452,7 @@ With the Helm Controller, this declaration has moved to the `spec.chart.spec`, a

```yaml
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: my-release
Expand Down Expand Up @@ -572,7 +572,7 @@ You can now refer to the `my-external-values` `ConfigMap` resource in your `Helm

```yaml
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: my-release
Expand All @@ -588,7 +588,7 @@ spec:

With the Helm Operator the release options used to be configured in the `spec` of the `HelmRelease` and applied to both Helm install and upgrade actions.

This has changed for the Helm Controller, where some defaults can be defined in the [`spec`](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.HelmReleaseSpec), but specific action configurations and overwrites for the defaults can be defined in the [`spec.install`](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.Install), [`spec.upgrade`](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.Upgrade) and [`spec.test`](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.Test) sections of the `HelmRelease`.
This has changed for the Helm Controller, where some defaults can be defined in the [`spec`](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.HelmReleaseSpec), but specific action configurations and overwrites for the defaults can be defined in the [`spec.install`](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.Install), [`spec.upgrade`](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.Upgrade) and [`spec.test`](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.Test) sections of the `HelmRelease`.

### Defining a rollback / uninstall configuration

Expand All @@ -613,14 +613,14 @@ spec:
timeout: 300
```

The Helm Controller offers an extensive set of configuration options to remediate when a Helm release fails, using [`spec.install.remediation`](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.InstallRemediation), [`spec.upgrade.remediation`](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.UpgradeRemediation), [`spec.rollback`](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.Rollback) and [`spec.uninstall`](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.Uninstall). Some of the new features include the option to remediate with an uninstall after an upgrade failure, and the option to keep a failed release for debugging purposes when it has run out of retries.
The Helm Controller offers an extensive set of configuration options to remediate when a Helm release fails, using [`spec.install.remediation`](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.InstallRemediation), [`spec.upgrade.remediation`](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.UpgradeRemediation), [`spec.rollback`](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.Rollback) and [`spec.uninstall`](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.Uninstall). Some of the new features include the option to remediate with an uninstall after an upgrade failure, and the option to keep a failed release for debugging purposes when it has run out of retries.

#### Automated uninstalls

The configuration below mimics the uninstall behavior of the Helm Operator (for all available fields, consult the [`InstallRemediation`](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.InstallRemediation) and [`Uninstall`](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.Uninstall) API references):
The configuration below mimics the uninstall behavior of the Helm Operator (for all available fields, consult the [`InstallRemediation`](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.InstallRemediation) and [`Uninstall`](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.Uninstall) API references):

```yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: my-release
Expand All @@ -643,10 +643,10 @@ spec:

#### Automated rollbacks

The configuration below shows an automated rollback configuration that equals [the configuration for the Helm Operator showed above](#defining-a-rollback--uninstall-configuration) (for all available fields, consult the [`UpgradeRemediation`](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.UpgradeRemediation) and [`Rollback`](/flux/components/helm/api/v2beta1#helm.toolkit.fluxcd.io/v2beta1.Rollback) API references):
The configuration below shows an automated rollback configuration that equals [the configuration for the Helm Operator showed above](#defining-a-rollback--uninstall-configuration) (for all available fields, consult the [`UpgradeRemediation`](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.UpgradeRemediation) and [`Rollback`](/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2beta2.Rollback) API references):

```yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: my-release
Expand Down Expand Up @@ -726,7 +726,7 @@ spec:
interval: 10m
url: https://stefanprodan.github.io/podinfo
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: podinfo
Expand Down
Loading

0 comments on commit 7420f13

Please sign in to comment.