feat(flux): add FluxCD GitOps configuration
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 <noreply@anthropic.com>
This commit is contained in:
parent
3ae15ffdfe
commit
f8e5b20381
13
testing1/first-cluster/cluster/flux/gitrepository.yaml
Normal file
13
testing1/first-cluster/cluster/flux/gitrepository.yaml
Normal file
@ -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
|
||||
30
testing1/first-cluster/cluster/flux/kustomization-sync.yaml
Normal file
30
testing1/first-cluster/cluster/flux/kustomization-sync.yaml
Normal file
@ -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
|
||||
5
testing1/first-cluster/cluster/flux/kustomization.yaml
Normal file
5
testing1/first-cluster/cluster/flux/kustomization.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- gitrepository.yaml
|
||||
- kustomization-sync.yaml
|
||||
Loading…
Reference in New Issue
Block a user