Flux Image Policy Quick Fix - Image Update Policy
DodaTech
Updated 2026-06-26
1 min read
Flux ImagePolicy selects the latest image tag based on policy rules. Incorrect policy configuration selects wrong versions or causes update loops. This guide covers the fix.
Quick Fix
Wrong
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy
metadata:
name: app-policy
spec:
imageRepositoryRef:
name: app-image
policy:
semver:
range: ">=1.0.0"
The issue: >=1.0.0 includes pre-release versions like 2.0.0-rc.1 which may not be suitable for production. Also missing filterExtracts for custom version extraction.
Right
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy
metadata:
name: app-policy
spec:
imageRepositoryRef:
name: app-image
policy:
semver:
range: ">=1.0.0 <2.0.0-0"
# Expected output after applying the fix
# ImagePolicy selects tags matching >=1.0.0 <2.0.0-0
# Excludes pre-release versions
# Example: selects 1.2.3, not 2.0.0-rc.1
# Image update automation uses this policy
Prevention
- Use semver ranges that exclude pre-release versions with
<2.0.0-0syntax - Use
alphabeticalpolicy for non-semver tags - Use
numericalpolicy for numeric-only tags - Test policy selection with
flux tag listcommand - Combine with ImageUpdateAutomation for auto-committing updates
DodaTech Tools
Doda Browser's image policy tester shows which tag would be selected. DodaZIP archives image policy configurations. Durga Antivirus Pro validates policy ranges.
FAQ
← Previous
Flux Image Auto Quick Fix - ImageUpdateAutomation
Next →
Flux Image Reflect Quick Fix - ImageRepository Configuration
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro