Skip to content

Add autoscaling strategy Invalid conditions #1177

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

learner0810
Copy link
Contributor

@learner0810 learner0810 commented Jun 4, 2025

Pull Request Description

Add error message to PodAutoscaler conditions when PodAutoscaler is using an invalid autoscaling strategy


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.

@learner0810 learner0810 force-pushed the add-valid-autoscaling-strategy-conditions branch from 9fd8fb6 to d1f62df Compare June 4, 2025 09:02
return ctrl.Result{}, r.Client.Status().Update(ctx, &pa)
}

if apimeta.RemoveStatusCondition(&pa.Status.Conditions, "AutoscalingStrategy") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we want to delete a specific AutoscalingStrategy condition here? 🤔

@@ -218,12 +227,6 @@ func (r *PodAutoscalerReconciler) Reconcile(ctx context.Context, req ctrl.Reques
case autoscalingv1alpha1.KPA, autoscalingv1alpha1.APA:
return r.reconcileCustomPA(ctx, pa)
}

newStatus := computeStatus(ctx, pa)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason to remove the logic here?

@Jeffwan
Copy link
Collaborator

Jeffwan commented Jun 11, 2025

@learner0810 hi could you take a look at the comments?

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.

3 participants