-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
What happened:
Multiple components in the Karmada codebase contain panic() calls that can cause the entire application to crash when errors occur. This affects webhook components, controller-manager, status controllers, search proxy components, and various utility functions. When these panic() calls are triggered, the entire Karmada component stops running, leading to service unavailability.
What you expected to happen:
Applications should handle errors gracefully with proper logging and error reporting, allowing the system to continue operating even when individual operations fail. Error conditions should be logged for debugging purposes and appropriate error responses should be returned to clients.
How to reproduce it (as minimally and precisely as possible):
- Deploy Karmada with components that contain panic() calls (webhook, controller-manager, detector, etc.)
- Trigger error conditions such as:
- Invalid configuration in webhook validation
- Network failures during controller operations
- Unexpected status values in status processing
- File system errors in utility functions
- Observe application crashes instead of graceful error handling
- Check logs for panic stack traces
Anything else we need to know?:
- This affects multiple components: webhook, controller-manager, detector, status controllers, search proxy, and utilities
- The issue was identified during code quality review and affects production reliability
- Some panic() calls were in mock/testing code which is intentional and should not be changed
- This can lead to cascading failures in multi-cluster environments
- Panic crashes make it difficult to implement proper retry mechanisms and circuit breakers
Environment:
- Karmada version: All versions (ongoing issue)
- kubectl-karmada or karmadactl version (the result of kubectl-karmada version or karmadactl version): All versions
- Others: This is a code-level issue affecting all deployment environments, including production clusters, development setups, and CI/CD pipelines
Metadata
Metadata
Assignees
Labels
Type
Projects
Status