feat: refactor config file (#1267)

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl authored and GitHub committed 2024-01-28 12:41:31 -05:00
1 parent e4427a8325
commit 889ca07692
114 files changed
+721 -1042

No files matched your search

@@ -0,0 +1,25 @@
#% if cloudflare.enabled %#
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: flux-webhook
annotations:
external-dns.alpha.kubernetes.io/target: "external.${SECRET_DOMAIN}"
spec:
ingressClassName: external
rules:
- host: &host "flux-webhook.${SECRET_DOMAIN}"
http:
paths:
- path: /hook/
pathType: Prefix
backend:
service:
name: webhook-receiver
port:
number: 80
tls:
- hosts:
- *host
#% endif %#
@@ -0,0 +1,9 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./secret.sops.yaml
#% if cloudflare.enabled %#
- ./ingress.yaml
#% endif %#
- ./receiver.yaml
@@ -0,0 +1,25 @@
---
apiVersion: notification.toolkit.fluxcd.io/v1
kind: Receiver
metadata:
name: github-receiver
spec:
type: github
events:
- ping
- push
secretRef:
name: github-webhook-token-secret
resources:
- apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
name: home-kubernetes
namespace: flux-system
- apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
name: cluster
namespace: flux-system
- apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
name: cluster-apps
namespace: flux-system
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Secret
metadata:
name: github-webhook-token-secret
stringData:
token: "#{ flux.github.webhook.token }#"
@@ -0,0 +1,5 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./github
@@ -0,0 +1,20 @@
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app flux-webhooks
namespace: flux-system
spec:
targetNamespace: flux-system
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/flux-system/webhooks/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: true
interval: 30m
retryInterval: 1m
timeout: 5m