Merge pull request 'flux-system: add receiver' (#1) from earl-warren/k8s-cluster:wip-receiver into main

Reviewed-on: https://code.forgejo.org/infrastructure/k8s-cluster/pulls/1
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
This commit is contained in:
earl-warren 2024-10-23 08:10:26 +00:00
commit 47084ccb5b
2 changed files with 44 additions and 0 deletions

View file

@ -3,3 +3,4 @@ kind: Kustomization
resources:
- gotk-components.yaml
- gotk-sync.yaml
- receiver.yaml

View file

@ -0,0 +1,43 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
annotations:
# https://cert-manager.io/docs/usage/ingress/#supported-annotations
# https://github.com/cert-manager/cert-manager/issues/2239
cert-manager.io/cluster-issuer: letsencrypt-http
cert-manager.io/private-key-algorithm: ECDSA
cert-manager.io/private-key-size: 384
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.entrypoints: websecure
metadata:
name: webhook-flux-receiver
namespace: flux-system
spec:
rules:
- host: flux.k8s.forgejo.org
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: webhook-flux-receiver
port:
name: http
---
apiVersion: notification.toolkit.fluxcd.io/v1
kind: Receiver
metadata:
name: forgejo-receiver
namespace: flux-system
spec:
type: github
events:
- "ping"
- "push"
secretRef:
name: webhook-flux-token
resources:
- apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
# matching the GitRepository in gotk-sync.yaml
name: flux-system