- Changer URL GitRepository pour correspondre au nouveau nom dépôt - Dépôt renommé de 'infra' vers 'Homelab'
59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
---
|
|
# GitRepository resource - tells FluxCD where to find the Git repo
|
|
apiVersion: source.toolkit.fluxcd.io/v1
|
|
kind: GitRepository
|
|
metadata:
|
|
name: infra-repo
|
|
namespace: flux-system
|
|
spec:
|
|
interval: 1m # Poll Git every 1 minute
|
|
url: ssh://git@forgejo.tellserv.fr:222/Tellsanguis/Homelab.git
|
|
ref:
|
|
branch: main
|
|
secretRef:
|
|
name: forgejo-credentials
|
|
ignore: |
|
|
# Ignore files that don't need to trigger reconciliation
|
|
/*.md
|
|
/terraform/
|
|
/ansible/
|
|
/.forgejo/
|
|
|
|
---
|
|
# Kustomization resource - tells FluxCD what to deploy
|
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
kind: Kustomization
|
|
metadata:
|
|
name: apps
|
|
namespace: flux-system
|
|
spec:
|
|
interval: 5m # Reconcile every 5 minutes
|
|
path: ./kubernetes/apps
|
|
prune: true # Remove resources deleted from Git
|
|
sourceRef:
|
|
kind: GitRepository
|
|
name: infra-repo
|
|
timeout: 3m
|
|
wait: true
|
|
healthChecks:
|
|
- apiVersion: apps/v1
|
|
kind: Deployment
|
|
namespace: default
|
|
name: '*'
|
|
|
|
---
|
|
# Kustomization for infrastructure components
|
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
kind: Kustomization
|
|
metadata:
|
|
name: infrastructure
|
|
namespace: flux-system
|
|
spec:
|
|
interval: 10m
|
|
path: ./kubernetes/infrastructure
|
|
prune: true
|
|
sourceRef:
|
|
kind: GitRepository
|
|
name: infra-repo
|
|
timeout: 5m
|
|
wait: true
|