fix: enable kubedog tracking with atomic/rollback-on-failure helm flags#2450
fix: enable kubedog tracking with atomic/rollback-on-failure helm flags#2450yxxhero wants to merge 2 commits into
Conversation
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
@copilot fix ci issues. |
Fixed in commit
|
When using atomic: true with trackMode: kubedog, the --atomic flag was passed to Helm which caused Helm to wait for resources and rollback internally before helmfile could start kubedog tracking. This prevented users from seeing deployment logs and errors. Changes: - Add RollbackRelease method to helmexec interface and implementation - Add appendAtomicFlags function that skips --atomic when kubedog is enabled - Add handleKubedogFailure function to manually rollback on tracking failure - Update flagsForUpgrade to use new atomic flag handling - Add tests for appendAtomicFlags behavior Now when atomic: true and trackMode: kubedog are both enabled: 1. Helm upgrade runs without --atomic (no internal wait) 2. kubedog tracks resources immediately (users can see logs) 3. If kubedog tracking fails, helmfile manually executes rollback 4. Atomic semantics are preserved Fixes: #2448 Signed-off-by: yxxhero <aiopsclub@163.com>
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com> Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/743ab4eb-0700-4e55-85df-78ed46a50f7c
03fe2ef to
4343f64
Compare
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Problem
When using
atomic: truewithtrackMode: kubedog, the--atomicflag was passed to Helm which caused Helm to wait for resources and rollback internally before helmfile could start kubedog tracking. This prevented users from seeing deployment logs and errors during failed deployments.Solution
Modified helmfile to skip passing
--atomicto Helm when kubedog is enabled, and instead handle the rollback manually if kubedog tracking fails. This preserves atomic semantics while allowing kubedog to track resources.Changes
RollbackReleasemethod tohelmexec.Interfaceand implementation to support manual rollbackappendAtomicFlagsfunction that intelligently skips--atomicwhen kubedog is enabledhandleKubedogFailurefunction to execute rollback when kubedog tracking fails and atomic semantics are enabledflagsForUpgradeto use new atomic flag handlingBehavior
Before:
After:
Testing
TestAppendAtomicFlagswith 7 test casesmake checkpasses (lint + vet)Example
Users can now use this configuration:
And see kubedog tracking output even when deployments fail, with automatic rollback still working.
Fixes #2448