diff options
| author | Lee Briggs <lee@leebriggs.co.uk> | 2025-07-28 07:12:44 -0700 |
|---|---|---|
| committer | Lee Briggs <lee@leebriggs.co.uk> | 2025-07-28 07:12:44 -0700 |
| commit | 968f3e9406c44fbd648aeacf85de71eca3cdb8e8 (patch) | |
| tree | 1a57aabd0f091a61be8741f57eb957ba9f071dce /cmd/k8s-operator/sts_test.go | |
| parent | 5dc11d50f787026055a0125f536e87287ce6899e (diff) | |
| download | tailscale-k8s_priority_class.tar.xz tailscale-k8s_priority_class.zip | |
cmd/k8s-operator,k8s-operator: allow setting a `priorityClassName`k8s_priority_class
Fixes #16682
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
Diffstat (limited to 'cmd/k8s-operator/sts_test.go')
| -rw-r--r-- | cmd/k8s-operator/sts_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/k8s-operator/sts_test.go b/cmd/k8s-operator/sts_test.go index 35c512c8c..47e75dbd4 100644 --- a/cmd/k8s-operator/sts_test.go +++ b/cmd/k8s-operator/sts_test.go @@ -75,6 +75,7 @@ func Test_applyProxyClassToStatefulSet(t *testing.T) { NodeSelector: map[string]string{"beta.kubernetes.io/os": "linux"}, Affinity: &corev1.Affinity{NodeAffinity: &corev1.NodeAffinity{RequiredDuringSchedulingIgnoredDuringExecution: &corev1.NodeSelector{}}}, Tolerations: []corev1.Toleration{{Key: "", Operator: "Exists"}}, + PriorityClassName: "high-priority", TopologySpreadConstraints: []corev1.TopologySpreadConstraint{ { WhenUnsatisfiable: "DoNotSchedule", @@ -197,6 +198,7 @@ func Test_applyProxyClassToStatefulSet(t *testing.T) { wantSS.Spec.Template.Spec.Containers[0].ImagePullPolicy = "IfNotPresent" wantSS.Spec.Template.Spec.InitContainers[0].Image = "ghcr.io/my-repo/tailscale:v0.01testsomething" wantSS.Spec.Template.Spec.InitContainers[0].ImagePullPolicy = "IfNotPresent" + wantSS.Spec.Template.Spec.PriorityClassName = proxyClassAllOpts.Spec.StatefulSet.Pod.PriorityClassName gotSS := applyProxyClassToStatefulSet(proxyClassAllOpts, nonUserspaceProxySS.DeepCopy(), new(tailscaleSTSConfig), zl.Sugar()) if diff := cmp.Diff(gotSS, wantSS); diff != "" { |
