Feature openshift ai dashboard scaling#26
Merged
Conversation
Add support for scaling the rhods-dashboard deployment with automatic management state transition to prevent operator reconciliation. New variables: - ocp4_workload_openshift_ai_scale_dashboard: Enable/disable scaling (default: false) - ocp4_workload_openshift_ai_dashboard_replicas: Replica count (default: 2) When scaling is enabled: 1. Dashboard deployment is scaled to specified replica count 2. Dashboard component in DataScienceCluster CR is set to Unmanaged This is particularly useful for SNO clusters where 1 replica is preferred to avoid CPU resource constraints.
Move dashboard scaling tasks to execute BEFORE waiting for DataScienceCluster ready state. This prevents the playbook from hanging when dashboard pods are stuck pending due to resource constraints. Execution order: 1. Create DataScienceCluster (operator creates dashboard with 2 replicas) 2. Wait for dashboard deployment to exist (if scaling enabled) 3. Scale dashboard deployment to desired replica count 4. Set dashboard component to Unmanaged 5. Wait for DataScienceCluster to reach Ready state This ensures SNO clusters with limited resources don't get stuck waiting for a dashboard deployment that can never reach 2/2 ready.
Consolidate the three dashboard scaling tasks into a single block with one when condition for cleaner code organization. Changes: - Wrap tasks in a block with descriptive name - Move when condition from individual tasks to block level - No functional changes, purely organizational improvement
Only scale the dashboard deployment and set it to Unmanaged if the current replica count differs from the desired replica count. Changes: - Capture current replica count from dashboard deployment - Compare current vs desired replica count - Only execute scaling and management state change if different This prevents unnecessary changes when the deployment already has the desired replica count, improving playbook idempotency.
Remove unnecessary set_fact task and use the registered deployment variable directly in when conditions with array syntax. Changes: - Remove intermediate variable creation - Use r_dashboard_deployment.resources[0].spec.replicas directly - Convert when conditions to array format Cleaner code with no functional changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.