Commit 9e2efc8
authored
Dynamically allow tenancies access to Machines, Volumes, Kubernetes and Kubernetes Apps based on discovery of the portal-internal network (#425)
### Internal network is a shared network
Add a new config option to the openstack provider -
`internalNetIsShared` - which allows a network shared into a project to
be used as the portal-internal network.
If `internalNetIsShared` is True, shared networks that are available to
the project and have the `portal-internal` tag are preferentially chosen
as the portal-internal network over those that are owned by the project.
There are no changes to the default behaviour, and projects that do not
have access to a **shared** network with the `portal-internal` tag will
use an existing network owned by the project if it is available, or a
new network will be created if `createInternalNet` is True (the
default).
### Internal network doesn't exist
If the internal network can not be detected and `createInternalNet` is
False, the capabilites returned for a scoped session are updated to
disable machines, volumes, Kubernetes and Kubernetes apps API endpoints,
because creating resources of these types relies on the internal network
being determined. The UI reacts to the disabling of these endpoints by
removing the relevant items from the sidebar (Advanced>Machines,
Volumes) or from the platforms catalogue (Kubernetes and Kubernetes
apps).
### Machines functionality disabled
The "machines" functionality may be disabled for the OpenStack provider
by setting `supportsMachines` to False (default is True). This will
disable operations on machines and volumes across all projects, and will
cause the "advanced" menu element to be removed from the UI.
### Dynamic project capabilities vs configured capabilities
Configuration options remain for enabling and disabling CaaS, Kubernetes
and Kubernetes apps, alongside a new configuration option for Machines.
If a capability is disabled in config, it will not be enabled
dynamically on a per-tenant basis. If a capability is enabled in config,
it may be disabled on a per-tenant basis if the prerequisites for the
capability are not present (for example, the internal network was not
able to be determined for a project, so machines, volumes, Kubernetes
and Kubernetes Apps are dynamically disabled even though they are
enabled in configuration).1 parent 3ccaa68 commit 9e2efc8
File tree
9 files changed
+482
-213
lines changed- api/azimuth
- provider
- openstack
- chart
- files/api/settings
- tests/__snapshot__
- ui/src
- components/pages/tenancy
- redux/tenancies
9 files changed
+482
-213
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
20 | 29 | | |
21 | 30 | | |
22 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
| 151 | + | |
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
| |||
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
| 162 | + | |
158 | 163 | | |
159 | 164 | | |
160 | 165 | | |
| 166 | + | |
161 | 167 | | |
162 | 168 | | |
163 | 169 | | |
164 | 170 | | |
165 | 171 | | |
| 172 | + | |
166 | 173 | | |
167 | 174 | | |
168 | 175 | | |
169 | 176 | | |
170 | 177 | | |
| 178 | + | |
171 | 179 | | |
172 | 180 | | |
173 | 181 | | |
| |||
177 | 185 | | |
178 | 186 | | |
179 | 187 | | |
| 188 | + | |
180 | 189 | | |
181 | 190 | | |
182 | 191 | | |
| 192 | + | |
183 | 193 | | |
184 | 194 | | |
185 | 195 | | |
| |||
198 | 208 | | |
199 | 209 | | |
200 | 210 | | |
| 211 | + | |
201 | 212 | | |
202 | 213 | | |
203 | 214 | | |
| 215 | + | |
204 | 216 | | |
205 | 217 | | |
206 | 218 | | |
207 | 219 | | |
208 | 220 | | |
209 | 221 | | |
| 222 | + | |
210 | 223 | | |
211 | 224 | | |
212 | 225 | | |
| 226 | + | |
213 | 227 | | |
214 | 228 | | |
215 | 229 | | |
| |||
221 | 235 | | |
222 | 236 | | |
223 | 237 | | |
| 238 | + | |
224 | 239 | | |
225 | 240 | | |
226 | 241 | | |
| 242 | + | |
227 | 243 | | |
228 | 244 | | |
229 | 245 | | |
| |||
243 | 259 | | |
244 | 260 | | |
245 | 261 | | |
| 262 | + | |
246 | 263 | | |
247 | 264 | | |
248 | 265 | | |
| 266 | + | |
249 | 267 | | |
250 | 268 | | |
251 | 269 | | |
252 | 270 | | |
253 | 271 | | |
254 | 272 | | |
255 | 273 | | |
| 274 | + | |
256 | 275 | | |
257 | 276 | | |
258 | 277 | | |
| 278 | + | |
259 | 279 | | |
260 | 280 | | |
261 | 281 | | |
| |||
281 | 301 | | |
282 | 302 | | |
283 | 303 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
289 | 309 | | |
290 | | - | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
291 | 323 | | |
292 | 324 | | |
293 | 325 | | |
| |||
460 | 492 | | |
461 | 493 | | |
462 | 494 | | |
463 | | - | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
464 | 501 | | |
| 502 | + | |
465 | 503 | | |
466 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
467 | 513 | | |
468 | 514 | | |
| 515 | + | |
469 | 516 | | |
470 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
471 | 521 | | |
472 | 522 | | |
473 | 523 | | |
| |||
485 | 535 | | |
486 | 536 | | |
487 | 537 | | |
| 538 | + | |
488 | 539 | | |
489 | 540 | | |
490 | 541 | | |
491 | 542 | | |
492 | 543 | | |
493 | | - | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
494 | 549 | | |
| 550 | + | |
495 | 551 | | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
496 | 557 | | |
497 | | - | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
498 | 562 | | |
499 | 563 | | |
500 | 564 | | |
| |||
0 commit comments