summaryrefslogtreecommitdiffhomepage
path: root/cmd/k8s-operator/testutils_test.go
diff options
context:
space:
mode:
authorIrbe Krumina <irbe@tailscale.com>2025-06-20 10:34:47 +0100
committerGitHub <noreply@github.com>2025-06-20 10:34:47 +0100
commit253d0b026dbd55f38787d8e7334261b044b8c703 (patch)
treecb29ec73e580239596995eb63c1408e961219682 /cmd/k8s-operator/testutils_test.go
parenta64ca7a5b4efed0437a1d4eace3815b4de7f6eaf (diff)
downloadtailscale-annotations.tar.xz
tailscale-annotations.zip
cmd/k8s-operator: remove conffile hashing mechanism (#16335)annotations
Proxies know how to reload configfile on changes since 1.80, which is going to be the earliest supported proxy version with 1.84 operator, so remove the mechanism that was updating configfile hash to force proxy Pod restarts on config changes. Updates #13032 Signed-off-by: Irbe Krumina <irbe@tailscale.com>
Diffstat (limited to 'cmd/k8s-operator/testutils_test.go')
-rw-r--r--cmd/k8s-operator/testutils_test.go19
1 files changed, 0 insertions, 19 deletions
diff --git a/cmd/k8s-operator/testutils_test.go b/cmd/k8s-operator/testutils_test.go
index 619aecc56..56542700d 100644
--- a/cmd/k8s-operator/testutils_test.go
+++ b/cmd/k8s-operator/testutils_test.go
@@ -62,7 +62,6 @@ type configOpts struct {
subnetRoutes string
isExitNode bool
isAppConnector bool
- confFileHash string
serveConfig *ipn.ServeConfig
shouldEnableForwardingClusterTrafficViaIngress bool
proxyClass string // configuration from the named ProxyClass should be applied to proxy resources
@@ -120,9 +119,6 @@ func expectedSTS(t *testing.T, cl client.Client, opts configOpts) *appsv1.Statef
ReadOnly: true,
MountPath: "/etc/tsconfig",
}}
- if opts.confFileHash != "" {
- mak.Set(&annots, "tailscale.com/operator-last-set-config-file-hash", opts.confFileHash)
- }
if opts.firewallMode != "" {
tsContainer.Env = append(tsContainer.Env, corev1.EnvVar{
Name: "TS_DEBUG_FIREWALL_MODE",
@@ -358,10 +354,6 @@ func expectedSTSUserspace(t *testing.T, cl client.Client, opts configOpts) *apps
},
},
}
- ss.Spec.Template.Annotations = map[string]string{}
- if opts.confFileHash != "" {
- ss.Spec.Template.Annotations["tailscale.com/operator-last-set-config-file-hash"] = opts.confFileHash
- }
// If opts.proxyClass is set, retrieve the ProxyClass and apply
// configuration from that to the StatefulSet.
if opts.proxyClass != "" {
@@ -842,17 +834,6 @@ func (c *fakeTSClient) Deleted() []string {
return c.deleted
}
-// removeHashAnnotation can be used to remove declarative tailscaled config hash
-// annotation from proxy StatefulSets to make the tests more maintainable (so
-// that we don't have to change the annotation in each test case after any
-// change to the configfile contents).
-func removeHashAnnotation(sts *appsv1.StatefulSet) {
- delete(sts.Spec.Template.Annotations, podAnnotationLastSetConfigFileHash)
- if len(sts.Spec.Template.Annotations) == 0 {
- sts.Spec.Template.Annotations = nil
- }
-}
-
func removeResourceReqs(sts *appsv1.StatefulSet) {
if sts != nil {
sts.Spec.Template.Spec.Resources = nil