From 5b53f065255526db32f8241986ff0245a82e804b Mon Sep 17 00:00:00 2001 From: Christopher Tineo Date: Fri, 6 Feb 2026 22:32:53 -0500 Subject: [PATCH 1/3] feat: implement Flux image update automation for balancer --- balancer/kustomization.yaml | 2 +- flux-automation.yaml | 48 +++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 flux-automation.yaml diff --git a/balancer/kustomization.yaml b/balancer/kustomization.yaml index f1267f6..270c290 100644 --- a/balancer/kustomization.yaml +++ b/balancer/kustomization.yaml @@ -11,7 +11,7 @@ resources: images: - name: ghcr.io/codeforphilly/balancer-main/app - newTag: "1.1.3" + newTag: "1.1.3" # {"$imagepolicy": "flux-system:balancer"} patches: - target: diff --git a/flux-automation.yaml b/flux-automation.yaml new file mode 100644 index 0000000..0d463e6 --- /dev/null +++ b/flux-automation.yaml @@ -0,0 +1,48 @@ +apiVersion: image.toolkit.fluxcd.io/v1beta1 +kind: ImageRepository +metadata: + name: balancer + namespace: flux-system +spec: + image: ghcr.io/codeforphilly/balancer-main/app + interval: 1h +--- +apiVersion: image.toolkit.fluxcd.io/v1beta1 +kind: ImagePolicy +metadata: + name: balancer + namespace: flux-system +spec: + imageRepositoryRef: + name: balancer + filterSelection: + pattern: '^dev-[0-9]+-[a-f0-9]+' + policy: + alphabetical: + order: asc # asc will pick the highest alphabetical value, which is the newest timestamp. + +--- +apiVersion: image.toolkit.fluxcd.io/v1beta1 +kind: ImageUpdateAutomation +metadata: + name: balancer-updates + namespace: flux-system +spec: + interval: 1h + sourceRef: + kind: GitRepository + name: flux-system + git: + checkout: + ref: + branch: main + commit: + author: + email: fluxcdbot@users.noreply.github.com + name: fluxcdbot + messageTemplate: 'App: balancer image update to {{ .SelectedTarget.Tag }}' + push: + branch: main + update: + path: ./balancer + strategy: Setters From 11e9ca25e2afd860d4fd1e27fab668006c77b40e Mon Sep 17 00:00:00 2001 From: Christopher Tineo Date: Fri, 6 Feb 2026 23:00:48 -0500 Subject: [PATCH 2/3] feat: use SemVer range for sandbox image automation --- flux-automation.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/flux-automation.yaml b/flux-automation.yaml index 0d463e6..88a269a 100644 --- a/flux-automation.yaml +++ b/flux-automation.yaml @@ -15,11 +15,9 @@ metadata: spec: imageRepositoryRef: name: balancer - filterSelection: - pattern: '^dev-[0-9]+-[a-f0-9]+' policy: - alphabetical: - order: asc # asc will pick the highest alphabetical value, which is the newest timestamp. + semver: + range: '>=1.2.0-0' # Includes pre-releases like 1.2.0-dev.TIMESTAMP --- apiVersion: image.toolkit.fluxcd.io/v1beta1 From ff4991848df85ed565f0c0956b616de02635792f Mon Sep 17 00:00:00 2001 From: Christopher Tineo Date: Fri, 6 Feb 2026 23:10:07 -0500 Subject: [PATCH 3/3] feat: use generic alphabetically sorted policy for dev builds --- flux-automation.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flux-automation.yaml b/flux-automation.yaml index 88a269a..db5478d 100644 --- a/flux-automation.yaml +++ b/flux-automation.yaml @@ -15,9 +15,11 @@ metadata: spec: imageRepositoryRef: name: balancer + filterSelection: + pattern: '^.*-dev\.[0-9]+$' policy: - semver: - range: '>=1.2.0-0' # Includes pre-releases like 1.2.0-dev.TIMESTAMP + alphabetical: + order: desc # Picks the highest alphabetical/numerical value (newest timestamp) --- apiVersion: image.toolkit.fluxcd.io/v1beta1