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

feat: support granular aggressive mode config #458

Merged
merged 3 commits into from
Mar 3, 2025

Conversation

vladklokun
Copy link
Contributor

@vladklokun vladklokun commented Feb 26, 2025

This PR adds support for an updated granular aggressive mode config in scheduled rebalancing. We intend to replace the legacy bool-based aggressiveMode flag by this config.

@vladklokun vladklokun self-assigned this Feb 26, 2025
@vladklokun vladklokun force-pushed the feat-support-granular-aggressive-mode-config branch from b07ca31 to 83e6dd1 Compare February 28, 2025 12:04
@vladklokun vladklokun marked this pull request as ready for review February 28, 2025 13:55
@vladklokun vladklokun requested a review from a team as a code owner February 28, 2025 13:55
@vladklokun vladklokun changed the title Draft: feat: support granular aggressive mode config feat: support granular aggressive mode config Feb 28, 2025
@vladklokun vladklokun merged commit 83288cf into master Mar 3, 2025
10 checks passed
@vladklokun vladklokun deleted the feat-support-granular-aggressive-mode-config branch March 3, 2025 10:12
Comment on lines -53 to +56
"ignoreLocalPersistentVolumes": true
"ignoreLocalPersistentVolumes": true,
"ignoreProblemJobPods": true,
"ignoreProblemRemovalDisabledPods": true,
"ignoreProblemPodsWithoutController": true
Copy link
Contributor

Choose a reason for hiding this comment

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

could you fix indentation here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I’ll make the changes you've suggested in a separate PR, since this one has already been merged. Sounds fair?

Comment on lines 45 to +49
resource.TestCheckResourceAttr("castai_rebalancing_schedule.test", "launch_configuration.0.aggressive_mode", "true"),
resource.TestCheckResourceAttr("castai_rebalancing_schedule.test", "launch_configuration.0.aggressive_mode_config.0.ignore_local_persistent_volumes", "true"),
resource.TestCheckResourceAttr("castai_rebalancing_schedule.test", "launch_configuration.0.aggressive_mode_config.0.ignore_problem_job_pods", "true"),
resource.TestCheckResourceAttr("castai_rebalancing_schedule.test", "launch_configuration.0.aggressive_mode_config.0.ignore_problem_removal_disabled_pods", "true"),
resource.TestCheckResourceAttr("castai_rebalancing_schedule.test", "launch_configuration.0.aggressive_mode_config.0.ignore_problem_pods_without_controller", "true"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you move ImportState test cases to the end? That way they will test new fields you added plus verify that after import the terraform plan has empty output.

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