Skip to content

Commit 3f97871

Browse files
committed
chore: Support sas-workload-orchestrator ClusterRoleBinding location change (PSCLOUD-289)
1 parent 3fa44d8 commit 3f97871

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

roles/vdm/tasks/workload_orchestrator.yaml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,60 @@
55
# This file contains the workload orchestrator tasks for the vdm role.
66
# It is included from main.yaml to manage workload orchestration for the deployment.
77

8+
# Workload Orchestrator Overlay Handling
9+
10+
# Check if cluster-role exists in the orchestrator overlay
11+
- name: Check existence of orchestrator cluster-role
12+
stat:
13+
path: "sas-bases/overlays/sas-workload-orchestrator/cluster-role"
14+
register: orchestrator_cluster_role
15+
tags:
16+
- install
17+
- uninstall
18+
- update
19+
20+
# Check if cluster-role exists in the orchestrator-server overlay
21+
- name: Check existence of orchestrator-server cluster-role
22+
stat:
23+
path: "sas-bases/overlays/sas-workload-orchestrator-server/cluster-role"
24+
register: orchestrator_server_cluster_role
25+
tags:
26+
- install
27+
- uninstall
28+
- update
29+
30+
- name: Set orchestrator resources list
31+
set_fact:
32+
orchestrator_resources: >-
33+
{{
34+
[
35+
'overlays/sas-workload-orchestrator/cluster-role'
36+
if orchestrator_cluster_role.stat.exists | default(false)
37+
else 'overlays/sas-workload-orchestrator'
38+
]
39+
+
40+
(
41+
['overlays/sas-workload-orchestrator-server/cluster-role']
42+
if orchestrator_server_cluster_role.stat.exists | default(false)
43+
else []
44+
)
45+
}}
46+
tags:
47+
- install
48+
- uninstall
49+
- update
50+
51+
852
# Add overlay for enabling the SAS Workload Orchestrator if enabled and cadence is recent
953
- name: Workload Orchestrator - Configure SAS Workload Orchestrator Service Account
1054
overlay_facts:
1155
cadence_name: "{{ V4_CFG_CADENCE_NAME }}"
1256
cadence_number: "{{ V4_CFG_CADENCE_VERSION }}"
1357
existing: "{{ vdm_overlays }}"
1458
add:
15-
- { resources: overlays/sas-workload-orchestrator, min: "2023.08", vdm: false }
59+
- resources: "{{ orchestrator_resources | join(',') }}"
60+
min: "2023.08"
61+
vdm: false
1662
when:
1763
# Only run if workload orchestrator is enabled
1864
- V4_WORKLOAD_ORCHESTRATOR_ENABLED

0 commit comments

Comments
 (0)