-
Notifications
You must be signed in to change notification settings - Fork 214
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
Autoscaling Workflow Enhancement - Part 2 #94
Conversation
} else if currentReplicas > pa.Spec.MaxReplicas { | ||
desiredReplicas = pa.Spec.MaxReplicas | ||
} else if currentReplicas < minReplicas { | ||
desiredReplicas = minReplicas | ||
} else { | ||
// TODO: fix the compute replicas interface. | ||
kpaScaler, err := scaler.NewKpaAutoscaler( |
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.
should we move the initialization earlier? for example in reconciler new, here is the reconcile workflow and we should use the reference directly.
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.
Fix it on newest commit 562c5d1
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.
it looks good to me
besides the initialization part, rest looks good to me |
1. Relocate NewKPAAutoscaler from reconcileKPA to newReconciler. 2. remove attribute podCounter from KpaAutoscaler; dynamically fetch up-to-date readyPodCount in reconceilKPA and pass to Scale Algorithm.
a31c0e0
to
562c5d1
Compare
@kr11 It looks good to me and feel free to merge it |
* add autoscaler pipeline part 2 * refactor the KPA initialization: 1. Relocate NewKPAAutoscaler from reconcileKPA to newReconciler. 2. remove attribute podCounter from KpaAutoscaler; dynamically fetch up-to-date readyPodCount in reconceilKPA and pass to Scale Algorithm.
Pull Request Description
Major Updates:
appsv1.Deployment
instead of the generalizedautoscalingv1.Scale
. For a detailed discussion, refer to [issue AutoScaler Workflow Part 2: Areas for Optimization and Completion #95].NewDefaultDeciderKpaSpec()
function to apply default values.PodAutoscalerReconciler::Reconcile
: fix RBAC error about Event, add event viar.EventRecorder.Eventf
to confirm the normal running of KPA Reconciler. Relevant discussion in [issue Add make docker-build in Integration Testing #93].Additional Updates:
readyPodsCount
and a pre-constructedDeciderKpaSpec
for initializing a new KPA autoscaler.DeciderSpec
has been renamed toDeciderKpaSpec
, indicating that this specification is exclusively used by KPA.Open Issues and Enhancements:
For unresolved issues and potential enhancements, please see the discussion in [issue #95].
This update aims to enhance the scalability and reliability of our autoscaling processes, ensuring better performance and maintainability. Your feedback and contributions to these changes are welcome.
Related Issues
Resolves: [issue #95]
Contribution Guidelines (Expand for Details)
We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:
Pull Request Title Format
Your PR title should start with one of these prefixes to indicate the nature of the change:
[Bug]
: Corrections to existing functionality[CI]
: Changes to build process or CI pipeline[Docs]
: Updates or additions to documentation[API]
: Modifications to aibrix's API or interface[CLI]
: Changes or additions to the Command Line Interface[Misc]
: For changes not covered above (use sparingly)Note: For changes spanning multiple categories, use multiple prefixes in order of importance.
Submission Checklist
By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.