diff --git a/clusters/my-cluster/flagger/kustomization.yaml b/clusters/my-cluster/flagger/kustomization.yaml new file mode 100644 index 0000000..d87cf9e --- /dev/null +++ b/clusters/my-cluster/flagger/kustomization.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: flagger-system +resources: + - namespace.yaml + - repository.yaml + - release.yaml diff --git a/clusters/my-cluster/flagger/namespace.yaml b/clusters/my-cluster/flagger/namespace.yaml new file mode 100644 index 0000000..4bd9247 --- /dev/null +++ b/clusters/my-cluster/flagger/namespace.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: flagger-system + labels: + toolkit.fluxcd.io/tenant: sre-team diff --git a/clusters/my-cluster/flagger/release.yaml b/clusters/my-cluster/flagger/release.yaml new file mode 100644 index 0000000..1a04f0b --- /dev/null +++ b/clusters/my-cluster/flagger/release.yaml @@ -0,0 +1,26 @@ +--- +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: flagger + namespace: flagger-system +spec: + interval: 1h + releaseName: flagger + install: # override existing Flagger CRDs + crds: CreateReplace + upgrade: # update Flagger CRDs + crds: CreateReplace + chart: + spec: + chart: flagger + version: 1.x # update Flagger to the latest minor version + interval: 6h # scan for new versions every six hours + sourceRef: + kind: HelmRepository + name: flagger + verify: # verify the chart signature with Cosign keyless + provider: cosign + values: + nodeSelector: + kubernetes.io/os: linux diff --git a/clusters/my-cluster/flagger/repository.yaml b/clusters/my-cluster/flagger/repository.yaml new file mode 100644 index 0000000..e3edaf1 --- /dev/null +++ b/clusters/my-cluster/flagger/repository.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: flagger + namespace: flagger-system +spec: + interval: 1h + url: oci://ghcr.io/fluxcd/charts + type: oci