feat: enhance cloudflared connector with HPA support and resource management #230
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#128
This PR introduces two key enhancements to the cloudflared connector management:
🚀 Features
1. HPA (Horizontal Pod Autoscaler) Support
CLOUDFLARED_REPLICA_COUNT < 0, the controller will not modify deployment replicas2. Resource Requirements Management
CLOUDFLARED_RESOURCESenvironment variable3. Code Quality Improvements
slicesEqualfunction with Go's built-inslices.EqualbuildCloudflaredCommandtogetCloudflaredCommandfor clarity🔧 Technical Changes
Files Modified:
pkg/controller/controlled-cloudflared-connector.go: Core logic enhancementspkg/controller/controlled-cloudflared-connector_test.go: Updated tests and removed obsolete test casesKey Improvements:
📋 Usage Examples
Enable HPA support:
Configure resources:
This enhancement provides more flexibility for users who want to manage cloudflared deployments with advanced Kubernetes features while maintaining simplicity for basic use cases.