cmd/k8s-operator: truncate long StatefulSet name prefixes (#10343)

Kubernetes can generate StatefulSet names that are too long and result in invalid Pod revision hash label values.
Calculate whether a StatefulSet name generated for a Service or Ingress
will be too long and if so, truncate it.

Updates tailscale/tailscale#10284

Signed-off-by: Irbe Krumina <irbe@tailscale.com>
This commit is contained in:
Irbe Krumina
2023-11-21 11:20:37 +01:00
committed by GitHub
parent 2c1f14d9e6
commit 66471710f8
4 changed files with 84 additions and 1 deletions
+1
View File
@@ -97,6 +97,7 @@ require (
inet.af/wf v0.0.0-20221017222439-36129f591884
k8s.io/api v0.28.2
k8s.io/apimachinery v0.28.2
k8s.io/apiserver v0.28.2
k8s.io/client-go v0.28.2
nhooyr.io/websocket v1.8.7
sigs.k8s.io/controller-runtime v0.16.2