diff --git a/kubernetes/clusters/production/flux-system/gotk-sync.yaml b/kubernetes/clusters/production/flux-system/gotk-sync.yaml index 2985136..6cecbdd 100644 --- a/kubernetes/clusters/production/flux-system/gotk-sync.yaml +++ b/kubernetes/clusters/production/flux-system/gotk-sync.yaml @@ -1,4 +1,17 @@ # This manifest was generated by flux. DO NOT EDIT. +# --- +# apiVersion: source.toolkit.fluxcd.io/v1 +# kind: GitRepository +# metadata: +# name: flux-system +# namespace: flux-system +# spec: +# interval: 1m0s +# ref: +# branch: master +# secretRef: +# name: flux-system +# url: https://git.fascinated.cc/fascinated/homelab.git --- apiVersion: source.toolkit.fluxcd.io/v1 kind: GitRepository @@ -6,12 +19,10 @@ metadata: name: flux-system namespace: flux-system spec: - interval: 1m0s + interval: 60m + url: https://git.fascinated.cc/fascinated/homelab.git ref: branch: master - secretRef: - name: flux-system - url: https://git.fascinated.cc/fascinated/homelab.git --- apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization diff --git a/kubernetes/clusters/production/infrastructure.yaml b/kubernetes/clusters/production/infrastructure.yaml index b0b4217..18b2eec 100644 --- a/kubernetes/clusters/production/infrastructure.yaml +++ b/kubernetes/clusters/production/infrastructure.yaml @@ -5,7 +5,7 @@ metadata: name: infrastructure namespace: flux-system spec: - interval: 10m0s + interval: 60m0s sourceRef: kind: GitRepository name: flux-system diff --git a/kubernetes/infrastructure/fluxci/kustomization.yaml b/kubernetes/infrastructure/fluxci/kustomization.yaml new file mode 100644 index 0000000..c271689 --- /dev/null +++ b/kubernetes/infrastructure/fluxci/kustomization.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: flux-system +resources: + - ./notification/secret.yaml + - ./notification/ingress.yaml diff --git a/kubernetes/infrastructure/fluxci/notification/ingress.yaml b/kubernetes/infrastructure/fluxci/notification/ingress.yaml new file mode 100644 index 0000000..b3c193e --- /dev/null +++ b/kubernetes/infrastructure/fluxci/notification/ingress.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: flux-notifications-ingress + namespace: flux-system + annotations: + kubernetes.io/ingress.class: traefik-external +spec: + entryPoints: + - websecure + routes: + - match: Host(`flux-notifications.local.fascinated.cc`) + kind: Rule + middlewares: + - name: default-headers + namespace: traefik + services: + - name: notification-controller + port: 80 + tls: + secretName: fascinated-cc diff --git a/kubernetes/infrastructure/fluxci/notification/reciever.yaml b/kubernetes/infrastructure/fluxci/notification/reciever.yaml new file mode 100644 index 0000000..1cfbb86 --- /dev/null +++ b/kubernetes/infrastructure/fluxci/notification/reciever.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: notification.toolkit.fluxcd.io/v1 +kind: Receiver +metadata: + name: webapp + namespace: flux-system +spec: + type: github + events: + - "ping" + - "push" + secretRef: + name: notification-secret + resources: + - kind: GitRepository + name: webapp diff --git a/kubernetes/infrastructure/fluxci/notification/sealed-secrets.yaml b/kubernetes/infrastructure/fluxci/notification/sealed-secrets.yaml new file mode 100644 index 0000000..8e4c7b6 --- /dev/null +++ b/kubernetes/infrastructure/fluxci/notification/sealed-secrets.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: bitnami.com/v1alpha1 +kind: SealedSecret +metadata: + creationTimestamp: null + name: notification-secret + namespace: flux-system +spec: + encryptedData: + token: AgB9gxfRBYdK3njhBAyXkKsFDSxncYLfO33bvV4Rq7hu4H6OM43xseXveMoSN5+Bw9gvjoaIkn/2Z7pUXNCIUwzG+JAtkDDyY25Xkmu53FN96f3ZUFBQyvtPcB3WTai3spki8GABqLUUkRFX3j7j+hBKLLdryKpkv77OSs/rh0K6V+LhtDjedSW+dKaywPA2kwf1jaX4T675fZpe0h5xpiV1KWO+mHyAmF03CgCC2LvnpCze1/6ZToU6EC+hETe2W6r3fDMxffnkggDgDO0hGy6py4ID00TFXd23dMHu/72caUUgFZGgKTkCF5/+AvOPNoVAaZSrs1V9xPPljYyCzDTucV8O7TfrG6tvsyPG74wU+y9R1OAbq/ZWBh8grMB8zfRHNKMbpGnCphcnB98vkZLQXAnlWYpCJOmerkQYBxiMs3l6XBbDPURuyO2/xOJe70XXDQ7BPA7ZsCilNQNSm+xY9U0Uf8g9oycNBhFoy96+b3VMy7VvAl0smsBPu4VuUwGxAJTftAmqT6lBFoordynEcUiL+q/xph7gKEZj6JQtNibrw5p8k1V8MreoWZe2DmeelgDvZcT7QpPgrHDvbCKNeHM2xFlOzgemBK8+/+Qcr9gZAJGQKE8ppUssD5zDECzk76A2mZ7/tJkGQFaFrC5zh7WDnpMfdXDkQac5e6hKFDAvuBckfgcLok8AAMlCeQgDcdwjlnrGXs1ZFYbvf73gIoAJknB9WZ44tM0I7Um3nzlqGXn5GF2S + template: + metadata: + creationTimestamp: null + name: notification-secret + namespace: flux-system + type: Opaque diff --git a/kubernetes/infrastructure/kustomization.yaml b/kubernetes/infrastructure/kustomization.yaml index bd2d04a..825aa8d 100644 --- a/kubernetes/infrastructure/kustomization.yaml +++ b/kubernetes/infrastructure/kustomization.yaml @@ -7,6 +7,7 @@ resources: - cert-manager - crds - metallb + - fluxci - nfs - traefik - capacitor