When WordPress version changes, both Chart.yaml fields should be updated to match:
- version: WordPress version (e.g., 6.9.4)
- appVersion: WordPress version (e.g., 6.9.4)
Previously only 'version' was updated while 'appVersion' remained stale.
Changes:
- Extract current appVersion before update
- Update appVersion with sed command (in addition to version)
- Log both version and appVersion changes
This ensures Chart.yaml always reflects the actual WordPress version deployed.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
When WordPress version changes (e.g., 6.9.3 → 6.9.4), Chart.yaml should use
the new WordPress version WITHOUT any suffix.
Suffix (-a, -b, etc.) is only used for multiple releases within the SAME
WordPress version when non-WordPress changes occur.
Changes:
- Simplify Increment chart version step to directly use new WordPress version
- Remove complex suffix handling logic (only needed for non-WordPress updates)
- Extract WordPress version from values.yaml and apply as Chart version
Examples:
- 6.9.3-a + WordPress update → 6.9.4 (no suffix)
- 6.9.4 + Nginx update → 6.9.4-a (suffix added for non-WordPress changes)
- 6.9.4-a + Nginx update → 6.9.4-b (suffix incremented)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Refactor the image-update-and-release workflow to correctly handle Chart.yaml updates:
Changes:
- Add chart_version_update_needed flag in Update values.yaml step
- Compares WordPress version before/after update
- Only sets flag=true if WordPress version actually changed
- Modify Increment chart version step to run only when chart_version_update_needed=true
- Implement proper suffix handling for versions like 6.9.3-a, 6.9.3-b, etc
- Support upgrading base version without suffix to add -a suffix
- Update Commit and push changes step
- Always add values.yaml
- Only add Chart.yaml if WordPress version was updated
- Update Create Helm package and Create release tag steps
- Only run if Chart.yaml was updated (chart_version_update_needed=true)
- Update Summary step to show whether Chart.yaml was updated
This prevents Chart.yaml from being updated when only Nginx or other images change,
avoiding version number regression issues (e.g., 6.9.3 -> 6.9.4 when only Nginx updated).
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Implement a new nginx.forwardRealIP configuration flag to enable/disable
real client IP extraction from X-Forwarded-For headers on bare-metal clusters.
Changes:
- Added nginx.forwardRealIP.enabled flag (default: false) to values.yaml
- Added nginx.forwardRealIP.trustedProxies list for flexible proxy IP ranges
- Updated Nginx configmap to conditionally apply real IP extraction settings
- Updated FastCGI parameters to use real IP when enabled, direct connection IP otherwise
- Updated WordPress wp-config.php to conditionally extract real IPs from headers
Configuration:
- When enabled: Extracts real client IP from X-Forwarded-For header
- When disabled: Uses direct connection IP (default Nginx behavior)
- Supports custom proxy IP ranges for CloudFlare, AWS ALB, etc.
This allows Helmchart to work seamlessly on both:
1. Bare-metal clusters with iptables load balancing
2. Cloud-managed clusters with proper IP forwarding
Version bumped to 6.9.0-a (WordPress version with implementation suffix)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Changed the 'Update values.yaml' step to skip error exit when no version updates
are available. Instead of failing with exit 1, the workflow now logs an INFO
message and continues execution, allowing the workflow to complete successfully
when versions are already up to date.
- Changed ERROR message to INFO message
- Replaced exit 1 with conditional logic
- Added else clause to log when changes are detected
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>