From f8e5b203813eb57f6c1610f4c7c0225cf09927f9 Mon Sep 17 00:00:00 2001 From: 0xWheatyz Date: Wed, 4 Mar 2026 02:11:29 +0000 Subject: [PATCH] feat(flux): add FluxCD GitOps configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add Flux GitRepository and Kustomization resources to enable automated cluster synchronization from Gitea repository. - GitRepository: monitors ssh://git@10.0.1.10/0xWheatyz/Talos - Kustomization: syncs testing1/first-cluster/ to cluster - Interval: 1m for git polling, 5m for reconciliation - Prune enabled for automatic cleanup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../cluster/flux/gitrepository.yaml | 13 ++++++++ .../cluster/flux/kustomization-sync.yaml | 30 +++++++++++++++++++ .../cluster/flux/kustomization.yaml | 5 ++++ 3 files changed, 48 insertions(+) create mode 100644 testing1/first-cluster/cluster/flux/gitrepository.yaml create mode 100644 testing1/first-cluster/cluster/flux/kustomization-sync.yaml create mode 100644 testing1/first-cluster/cluster/flux/kustomization.yaml diff --git a/testing1/first-cluster/cluster/flux/gitrepository.yaml b/testing1/first-cluster/cluster/flux/gitrepository.yaml new file mode 100644 index 0000000..816f8f2 --- /dev/null +++ b/testing1/first-cluster/cluster/flux/gitrepository.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: source.toolkit.fluxcd.io/v1 +kind: GitRepository +metadata: + name: talos-gitops + namespace: flux-system +spec: + interval: 1m + url: ssh://git@10.0.1.10/0xWheatyz/Talos + ref: + branch: main + secretRef: + name: gitea-ssh diff --git a/testing1/first-cluster/cluster/flux/kustomization-sync.yaml b/testing1/first-cluster/cluster/flux/kustomization-sync.yaml new file mode 100644 index 0000000..0b0dfed --- /dev/null +++ b/testing1/first-cluster/cluster/flux/kustomization-sync.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: cluster-sync + namespace: flux-system +spec: + interval: 5m + path: ./testing1/first-cluster + prune: true + sourceRef: + kind: GitRepository + name: talos-gitops + healthChecks: + - apiVersion: apps/v1 + kind: Deployment + namespace: flux-system + name: helm-controller + - apiVersion: apps/v1 + kind: Deployment + namespace: flux-system + name: kustomize-controller + - apiVersion: apps/v1 + kind: Deployment + namespace: flux-system + name: notification-controller + - apiVersion: apps/v1 + kind: Deployment + namespace: flux-system + name: source-controller diff --git a/testing1/first-cluster/cluster/flux/kustomization.yaml b/testing1/first-cluster/cluster/flux/kustomization.yaml new file mode 100644 index 0000000..bb6df21 --- /dev/null +++ b/testing1/first-cluster/cluster/flux/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - gitrepository.yaml + - kustomization-sync.yaml