Commit 985764b
authored
Kubernetes: check
The first step to deprecate and remove the backend config property.
It's still the only source of truth.
The description in the docs is updated to explain the current behavior
and planned deprecation.
If it does not match the namespace from the current kubeconfig context,
show a warning instructing the user to update kubeconfig.
Migration guide:
* If the property is not set or set to `default` in backend config
and not set or set to `default` in kubeconfig, `default` is used,
no action required
* If the property is set to `ns-a` in both backend config and
kubeconfig, `ns-a` is used, no action required
* If the property is set to `ns-a` in backend config and not set or set
to `ns-b` in kubeconfig, `ns-a` is used, set namespace to `ns-a`
in kubeconfig to prepare for future versions
* In general, it's only safe to remove the property from backend config
if it is equal to `default`, which is a default value
Part-of: #3857namespace in backend config and kubeconfig (#3858)1 parent d2fdd17 commit 985764b
5 files changed
Lines changed: 111 additions & 28 deletions
File tree
- src
- dstack/_internal/core/backends/kubernetes
- tests/_internal/core/backends/kubernetes
Lines changed: 42 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
130 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
131 | 155 | | |
132 | 156 | | |
133 | 157 | | |
| |||
156 | 180 | | |
157 | 181 | | |
158 | 182 | | |
159 | | - | |
| 183 | + | |
160 | 184 | | |
161 | 185 | | |
162 | 186 | | |
| |||
177 | 201 | | |
178 | 202 | | |
179 | 203 | | |
180 | | - | |
| 204 | + | |
181 | 205 | | |
182 | 206 | | |
183 | 207 | | |
| |||
342 | 366 | | |
343 | 367 | | |
344 | 368 | | |
345 | | - | |
| 369 | + | |
346 | 370 | | |
347 | 371 | | |
348 | 372 | | |
349 | | - | |
| 373 | + | |
350 | 374 | | |
351 | 375 | | |
352 | 376 | | |
| |||
395 | 419 | | |
396 | 420 | | |
397 | 421 | | |
398 | | - | |
| 422 | + | |
399 | 423 | | |
400 | 424 | | |
401 | 425 | | |
| |||
412 | 436 | | |
413 | 437 | | |
414 | 438 | | |
415 | | - | |
| 439 | + | |
416 | 440 | | |
417 | 441 | | |
418 | 442 | | |
| |||
422 | 446 | | |
423 | 447 | | |
424 | 448 | | |
425 | | - | |
| 449 | + | |
426 | 450 | | |
427 | 451 | | |
428 | 452 | | |
| |||
450 | 474 | | |
451 | 475 | | |
452 | 476 | | |
453 | | - | |
| 477 | + | |
454 | 478 | | |
455 | 479 | | |
456 | 480 | | |
457 | 481 | | |
458 | 482 | | |
459 | 483 | | |
460 | | - | |
| 484 | + | |
461 | 485 | | |
462 | 486 | | |
463 | 487 | | |
464 | 488 | | |
465 | 489 | | |
466 | 490 | | |
467 | | - | |
| 491 | + | |
468 | 492 | | |
469 | 493 | | |
470 | 494 | | |
| |||
520 | 544 | | |
521 | 545 | | |
522 | 546 | | |
523 | | - | |
| 547 | + | |
524 | 548 | | |
525 | 549 | | |
526 | 550 | | |
| |||
550 | 574 | | |
551 | 575 | | |
552 | 576 | | |
553 | | - | |
| 577 | + | |
554 | 578 | | |
555 | 579 | | |
556 | 580 | | |
557 | 581 | | |
558 | 582 | | |
559 | | - | |
| 583 | + | |
560 | 584 | | |
561 | 585 | | |
562 | 586 | | |
| |||
591 | 615 | | |
592 | 616 | | |
593 | 617 | | |
594 | | - | |
| 618 | + | |
595 | 619 | | |
596 | 620 | | |
597 | 621 | | |
| |||
650 | 674 | | |
651 | 675 | | |
652 | 676 | | |
653 | | - | |
| 677 | + | |
654 | 678 | | |
655 | 679 | | |
656 | 680 | | |
| |||
671 | 695 | | |
672 | 696 | | |
673 | 697 | | |
674 | | - | |
| 698 | + | |
675 | 699 | | |
676 | 700 | | |
677 | 701 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
32 | 42 | | |
| 43 | + | |
| 44 | + | |
33 | 45 | | |
34 | 46 | | |
35 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
19 | 64 | | |
20 | 65 | | |
21 | | - | |
22 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
23 | 70 | | |
24 | 71 | | |
25 | 72 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
0 commit comments