Skip to main content
Last Updated: 2025-10-14 Current Version: 2.4.0 This document defines the version pinning strategy for Docker images and deployment configurations to ensure production-grade, reproducible deployments.

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 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
MINOR version (2.4.0 → 2.5.0):
  • New features (backward compatible)
  • Deprecations (with migration path)
  • Performance improvements
  • Dependency updates (minor)
MAJOR version (2.4.0 → 3.0.0):
  • 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:
Note: The :latest tag is created automatically for convenience but MUST NOT be used in production deployments.

Image Tag Formats

Anti-Patterns (DO NOT USE)


Deployment Environment Strategies

Development

Rationale: Rapid iteration, auto-deploy on commit

Staging

Rationale: Testing specific versions before production

Production

Rationale: Absolute reproducibility, auditable deployments

Image Pull Policy

Always use IfNotPresent or Never with pinned tags:
Rationale:
  • IfNotPresent: Reduces registry pulls, faster deployments
  • Always: Required for mutable tags (latest) to get updates
  • Never: 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”



Version History


Last Audit: 2025-10-14 Next Review: 2025-11-14 Status: ✅ All production deployments use pinned versions