Commit 20ced20
Add Redis Cluster mode support to auth server storage (#5153)
* Add Redis Cluster mode support to auth server storage
Managed Redis services like GCP Memorystore Cluster and AWS ElastiCache
Serverless use the Redis Cluster protocol rather than standalone or Sentinel
connections, making it impossible to use them without this third mode.
- Add ClusterConfig/ClusterRunConfig types to storage and runner layers
- Wire cluster client creation via redis.NewClusterClient in NewRedisStorage
- Update validateConfig, convertRedisRunConfig, and buildStorageRunConfig to
enforce three-way mutual exclusion (addr / sentinel / cluster)
- Add RedisClusterConfig CRD type with MinItems=1 validation; update CEL rule
to require exactly one of the three modes
- Regenerate deepcopy, CRD YAML, and Helm chart templates
- Add unit tests for all new validation and happy-path code paths
Closes #5010
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Simplify Redis Cluster mode to addr + clusterMode bool
ClusterConfig{Addrs []string} was a misleading abstraction: GCP Memorystore
Cluster and AWS ElastiCache cluster mode both expose a single discovery endpoint,
so the slice always held exactly one address and was redundant with the existing
Addr field.
Replace ClusterConfig with a ClusterMode bool flag that is set alongside the
existing Addr field. go-redis NewClusterClient still receives the single endpoint
as []string{addr} and auto-discovers the full cluster topology from there.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Regenerate Swagger docs for cluster_mode field
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Regenerate CRD API reference docs for clusterMode field
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 6a6b2b2 commit 20ced20
16 files changed
Lines changed: 320 additions & 82 deletions
File tree
- cmd/thv-operator
- api/v1beta1
- pkg/controllerutil
- deploy/charts/operator-crds
- files/crds
- templates
- docs
- operator
- server
- pkg/authserver
- runner
- storage
Lines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
663 | | - | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
664 | 666 | | |
665 | | - | |
| 667 | + | |
| 668 | + | |
666 | 669 | | |
667 | 670 | | |
668 | 671 | | |
669 | | - | |
670 | | - | |
671 | | - | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
672 | 676 | | |
673 | 677 | | |
674 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
675 | 685 | | |
676 | 686 | | |
677 | 687 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | 607 | | |
612 | | - | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
613 | 612 | | |
614 | 613 | | |
615 | 614 | | |
| |||
629 | 628 | | |
630 | 629 | | |
631 | 630 | | |
| 631 | + | |
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1980 | 1980 | | |
1981 | 1981 | | |
1982 | 1982 | | |
1983 | | - | |
| 1983 | + | |
1984 | 1984 | | |
1985 | 1985 | | |
1986 | 1986 | | |
| |||
1994 | 1994 | | |
1995 | 1995 | | |
1996 | 1996 | | |
1997 | | - | |
| 1997 | + | |
1998 | 1998 | | |
1999 | 1999 | | |
2000 | 2000 | | |
| |||
2016 | 2016 | | |
2017 | 2017 | | |
2018 | 2018 | | |
2019 | | - | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
2020 | 2050 | | |
2021 | 2051 | | |
2022 | 2052 | | |
| |||
Lines changed: 26 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
320 | | - | |
321 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
322 | 323 | | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
323 | 330 | | |
324 | 331 | | |
325 | 332 | | |
| |||
442 | 449 | | |
443 | 450 | | |
444 | 451 | | |
445 | | - | |
446 | | - | |
| 452 | + | |
447 | 453 | | |
| 454 | + | |
| 455 | + | |
448 | 456 | | |
449 | 457 | | |
450 | 458 | | |
| |||
1478 | 1486 | | |
1479 | 1487 | | |
1480 | 1488 | | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
1484 | 1493 | | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
1485 | 1500 | | |
1486 | 1501 | | |
1487 | 1502 | | |
| |||
1604 | 1619 | | |
1605 | 1620 | | |
1606 | 1621 | | |
1607 | | - | |
1608 | | - | |
| 1622 | + | |
1609 | 1623 | | |
| 1624 | + | |
| 1625 | + | |
1610 | 1626 | | |
1611 | 1627 | | |
1612 | 1628 | | |
| |||
Lines changed: 26 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
194 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
195 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
196 | 203 | | |
197 | 204 | | |
198 | 205 | | |
| |||
315 | 322 | | |
316 | 323 | | |
317 | 324 | | |
318 | | - | |
319 | | - | |
| 325 | + | |
320 | 326 | | |
| 327 | + | |
| 328 | + | |
321 | 329 | | |
322 | 330 | | |
323 | 331 | | |
| |||
2799 | 2807 | | |
2800 | 2808 | | |
2801 | 2809 | | |
2802 | | - | |
2803 | | - | |
2804 | | - | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
2805 | 2814 | | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
2806 | 2821 | | |
2807 | 2822 | | |
2808 | 2823 | | |
| |||
2925 | 2940 | | |
2926 | 2941 | | |
2927 | 2942 | | |
2928 | | - | |
2929 | | - | |
| 2943 | + | |
2930 | 2944 | | |
| 2945 | + | |
| 2946 | + | |
2931 | 2947 | | |
2932 | 2948 | | |
2933 | 2949 | | |
| |||
Lines changed: 26 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
323 | | - | |
324 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
325 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
326 | 333 | | |
327 | 334 | | |
328 | 335 | | |
| |||
445 | 452 | | |
446 | 453 | | |
447 | 454 | | |
448 | | - | |
449 | | - | |
| 455 | + | |
450 | 456 | | |
| 457 | + | |
| 458 | + | |
451 | 459 | | |
452 | 460 | | |
453 | 461 | | |
| |||
1481 | 1489 | | |
1482 | 1490 | | |
1483 | 1491 | | |
1484 | | - | |
1485 | | - | |
1486 | | - | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
1487 | 1496 | | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
1488 | 1503 | | |
1489 | 1504 | | |
1490 | 1505 | | |
| |||
1607 | 1622 | | |
1608 | 1623 | | |
1609 | 1624 | | |
1610 | | - | |
1611 | | - | |
| 1625 | + | |
1612 | 1626 | | |
| 1627 | + | |
| 1628 | + | |
1613 | 1629 | | |
1614 | 1630 | | |
1615 | 1631 | | |
| |||
0 commit comments