Commit 5fb0f9c
fix(hub_lockdown_capture): Correctly capture per-operator OperatorGroup names and specs
Bug: The role was capturing only the LAST OperatorGroup's name and spec for ALL
operators, causing all operators to appear with 'global-operators' in lockdown JSON.
Root Cause: Lines 92-135 computed _current_og_name and _current_og_spec in
separate loops, overwriting the variables on each iteration. When building
lockdown_operators (line 150-151), all operators received the last iteration's
values.
Fix: Move OG name and spec computation inline as task-level vars within the
operator extraction loop. This ensures each subscription gets its correct OG
based on its namespace.
Impact:
Before: All operators showed 'og_name': 'global-operators', 'og_spec': {}
After: Each operator shows its actual OG (e.g., 'multicluster-engine', 'local-operator-group')
This fix ensures lockdown JSON accurately reflects the deployed cluster state,
enabling correct operator reinstallation from lockdown.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 53ea0bf commit 5fb0f9c
1 file changed
Lines changed: 5 additions & 18 deletions
Lines changed: 5 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
| 92 | + | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | 102 | | |
110 | 103 | | |
111 | 104 | | |
112 | | - | |
| 105 | + | |
113 | 106 | | |
114 | 107 | | |
115 | 108 | | |
| |||
121 | 114 | | |
122 | 115 | | |
123 | 116 | | |
124 | | - | |
| 117 | + | |
125 | 118 | | |
126 | 119 | | |
127 | 120 | | |
128 | 121 | | |
129 | 122 | | |
130 | 123 | | |
131 | 124 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | 125 | | |
139 | 126 | | |
140 | 127 | | |
| |||
0 commit comments