Commit 2136387
Treat unauthenticated backends as routable in vMCP health (#4866)
* Treat unauthenticated backends as routable in vMCP health monitoring
Backends returning 401 due to missing user-level OAuth tokens (e.g.,
upstreamInject auth) are reachable and running — they just require
per-request user auth. Health probes lack user tokens, so they correctly
detect the unauthenticated state, but this should not cause PhaseFailed.
Introduce Summary.Routable() (healthy + unauthenticated) and use it for
phase determination, BackendCount, and status messages across the health
monitor, operator controller, and status collector. Give
BackendUnauthenticated its own CRD status "unauthenticated" instead of
mapping to "unavailable".
Fixes #4824
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Address review feedback on unauthenticated backends PR
- Fix godoc: move pluralBackend() above formatBackendMessage doc comment
- Fix grammar: add pluralRequire()/quantifyBackends() helpers for
correct subject-verb agreement ("1 requires" not "1 require") and
drop "All" prefix for singular counts
- Fix /status endpoint: treat BackendUnauthenticated as routable,
consistent with health monitor
- Rename condition Reason from AllBackendsHealthy to AllBackendsRoutable
(v1alpha1, no stability guarantee)
- Add TestBuildConditions cases for unauthenticated branches
- Regenerate CRD manifests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Regenerate CRD docs for BackendCount description update
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Update TODO to reference follow-up issue #4920
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Rename NoHealthyBackends condition reason to NoRoutableBackends
Aligns with the AllBackendsHealthy → AllBackendsRoutable rename
already applied to the ready-phase reason string.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 4ebcf3b commit 2136387
14 files changed
Lines changed: 218 additions & 72 deletions
File tree
- cmd/thv-operator
- api/v1alpha1
- controllers
- pkg/virtualmcpserverstatus
- deploy/charts/operator-crds
- files/crds
- templates
- docs/operator
- pkg/vmcp
- discovery
- health
- server
- status
- test/e2e/thv-operator/virtualmcp
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| |||
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
225 | | - | |
226 | | - | |
| 226 | + | |
| 227 | + | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| |||
Lines changed: 14 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1514 | 1514 | | |
1515 | 1515 | | |
1516 | 1516 | | |
1517 | | - | |
1518 | | - | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
1519 | 1522 | | |
1520 | 1523 | | |
1521 | 1524 | | |
1522 | 1525 | | |
1523 | | - | |
1524 | | - | |
| 1526 | + | |
| 1527 | + | |
1525 | 1528 | | |
1526 | 1529 | | |
1527 | 1530 | | |
| |||
1532 | 1535 | | |
1533 | 1536 | | |
1534 | 1537 | | |
1535 | | - | |
| 1538 | + | |
1536 | 1539 | | |
1537 | 1540 | | |
1538 | 1541 | | |
| |||
1542 | 1545 | | |
1543 | 1546 | | |
1544 | 1547 | | |
1545 | | - | |
1546 | | - | |
| 1548 | + | |
| 1549 | + | |
1547 | 1550 | | |
1548 | 1551 | | |
1549 | | - | |
| 1552 | + | |
1550 | 1553 | | |
1551 | 1554 | | |
1552 | 1555 | | |
| |||
1560 | 1563 | | |
1561 | 1564 | | |
1562 | 1565 | | |
1563 | | - | |
| 1566 | + | |
1564 | 1567 | | |
1565 | 1568 | | |
1566 | 1569 | | |
1567 | 1570 | | |
1568 | 1571 | | |
1569 | 1572 | | |
1570 | | - | |
1571 | | - | |
| 1573 | + | |
| 1574 | + | |
1572 | 1575 | | |
1573 | 1576 | | |
1574 | 1577 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
216 | 217 | | |
217 | | - | |
218 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | | - | |
| 223 | + | |
222 | 224 | | |
223 | 225 | | |
224 | 226 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2142 | 2142 | | |
2143 | 2143 | | |
2144 | 2144 | | |
2145 | | - | |
2146 | | - | |
| 2145 | + | |
| 2146 | + | |
2147 | 2147 | | |
2148 | 2148 | | |
2149 | 2149 | | |
| |||
2256 | 2256 | | |
2257 | 2257 | | |
2258 | 2258 | | |
2259 | | - | |
| 2259 | + | |
2260 | 2260 | | |
2261 | 2261 | | |
2262 | 2262 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2145 | 2145 | | |
2146 | 2146 | | |
2147 | 2147 | | |
2148 | | - | |
2149 | | - | |
| 2148 | + | |
| 2149 | + | |
2150 | 2150 | | |
2151 | 2151 | | |
2152 | 2152 | | |
| |||
2259 | 2259 | | |
2260 | 2260 | | |
2261 | 2261 | | |
2262 | | - | |
| 2262 | + | |
2263 | 2263 | | |
2264 | 2264 | | |
2265 | 2265 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
550 | 557 | | |
551 | 558 | | |
552 | 559 | | |
| |||
557 | 564 | | |
558 | 565 | | |
559 | 566 | | |
560 | | - | |
561 | | - | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
562 | 570 | | |
563 | | - | |
564 | | - | |
| 571 | + | |
| 572 | + | |
565 | 573 | | |
566 | 574 | | |
567 | 575 | | |
| |||
592 | 600 | | |
593 | 601 | | |
594 | 602 | | |
595 | | - | |
| 603 | + | |
596 | 604 | | |
597 | 605 | | |
598 | 606 | | |
599 | 607 | | |
600 | 608 | | |
| 609 | + | |
| 610 | + | |
601 | 611 | | |
602 | 612 | | |
603 | 613 | | |
604 | | - | |
| 614 | + | |
605 | 615 | | |
606 | 616 | | |
607 | 617 | | |
| |||
610 | 620 | | |
611 | 621 | | |
612 | 622 | | |
613 | | - | |
| 623 | + | |
| 624 | + | |
614 | 625 | | |
615 | 626 | | |
616 | | - | |
| 627 | + | |
617 | 628 | | |
618 | 629 | | |
619 | 630 | | |
| |||
629 | 640 | | |
630 | 641 | | |
631 | 642 | | |
632 | | - | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
633 | 653 | | |
634 | 654 | | |
635 | | - | |
636 | | - | |
637 | | - | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
638 | 658 | | |
639 | 659 | | |
640 | | - | |
| 660 | + | |
641 | 661 | | |
642 | 662 | | |
643 | | - | |
| 663 | + | |
644 | 664 | | |
645 | 665 | | |
646 | 666 | | |
| |||
712 | 732 | | |
713 | 733 | | |
714 | 734 | | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
715 | 759 | | |
716 | 760 | | |
717 | 761 | | |
| |||
821 | 865 | | |
822 | 866 | | |
823 | 867 | | |
824 | | - | |
825 | | - | |
| 868 | + | |
| 869 | + | |
826 | 870 | | |
827 | 871 | | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
828 | 878 | | |
829 | | - | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
830 | 882 | | |
831 | 883 | | |
832 | 884 | | |
833 | | - | |
| 885 | + | |
834 | 886 | | |
835 | | - | |
836 | | - | |
| 887 | + | |
| 888 | + | |
837 | 889 | | |
838 | 890 | | |
839 | 891 | | |
| |||
0 commit comments