-
Notifications
You must be signed in to change notification settings - Fork 35
karpenter: Add EKS Auto Mode Support #409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
karpenter: Add EKS Auto Mode Support #409
Conversation
6b0de48
to
fa9ecf7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive support for AWS EKS Auto Mode to the Headlamp Karpenter plugin, allowing it to handle different Karpenter deployment types dynamically. The changes enable automatic detection of EKS Auto Mode vs self-installed Karpenter deployments and adapt the UI accordingly.
- Enhanced cloud provider detection to support multiple deployment types (EKS Auto Mode, self-installed, generic)
- Dynamic configuration system that adapts based on detected deployment type
- Improved error handling and user feedback throughout the plugin
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
karpenter/src/hook/useCloudProviderDetection.ts | Enhanced detection logic to identify different Karpenter deployment types and return structured cloud provider information |
karpenter/src/common/cloudProviders.ts | Added deployment-specific configurations for AWS (EKS Auto Mode, self-installed, generic) |
karpenter/src/NodeClass/List.tsx | Updated to handle both string and object cloud provider values with improved error handling |
karpenter/src/NodeClass/Details.tsx | Modified to use dynamic configuration based on deployment type |
karpenter/src/schemas/index.tsx | Updated schema selection to handle new cloud provider object structure |
karpenter/src/mapView.tsx | Enhanced to pass cloud provider context to AWS node class creation |
karpenter/src/helpers/createNodeClassClass.ts | Added static methods for better API integration |
karpenter/src/common/resourceEditor.tsx | Updated schema determination and removed debug logging |
karpenter/src/index.tsx | Added icon registration for generic NodeClass kind |
karpenter/README.md | Updated documentation to reflect EKS Auto Mode support and detection mechanism |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
} | ||
|
||
return 'EC2NodeClass-schema'; | ||
return 'NodeClass-schema'; |
Copilot
AI
Oct 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fallback schema changed from 'EC2NodeClass-schema' to 'NodeClass-schema', but there's no corresponding 'NodeClass-schema' defined in KARPENTER_SCHEMAS. This could cause validation to fail for cases that previously worked.
return 'NodeClass-schema'; | |
return 'EC2NodeClass-schema'; |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@awsfanboy I'm unsure if this is a real issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch @illume . Let me check this soon and update here in the weekend.
Thanks for this. For the lint issue mentioned in the CI check, you can use these:
For the git commits we follow these git commit guidelines. Instead of |
- Add automatic detection for EKS Auto Mode vs self-installed Karpenter - Support both NodeClass (EKS Auto Mode) and EC2NodeClass (self-installed) resources - Implement dynamic configuration system based on detected deployment type - Add AWS_DEPLOYMENT_CONFIGS with complete column definitions for each deployment - Fix map view null reference errors during provider detection - Update README with comprehensive multi-deployment documentation - Add proper error handling and fallbacks throughout the plugin Resolves support for both EKS Auto Mode managed Karpenter and traditional self-installed Karpenter deployments. Signed-off-by: Arshad Zackeriya <[email protected]>
✨ Features: - Support both EKS Auto Mode (eks.amazonaws.com/v1) and self-managed Karpenter (karpenter.k8s.aws/v1) - Automatic deployment type detection via CRD inspection - Dynamic API configuration based on detected Karpenter deployment - Full compatibility with both NodeClass and EC2NodeClass resources 🔧 Technical Changes: - Enhanced useCloudProviderDetection hook with priority-based CRD detection - Added AWS_DEPLOYMENT_CONFIGS for EKS_AUTOMODE and SELF_INSTALLED configurations - Updated mapView to dynamically select correct NodeClass configuration - Modified NodeClass List and Details components to support multi-deployment scenarios - Created createNodeClassClass helper for dynamic resource class generation 🎯 Backward Compatibility: - Maintains existing functionality for self-managed Karpenter deployments - Returns string 'AWS' for SELF_INSTALLED (backward compatibility) - Returns object with deployment type for EKS_AUTOMODE (new feature) �� Bundle Optimization: - Removed all debug console statements for production - Optimized bundle size to 216.78 kB (reduced from ~1.2MB) - Clean, professional error handling without debug artifacts Resolves: EKS Auto Mode NodeClass resource support Tested: Both EKS Auto Mode and self-managed Karpenter clusters Signed-off-by: Arshad Zackeriya <[email protected]>
- Remove unused availableCRDs variable to fix no-unused-vars error - Apply consistent code formatting using prettier - Ensure all linting rules pass for CI checks Signed-off-by: Arshad Zackeriya <[email protected]>
fa9ecf7
to
e4a5de5
Compare
Thank you @illume, I’ve made the changes 👍 |
Enable EKS Auto Mode Support
This pull request introduces comprehensive improvements to how the Headlamp Karpenter plugin detects and handles different Karpenter deployment types (EKS Auto Mode, self-installed), enhancing both the user experience and maintainability. The changes include automatic deployment detection, dynamic configuration and UI adaptation, improved error handling, and updated documentation to reflect these enhancements.
Test
EKS Auto Mode
EKS self-installed Karpenter
Note
I haven’t tested for Azure.