yxxhero
6e21671228
feat: kubedog integration with unified resource handling (#2383)
* feat: add kubedog-based resource tracking integration
Add kubedog tracking as an alternative to Helm's --wait flag with:
- Real-time deployment progress tracking
- Container log streaming
- Fine-grained resource filtering (trackKinds/skipKinds/trackResources)
Features:
- New pkg/resource package for unified manifest parsing and filtering
- New pkg/kubedog package wrapping kubedog library
- CLI flags: --track-mode, --track-timeout, --track-logs
- Helmfile YAML support for trackMode, trackTimeout, trackLogs, trackKinds, skipKinds, trackResources
- Case-insensitive kind matching for filtering
- Multi-context support with proper kubeconfig/kubeContext handling
Tracking supports: Deployment, StatefulSet, DaemonSet, Job
Resource filtering priority (highest to lowest):
1. trackResources - explicit resource whitelist
2. skipKinds - blacklist specific kinds
3. trackKinds - whitelist specific kinds
Integration:
- Disable Helm --wait when using kubedog tracking
- Track after successful Helm sync/apply
- Respect release.Namespace as fallback for resources without namespace
- Use getKubeContext() for correct cluster targeting
Tests:
- Unit tests for resource filtering and kubedog options
- Integration test with httpbin chart
- E2E snapshot tests for YAML serialization
- Documentation in docs/advanced-features.md
Signed-off-by: yxxhero <aiopsclub@163.com>
* fix: address PR #2383 review comments (round 4)
1. resource/filter.go: Skip empty whitelist entries in matchWhitelist
- At least one field (kind/name/namespace) must be specified
- Prevents matching all resources with empty TrackResources entries
2. config/apply.go: Add ValidateConfig for track-mode validation
- Validate --track-mode must be 'helm' or 'kubedog'
- Reject invalid values like --track-mode foo
3. config/sync.go: Add ValidateConfig for track-mode validation
- Same validation as apply command
- Ensures consistent behavior across commands
Signed-off-by: yxxhero <aiopsclub@163.com>
---------
Signed-off-by: yxxhero <aiopsclub@163.com>
2026-03-02 17:15:12 +08:00
..
2025-11-19 07:49:30 +08:00
2025-11-19 07:49:30 +08:00
2025-03-08 07:43:21 -06:00
2025-05-30 11:45:28 +08:00
2025-03-08 07:43:21 -06:00
2025-11-19 07:49:30 +08:00
2025-07-28 16:10:25 -04:00
2025-03-08 07:43:21 -06:00
2025-01-22 20:42:33 +08:00
2025-02-05 21:42:05 +08:00
2026-02-12 20:20:43 +08:00
2026-02-14 09:31:53 +08:00
2025-11-22 09:27:51 +08:00
2026-02-22 14:13:05 +05:30
2025-11-21 08:32:54 +08:00
2025-11-21 08:32:54 +08:00
2025-11-21 08:32:54 +08:00
2025-11-22 09:27:51 +08:00
2025-11-25 09:19:41 +08:00
2025-11-27 22:13:03 +08:00
2026-01-16 20:32:33 +08:00
2026-01-18 14:04:54 +08:00
2026-01-18 13:59:55 +08:00
2026-02-22 09:21:46 +08:00
2026-02-25 12:13:20 +08:00
2026-02-26 07:47:39 +08:00
2026-02-28 09:23:04 +08:00
2026-03-02 17:15:12 +08:00
2025-11-27 22:13:03 +08:00
2026-01-23 12:02:58 +08:00
2025-03-08 07:43:21 -06:00
2025-03-08 07:43:21 -06:00
2025-05-30 11:45:28 +08:00
2025-02-14 20:49:07 +08:00
2026-01-21 19:55:56 -05:00
2026-02-16 09:45:10 +08:00
2025-03-08 07:43:21 -06:00
2026-01-29 19:15:44 -05:00
2025-11-19 07:49:30 +08:00
2025-11-19 07:49:30 +08:00
2025-11-19 07:49:30 +08:00
2025-11-19 07:49:30 +08:00
2025-11-19 07:49:30 +08:00
2025-11-19 07:49:30 +08:00
2025-11-19 07:49:30 +08:00
2025-11-28 08:43:54 +08:00
2025-11-19 07:49:30 +08:00
2025-11-19 07:49:30 +08:00
2024-11-06 08:12:20 +08:00
2025-11-19 07:49:30 +08:00
2026-02-12 20:20:43 +08:00
2026-02-14 09:31:53 +08:00
2025-11-25 09:19:41 +08:00
2026-02-22 14:13:05 +05:30
2025-11-21 08:32:54 +08:00
2025-11-21 08:32:54 +08:00
2025-11-21 08:32:54 +08:00
2025-11-22 09:27:51 +08:00
2025-11-25 09:19:41 +08:00
2025-11-27 22:13:03 +08:00
2026-01-16 20:32:33 +08:00
2026-01-18 14:04:54 +08:00
2026-01-18 13:59:55 +08:00
2026-02-22 09:21:46 +08:00
2026-02-25 12:13:20 +08:00
2026-02-26 07:47:39 +08:00
2026-02-28 09:23:04 +08:00
2026-03-02 17:15:12 +08:00
2025-11-19 07:49:30 +08:00
2025-11-27 22:13:03 +08:00
2025-11-19 07:49:30 +08:00
2025-11-19 07:49:30 +08:00
2025-11-28 08:43:54 +08:00
2025-11-19 07:49:30 +08:00
2025-11-19 07:49:30 +08:00
2025-11-19 07:49:30 +08:00
2026-02-16 09:45:10 +08:00
2025-11-19 07:49:30 +08:00
2025-11-19 07:49:30 +08:00