Skip to content
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

Add kpa scale algorithm implementation #87

Merged
merged 5 commits into from
Aug 20, 2024

Conversation

kr11
Copy link
Collaborator

@kr11 kr11 commented Aug 19, 2024

Pull Request Description

Pull Request Description

Added a new kpa scale algorithm under the pkg/controller/podautoscaler/scaler directory and included a test in kpa_test.go.

Note that, some temporary data structures were added to tmp_types.go to facilitate testing before integration with the main process.

Related Issues

Resolves: #82

Important: Before submitting, please complete the description above and review the checklist below.

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

  • PR title includes appropriate prefix(es)
  • Changes are clearly explained in the PR description
  • New and existing tests pass successfully
  • Code adheres to project style and best practices
  • Documentation updated to reflect changes (if applicable)
  • Thorough testing completed, no regressions introduced

By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.

@kr11 kr11 self-assigned this Aug 19, 2024
@Jeffwan
Copy link
Collaborator

Jeffwan commented Aug 19, 2024

rest part looks good to me

@kr11 kr11 changed the title Kangrong/features/kpa implementations Add kpa scale algorithm implementation Aug 19, 2024
@kr11 kr11 force-pushed the kangrong/features/kpa_implementations branch from d7b5bd1 to db0da86 Compare August 19, 2024 08:20
1. Added window and timeWindow class.
2. Abstracted the Autoscaler class to encapsulate configuration and state information for scalers. All scalers, such as KpaScaler, now include an Autoscaler attribute.
3. Introduced the Scaler interface, which includes the Scale method. All scalers, including KpaScaler, are required to implement the Scaler.Scale method.
@kr11 kr11 force-pushed the kangrong/features/kpa_implementations branch from b9b0077 to ee8b039 Compare August 20, 2024 02:16
@kr11 kr11 merged commit 197ded0 into main Aug 20, 2024
1 check passed
@kr11 kr11 deleted the kangrong/features/kpa_implementations branch August 20, 2024 03:12
gangmuk pushed a commit that referenced this pull request Jan 25, 2025
* add a demo KPA scale policy implementation.

* add some docstring

* refact kpa code, move temporary data structure outside kpa.go

* refact KPA, extract interface

1. Added window and timeWindow class.
2. Abstracted the Autoscaler class to encapsulate configuration and state information for scalers. All scalers, such as KpaScaler, now include an Autoscaler attribute.
3. Introduced the Scaler interface, which includes the Scale method. All scalers, including KpaScaler, are required to implement the Scaler.Scale method.

* fix go imports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor the autoscaling controller to support customized pod autoscaler
2 participants