Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion balancer/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
48 changes: 48 additions & 0 deletions flux-automation.yaml
Original file line number Diff line number Diff line change
@@ -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]+$'
policy:
alphabetical:
order: desc # Picks the highest alphabetical/numerical value (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