chore: Update receiver webhook
This commit is contained in:
parent
9974fecf31
commit
59e41339e6
@ -30,6 +30,6 @@ spec:
|
|||||||
name: flux-system
|
name: flux-system
|
||||||
path: ./k8s/infrastructure
|
path: ./k8s/infrastructure
|
||||||
wait: true
|
wait: true
|
||||||
prune: false
|
prune: true
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- name: crds
|
- name: crds
|
||||||
|
@ -3,4 +3,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- discord-alert.yaml
|
- discord-alert.yaml
|
||||||
- webhook-ingress.yaml
|
- webhook.yaml
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: webhook-receiver
|
|
||||||
namespace: flux-system
|
|
||||||
annotations:
|
|
||||||
cert-manager.io/cluster-issuer: le-cf-issuer
|
|
||||||
kubernetes.io/ingress.class: traefik
|
|
||||||
spec:
|
|
||||||
rules:
|
|
||||||
- host: flux-webhook.dolo.mnke.org
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- pathType: Prefix
|
|
||||||
path: /
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: webhook-receiver
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
tls:
|
|
||||||
- hosts:
|
|
||||||
- flux-webhook.dolo.mnke.org
|
|
||||||
secretName: wildcard-mnke-org-tls
|
|
73
k8s/infrastructure/configs/flux/webhook.yaml
Normal file
73
k8s/infrastructure/configs/flux/webhook.yaml
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
---
|
||||||
|
apiVersion: source.toolkit.fluxcd.io/v1
|
||||||
|
kind: GitRepository
|
||||||
|
metadata:
|
||||||
|
name: homelab
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
interval: 60m
|
||||||
|
url: https://git.mnke.org/tony/homelab.git
|
||||||
|
ref:
|
||||||
|
branch: master
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: gitea-webhook-token
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
name: infisical
|
||||||
|
|
||||||
|
target:
|
||||||
|
name: gitea-webhook-token
|
||||||
|
|
||||||
|
data:
|
||||||
|
- secretKey: token
|
||||||
|
remoteRef:
|
||||||
|
key: gitea-webhook-token
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: notification.toolkit.fluxcd.io/v1
|
||||||
|
kind: Receiver
|
||||||
|
metadata:
|
||||||
|
name: homelab
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
type: github # https://fluxcd.io/flux/components/notification/receivers/#type
|
||||||
|
events:
|
||||||
|
- "ping"
|
||||||
|
- "push"
|
||||||
|
secretRef:
|
||||||
|
name: gitea-webhook-token
|
||||||
|
resources:
|
||||||
|
- kind: GitRepository
|
||||||
|
name: homelab
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: webhook-receiver
|
||||||
|
namespace: flux-system
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: le-cf-issuer
|
||||||
|
kubernetes.io/ingress.class: traefik
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: flux-webhook.dolo.mnke.org
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- pathType: Prefix
|
||||||
|
path: /
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: webhook-receiver
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- flux-webhook.dolo.mnke.org
|
||||||
|
secretName: wildcard-mnke-org-tls
|
@ -95,6 +95,9 @@ spec:
|
|||||||
service:
|
service:
|
||||||
enabled: true
|
enabled: true
|
||||||
type: LoadBalancer
|
type: LoadBalancer
|
||||||
|
# This is needed to get the real IP address, otherwise Kubernetes SNAT
|
||||||
|
# will mask it
|
||||||
|
externalTrafficPolicy: Local
|
||||||
annotations: {}
|
annotations: {}
|
||||||
labels: {}
|
labels: {}
|
||||||
spec:
|
spec:
|
||||||
@ -102,6 +105,21 @@ spec:
|
|||||||
loadBalancerSourceRanges: []
|
loadBalancerSourceRanges: []
|
||||||
externalIPs: []
|
externalIPs: []
|
||||||
|
|
||||||
|
topologySpreadConstraints:
|
||||||
|
# Force scheduler to put traefik pods on nodes where no other traefik pods
|
||||||
|
# are scheduled.
|
||||||
|
# This tries to counteract the effects of having a Local
|
||||||
|
# externalTrafficPolicy, where Kubernetes only load balances on the node
|
||||||
|
# level rather than the pod level. This means we should try to avoid
|
||||||
|
# scheduling traefik pods on the same node to have more balanced
|
||||||
|
# load balancing
|
||||||
|
- labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: '{{ template "traefik.name" . }}'
|
||||||
|
maxSkew: 1
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
whenUnsatisfiable: DoNotSchedule
|
||||||
|
|
||||||
# tlsStore:
|
# tlsStore:
|
||||||
# default:
|
# default:
|
||||||
# defaultCertificate:
|
# defaultCertificate:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user