Commit e5ed352
committed
Allow adding default labels to Openshift allocations
All Openshift projects created through Coldfront will now have an additional label:
`'nerc.mghpcc.org/allow-unencrypted-routes': "true"`
`validate_allocations` has also been changed to ensure all current Openshift projects contain a few default labels:
```
PROJECT_DEFAULT_LABELS = {
'opendatahub.io/dashboard': "true",
'modelmesh-enabled': "true",
'nerc.mghpcc.org/allow-unencrypted-routes': "true"
}
```
Implementing this required code in the Openshift allocator to
interact with the Namespace API. For reasons not entirely
clear in the documentation, it is not possible
change a Project’s labels directly. This is only possible
through the Namespace API.1 parent c9ef7a1 commit e5ed352
File tree
3 files changed
+69
-5
lines changed- src/coldfront_plugin_cloud
- management/commands
- tests/functional/openshift
3 files changed
+69
-5
lines changedLines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
55 | 71 | | |
56 | 72 | | |
57 | 73 | | |
| |||
183 | 199 | | |
184 | 200 | | |
185 | 201 | | |
| 202 | + | |
186 | 203 | | |
187 | 204 | | |
188 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
| |||
146 | 154 | | |
147 | 155 | | |
148 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
149 | 160 | | |
150 | 161 | | |
151 | 162 | | |
| |||
238 | 249 | | |
239 | 250 | | |
240 | 251 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | 252 | | |
246 | 253 | | |
247 | 254 | | |
248 | | - | |
| 255 | + | |
249 | 256 | | |
250 | 257 | | |
251 | 258 | | |
| |||
323 | 330 | | |
324 | 331 | | |
325 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
326 | 342 | | |
327 | 343 | | |
328 | 344 | | |
| |||
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
0 commit comments