From 9141228d53aa11d13fd58dc4a1d1956b9768eea2 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Wed, 28 Aug 2024 20:23:32 -0500 Subject: [PATCH] Add Flagger --- .../my-cluster/flagger/kustomization.yaml | 8 ++++++ clusters/my-cluster/flagger/namespace.yaml | 7 +++++ clusters/my-cluster/flagger/release.yaml | 26 +++++++++++++++++++ clusters/my-cluster/flagger/repository.yaml | 10 +++++++ 4 files changed, 51 insertions(+) create mode 100644 clusters/my-cluster/flagger/kustomization.yaml create mode 100644 clusters/my-cluster/flagger/namespace.yaml create mode 100644 clusters/my-cluster/flagger/release.yaml create mode 100644 clusters/my-cluster/flagger/repository.yaml 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