mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-26 09:24:58 +00:00
Add image registry example to story 2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
606078c1b3
commit
20d7d0c78a
1 changed files with 12 additions and 3 deletions
|
|
@ -75,7 +75,7 @@ And finally in Flux `HelmReleases`, refer to the ghcr-charts `HelmRepository`:
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta1
|
apiVersion: helm.toolkit.fluxcd.io/v2beta1
|
||||||
kind: HelmRelease
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: podinfo
|
name: my-app
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
interval: 60m
|
interval: 60m
|
||||||
|
|
@ -98,10 +98,19 @@ spec:
|
||||||
Given that charts are stored in container registries, you can use Flux image automation
|
Given that charts are stored in container registries, you can use Flux image automation
|
||||||
and patch the chart version in Git, in the same way Flux works for updating container image tags.
|
and patch the chart version in Git, in the same way Flux works for updating container image tags.
|
||||||
|
|
||||||
Define an image policy using semver:
|
Define an image registry and a policy for the chart artifact:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: image.toolkit.fluxcd.io/v1beta1
|
apiVersion: image.toolkit.fluxcd.io/v1beta1
|
||||||
|
kind: ImageRepository
|
||||||
|
metadata:
|
||||||
|
name: my-app
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
image: ghcr.io/my-org/charts/my-app
|
||||||
|
interval: 1m0s
|
||||||
|
---
|
||||||
|
apiVersion: image.toolkit.fluxcd.io/v1beta1
|
||||||
kind: ImagePolicy
|
kind: ImagePolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: my-app
|
name: my-app
|
||||||
|
|
@ -120,7 +129,7 @@ Then add the policy marker to the `HelmRelease` manifests in Git:
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta1
|
apiVersion: helm.toolkit.fluxcd.io/v2beta1
|
||||||
kind: HelmRelease
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: podinfo
|
name: my-app
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
interval: 60m
|
interval: 60m
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue