prop/k8s/flux.yaml
Graham McIntire 735553e443
feat(flux): add image-automation for prop-grid-rs
Mirrors the Elixir wiring:
- ImageRepository + ImagePolicy scan git.mcintire.me/graham/prop-grid-rs
  for main-<ts>-<sha> tags and pick the highest timestamp.
- ImageUpdateAutomation already covers ./k8s via the Setters strategy,
  so the new setter marker on deployment-grid-rs.yaml means flux will
  rewrite it on every CI push and commit the update back to main.
2026-04-19 16:24:33 -05:00

106 lines
2 KiB
YAML

---
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: prop
namespace: flux-system
spec:
interval: 1m
url: https://git.mcintire.me/graham/prop.git
ref:
branch: main
secretRef:
name: forgejo-git-credentials
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: prop-app
namespace: flux-system
spec:
interval: 5m
sourceRef:
kind: GitRepository
name: prop
path: ./k8s
prune: true
targetNamespace: prop
---
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImageRepository
metadata:
name: prop
namespace: flux-system
spec:
image: git.mcintire.me/graham/prop
interval: 1m
provider: generic
secretRef:
name: forgejo-registry
---
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImagePolicy
metadata:
name: prop
namespace: flux-system
spec:
imageRepositoryRef:
name: prop
policy:
numerical:
order: asc
filterTags:
pattern: ^main-(?P<ts>[0-9]+)-[a-f0-9]+$
extract: $ts
---
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImageRepository
metadata:
name: prop-grid-rs
namespace: flux-system
spec:
image: git.mcintire.me/graham/prop-grid-rs
interval: 1m
provider: generic
secretRef:
name: forgejo-registry
---
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImagePolicy
metadata:
name: prop-grid-rs
namespace: flux-system
spec:
imageRepositoryRef:
name: prop-grid-rs
policy:
numerical:
order: asc
filterTags:
pattern: ^main-(?P<ts>[0-9]+)-[a-f0-9]+$
extract: $ts
---
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImageUpdateAutomation
metadata:
name: prop
namespace: flux-system
spec:
interval: 1m
sourceRef:
kind: GitRepository
name: prop
git:
checkout:
ref:
branch: main
commit:
author:
name: FluxCD
email: fluxcd@w5isp.com
messageTemplate: 'chore: update prop image to {{range .Changed.Changes}}{{.NewValue}}{{end}} [skip ci]'
push:
branch: main
update:
path: ./k8s
strategy: Setters