Skip to content

Feature openshift ai dashboard scaling#26

Merged
treddy08 merged 5 commits into
mainfrom
feature-openshift-ai-dashboard-scaling
May 19, 2026
Merged

Feature openshift ai dashboard scaling#26
treddy08 merged 5 commits into
mainfrom
feature-openshift-ai-dashboard-scaling

Conversation

@treddy08
Copy link
Copy Markdown
Contributor

No description provided.

treddy08 added 5 commits May 19, 2026 12:52
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.
@treddy08 treddy08 merged commit 2b25d5c into main May 19, 2026
1 check passed
@treddy08 treddy08 deleted the feature-openshift-ai-dashboard-scaling branch May 19, 2026 03:08
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.

1 participant