Commit 42a5262
authored
cmd/k8s-operator: add multi replica support for recorders (tailscale#17864)
This commit adds the `spec.replicas` field to the `Recorder` custom
resource that allows for a highly available deployment of `tsrecorder`
within a kubernetes cluster.
Many changes were required here as the code hard-coded the assumption
of a single replica. This has required a few loops, similar to what we
do for the `Connector` resource to create auth and state secrets. It
was also required to add a check to remove dangling state and auth
secrets should the recorder be scaled down.
Updates: tailscale#17965
Signed-off-by: David Bond <[email protected]>1 parent 682172c commit 42a5262
File tree
10 files changed
+381
-152
lines changed- cmd/k8s-operator
- deploy
- crds
- manifests
- k8s-operator
- apis/v1alpha1
10 files changed
+381
-152
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
1683 | 1688 | | |
1684 | 1689 | | |
1685 | 1690 | | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
1686 | 1694 | | |
1687 | 1695 | | |
1688 | 1696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3348 | 3348 | | |
3349 | 3349 | | |
3350 | 3350 | | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
3351 | 3356 | | |
3352 | 3357 | | |
3353 | 3358 | | |
| |||
4964 | 4969 | | |
4965 | 4970 | | |
4966 | 4971 | | |
| 4972 | + | |
| 4973 | + | |
| 4974 | + | |
4967 | 4975 | | |
4968 | 4976 | | |
4969 | 4977 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
0 commit comments