From f58f339b433b1be4260cd2e0f18729e7324bc93a Mon Sep 17 00:00:00 2001 From: Suriya Date: Mon, 20 Jul 2026 10:10:58 +0530 Subject: [PATCH] Add Flux CD GitOps sync for alaska/core stacks Prepares clusters/production/ for `flux bootstrap git` - Kustomizations for manifests/alaska and manifests/core, plus a Gitea push Receiver so new commits reconcile immediately instead of waiting on the poll interval. Webhook exposed on a dedicated host (flux-webhook.workolik.com) to avoid the existing queue.workolik.com Gateway/Ingress overlap. Co-Authored-By: Claude Sonnet 5 --- clusters/production/apps-alaska.yaml | 14 ++++++++++++++ clusters/production/apps-core.yaml | 14 ++++++++++++++ clusters/production/webhook-ingress.yaml | 23 +++++++++++++++++++++++ clusters/production/webhook-receiver.yaml | 17 +++++++++++++++++ manifests/alaska/kustomization.yaml | 6 ++++++ 5 files changed, 74 insertions(+) create mode 100644 clusters/production/apps-alaska.yaml create mode 100644 clusters/production/apps-core.yaml create mode 100644 clusters/production/webhook-ingress.yaml create mode 100644 clusters/production/webhook-receiver.yaml create mode 100644 manifests/alaska/kustomization.yaml diff --git a/clusters/production/apps-alaska.yaml b/clusters/production/apps-alaska.yaml new file mode 100644 index 0000000..26e9d27 --- /dev/null +++ b/clusters/production/apps-alaska.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: alaska + namespace: flux-system +spec: + interval: 10m + sourceRef: + kind: GitRepository + name: flux-system + path: ./manifests/alaska + prune: true + wait: true + timeout: 3m diff --git a/clusters/production/apps-core.yaml b/clusters/production/apps-core.yaml new file mode 100644 index 0000000..884d50c --- /dev/null +++ b/clusters/production/apps-core.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: core + namespace: flux-system +spec: + interval: 10m + sourceRef: + kind: GitRepository + name: flux-system + path: ./manifests/core + prune: true + wait: true + timeout: 3m diff --git a/clusters/production/webhook-ingress.yaml b/clusters/production/webhook-ingress.yaml new file mode 100644 index 0000000..899a7e3 --- /dev/null +++ b/clusters/production/webhook-ingress.yaml @@ -0,0 +1,23 @@ +# Dedicated host so this never shares a routing table with +# queue.workolik.com, which already has a Gateway + Ingress conflict history. +# Requires a DNS A record for flux-webhook.workolik.com pointing at the same +# LB IP the other *.workolik.com hosts use. +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: flux-webhook-ingress + namespace: flux-system + annotations: + traefik.ingress.kubernetes.io/router.tls: "true" +spec: + rules: + - host: flux-webhook.workolik.com + http: + paths: + - path: /hook + pathType: Prefix + backend: + service: + name: webhook-receiver + port: + number: 80 diff --git a/clusters/production/webhook-receiver.yaml b/clusters/production/webhook-receiver.yaml new file mode 100644 index 0000000..3ffc661 --- /dev/null +++ b/clusters/production/webhook-receiver.yaml @@ -0,0 +1,17 @@ +# The referenced Secret (gitea-webhook-token) is created directly on the +# cluster, not committed here - see the server-side command sequence. +apiVersion: notification.toolkit.fluxcd.io/v1 +kind: Receiver +metadata: + name: gitea-receiver + namespace: flux-system +spec: + type: gitea + events: + - push + secretRef: + name: gitea-webhook-token + resources: + - apiVersion: source.toolkit.fluxcd.io/v1 + kind: GitRepository + name: flux-system diff --git a/manifests/alaska/kustomization.yaml b/manifests/alaska/kustomization.yaml new file mode 100644 index 0000000..4157fbd --- /dev/null +++ b/manifests/alaska/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - alaska.yaml + - k8s-dashboard.yaml