helmfile/pkg/kubedog
yxxhero 7c215f6451 fix: address PR review comments
Addresses all review comments from PR #2446:

1. Add validation for QPS and Burst values
   - QPS must be > 0
   - Burst must be >= 1
   - Returns clear error messages for invalid values

2. Fix client config loading
   - Use clientcmd.NewDefaultClientConfigLoadingRules() for proper fallback
   - Only override ExplicitPath when kubeconfig is provided
   - Ensures standard env var handling and ~/.kube/config fallback

3. Improve cache locking
   - Use double-check locking pattern to avoid holding mutex during client creation
   - Reduces contention when multiple goroutines create clients concurrently

4. Add comprehensive tests
   - Test validation of invalid QPS values
   - Test validation of invalid Burst values
   - Test successful creation with valid values
   - Ensure error messages are descriptive

5. Fix documentation link
   - Updated Kubernetes client-go rate limiting link to point to correct rest.Config documentation
   - Previous link pointed to API server event rate limiting

All tests pass and code quality checks succeed.

Signed-off-by: yxxhero <aiopsclub@163.com>
2026-03-03 08:20:12 +08:00
..
options.go fix: configure kubedog rate limiter to prevent context cancellation 2026-03-03 08:08:42 +08:00
tracker.go fix: address PR review comments 2026-03-03 08:20:12 +08:00
tracker_test.go fix: address PR review comments 2026-03-03 08:20:12 +08:00