Added FluxCD configuration
This commit is contained in:
17
fluxcd/flux-receiver.yaml
Normal file
17
fluxcd/flux-receiver.yaml
Normal 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
|
7
fluxcd/fluxcd-secret.yaml
Normal file
7
fluxcd/fluxcd-secret.yaml
Normal 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
20
fluxcd/ingress.yaml
Normal 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
13
fluxcd/kustomization.yaml
Normal 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
10
fluxcd/source.yaml
Normal 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
|
Reference in New Issue
Block a user