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..db5478d --- /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]+$' + 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