From 3dce11842704aa889e8231d4e97561b3492bfdfe Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Mon, 27 Apr 2026 12:57:50 -0500 Subject: [PATCH] flux refactor --- flux/git-repository.yaml | 12 ------------ flux/image-policy.yaml | 14 -------------- flux/image-repository.yaml | 10 ---------- flux/image-update-automation.yaml | 24 ------------------------ flux/kustomization.yaml | 13 ------------- k8s/flux.yaml | 27 +++++++++++++++++++++++++++ 6 files changed, 27 insertions(+), 73 deletions(-) delete mode 100644 flux/git-repository.yaml delete mode 100644 flux/image-policy.yaml delete mode 100644 flux/image-repository.yaml delete mode 100644 flux/image-update-automation.yaml delete mode 100644 flux/kustomization.yaml create mode 100644 k8s/flux.yaml diff --git a/flux/git-repository.yaml b/flux/git-repository.yaml deleted file mode 100644 index 090d6d26..00000000 --- a/flux/git-repository.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: source.toolkit.fluxcd.io/v1 -kind: GitRepository -metadata: - name: towerops-web - namespace: flux-system -spec: - interval: 1m - url: https://git.mcintire.me/graham/towerops-web.git - ref: - branch: main - secretRef: - name: forgejo-git-credentials diff --git a/flux/image-policy.yaml b/flux/image-policy.yaml deleted file mode 100644 index 44ff2d85..00000000 --- a/flux/image-policy.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: image.toolkit.fluxcd.io/v1 -kind: ImagePolicy -metadata: - name: towerops-web - namespace: flux-system -spec: - imageRepositoryRef: - name: towerops-web - filterTags: - pattern: '^main-(?P[0-9]+)-[a-f0-9]+$' - extract: '$ts' - policy: - numerical: - order: asc diff --git a/flux/image-repository.yaml b/flux/image-repository.yaml deleted file mode 100644 index fcfd99ef..00000000 --- a/flux/image-repository.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: image.toolkit.fluxcd.io/v1 -kind: ImageRepository -metadata: - name: towerops-web - namespace: flux-system -spec: - image: git.mcintire.me/graham/towerops-web - interval: 1m - secretRef: - name: forgejo-registry diff --git a/flux/image-update-automation.yaml b/flux/image-update-automation.yaml deleted file mode 100644 index 03ad7846..00000000 --- a/flux/image-update-automation.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: image.toolkit.fluxcd.io/v1 -kind: ImageUpdateAutomation -metadata: - name: towerops-web - namespace: flux-system -spec: - interval: 1m - sourceRef: - kind: GitRepository - name: towerops-web - git: - checkout: - ref: - branch: main - commit: - author: - name: FluxCD - email: fluxcd@towerops.net - messageTemplate: 'chore: update towerops image to {{range .Changed.Changes}}{{.NewValue}}{{end}} [skip ci]' - push: - branch: main - update: - path: ./k8s - strategy: Setters diff --git a/flux/kustomization.yaml b/flux/kustomization.yaml deleted file mode 100644 index c310815d..00000000 --- a/flux/kustomization.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: kustomize.toolkit.fluxcd.io/v1 -kind: Kustomization -metadata: - name: towerops-app - namespace: flux-system -spec: - interval: 5m - sourceRef: - kind: GitRepository - name: towerops-web - path: ./k8s - prune: true - targetNamespace: towerops diff --git a/k8s/flux.yaml b/k8s/flux.yaml new file mode 100644 index 00000000..7188637d --- /dev/null +++ b/k8s/flux.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: source.toolkit.fluxcd.io/v1 +kind: GitRepository +metadata: + name: towerops-web + namespace: flux-system +spec: + interval: 1m + url: https://git.mcintire.me/graham/towerops-web.git + ref: + branch: main + secretRef: + name: forgejo-git-credentials +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: towerops-app + namespace: flux-system +spec: + interval: 5m + sourceRef: + kind: GitRepository + name: towerops-web + path: ./k8s + prune: true + targetNamespace: towerops