Added FluxCD configuration

This commit is contained in:
Marcin-Ramotowski
2025-08-14 11:24:25 +02:00
parent 46cfabff85
commit 50fb41b107
5 changed files with 67 additions and 0 deletions

17
fluxcd/flux-receiver.yaml Normal file
View File

@ -0,0 +1,17 @@
apiVersion: notification.toolkit.fluxcd.io/v1
kind: Receiver
metadata:
name: gitea-receiver
namespace: flux-system
spec:
type: generic
events:
- "ping"
- "push"
secretRef:
name: webhook-token
resources:
- apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
name: user-microservice-repo
namespace: flux-system

View File

@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: webhook-token
namespace: flux-system
stringData:
token: ${GITEA_WEBHOOK_SECRET}

20
fluxcd/ingress.yaml Normal file
View File

@ -0,0 +1,20 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: webhook-receiver
namespace: flux-system
annotations:
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
spec:
ingressClassName: nginx
rules:
- host: flux.marcin00.pl
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: webhook-receiver
port:
number: 80

13
fluxcd/kustomization.yaml Normal file
View File

@ -0,0 +1,13 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: user-microservice
namespace: flux-system
spec:
interval: 1m
path: ./apps/user-microservice
prune: true
sourceRef:
kind: GitRepository
name: user-microservice-repo
targetNamespace: user-microservice

10
fluxcd/source.yaml Normal file
View File

@ -0,0 +1,10 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: user-microservice-repo
namespace: flux-system
spec:
interval: 1m
url: https://gitea.marcin00.pl/pikram/user-microservice-deploy.git
ref:
branch: argoworkflow-fluxcd