# Image automation resources — ImageRepository → ImagePolicy → ImageUpdateAutomation
# ImageUpdateAutomation writes back to GitRepository/flux-system
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImageRepository
metadata:
  name: podinfo
  namespace: flux-resources
  labels: {app.kubernetes.io/managed-by: flux9s-dev}
spec:
  interval: 5m
  image: ghcr.io/stefanprodan/podinfo
---
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImagePolicy
metadata:
  name: podinfo
  namespace: flux-resources
  labels: {app.kubernetes.io/managed-by: flux9s-dev}
spec:
  imageRepositoryRef:
    name: podinfo
  policy:
    semver:
      range: ">=6.0.0"
---
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImageUpdateAutomation
metadata:
  name: podinfo
  namespace: flux-resources
  labels: {app.kubernetes.io/managed-by: flux9s-dev}
spec:
  interval: 30m
  sourceRef:
    kind: GitRepository
    name: flux-system
  git:
    checkout:
      ref:
        branch: main
    commit:
      author:
        name: Flux Bot
        email: flux@example.com
