Executive Summary
Policy: 🔴 NEVER use:latest tags in production deployments
Rationale:
- ✅ Reproducible deployments across environments
- ✅ Easy rollback to any previous version
- ✅ Clear version history and audit trail
- ✅ No surprise breaking changes
- ✅ Compliance with production best practices
Version Pinning Rules
Production (Mandatory)
All production deployments MUST use explicit version tags following semantic versioning:Staging (Recommended)
Staging environments SHOULD use explicit version tags with environment prefix:Development (Flexible)
Development environments MAY use latest tags for rapid iteration:Current Version Matrix
Application Version: 2.4.0
Deployment Configurations
Semantic Versioning
We follow Semantic Versioning 2.0.0:Version Bumping Rules
PATCH version (2.4.0 → 2.4.1):- Bug fixes
- Security patches
- Documentation updates
- No API changes
- New features (backward compatible)
- Deprecations (with migration path)
- Performance improvements
- Dependency updates (minor)
- Breaking API changes
- Removed deprecated features
- Major architectural changes
- Incompatible dependency updates
Version Update Process
1. Update Source of Truth
2. Update Deployment Configurations
Run the version sync script:3. Create Git Tag
4. CI/CD Automatic Tagging
Our CI/CD pipeline automatically creates::latest tag is created automatically for convenience but MUST NOT be used in production deployments.
Image Tag Formats
Recommended Formats
Anti-Patterns (DO NOT USE)
Deployment Environment Strategies
Development
Staging
Production
Image Pull Policy
Always useIfNotPresent or Never with pinned tags:
IfNotPresent: Reduces registry pulls, faster deploymentsAlways: Required for mutable tags (latest) to get updatesNever: Local development only
Verification Checklist
Before deploying to production:- All image tags are explicit versions (no :latest)
- Version matches pyproject.toml
- Chart.yaml version and appVersion match
- All Kustomize overlays updated
- Git tag created and pushed
- CI/CD built correct version
- Staging tested with exact production tag
- Rollback plan documented
Automated Verification
Rollback Procedures
Kustomize Rollback
Helm Rollback
Kubernetes Native Rollback
Version Drift Detection
Manual Check
Automated Monitoring
CI/CD Integration
GitHub Actions Example
Pre-commit Hook
Infrastructure Image Versions
External service images (OpenFGA, Keycloak, etc.) are also pinned:
See VERSION_COMPATIBILITY for detailed infrastructure version matrix.
Best Practices Summary
DO ✅
- ✅ Use explicit semantic version tags (2.4.0)
- ✅ Update all deployment configs when bumping version
- ✅ Create git tags for releases
- ✅ Test with production tags in staging
- ✅ Document version changes in CHANGELOG.md
- ✅ Use imagePullPolicy: IfNotPresent with pinned tags
- ✅ Maintain version consistency across all files
DON’T ❌
- ❌ Use :latest in production
- ❌ Use mutable tags (stable, production, v2)
- ❌ Skip version bumps in deployment configs
- ❌ Deploy without version validation
- ❌ Omit git tags for releases
- ❌ Mix version formats (v2.4.0 vs 2.4.0)
- ❌ Assume :latest is stable
Troubleshooting
Issue: “Image pull backoff”
Issue: “Deployment using old version”
Issue: “Version mismatch across environments”
Related Documentation
- VERSION_COMPATIBILITY - Infrastructure version matrix
- Kubernetes Deployment Guide - Deployment procedures
- CHANGELOG - Version history
- Semantic Versioning - Version numbering spec
Version History
Last Audit: 2025-10-14 Next Review: 2025-11-14 Status: ✅ All production deployments use pinned versions