@@ -66,6 +66,7 @@ func Test_applyProxyClassToStatefulSet(t *testing.T) {
6666 ImagePullSecrets : []corev1.LocalObjectReference {{Name : "docker-creds" }},
6767 NodeName : "some-node" ,
6868 NodeSelector : map [string ]string {"beta.kubernetes.io/os" : "linux" },
69+ Affinity : & corev1.Affinity {NodeAffinity : & corev1.NodeAffinity {RequiredDuringSchedulingIgnoredDuringExecution : & corev1.NodeSelector {}}},
6970 Tolerations : []corev1.Toleration {{Key : "" , Operator : "Exists" }},
7071 TailscaleContainer : & tsapi.Container {
7172 SecurityContext : & corev1.SecurityContext {
@@ -139,6 +140,7 @@ func Test_applyProxyClassToStatefulSet(t *testing.T) {
139140 wantSS .Spec .Template .Spec .ImagePullSecrets = proxyClassAllOpts .Spec .StatefulSet .Pod .ImagePullSecrets
140141 wantSS .Spec .Template .Spec .NodeName = proxyClassAllOpts .Spec .StatefulSet .Pod .NodeName
141142 wantSS .Spec .Template .Spec .NodeSelector = proxyClassAllOpts .Spec .StatefulSet .Pod .NodeSelector
143+ wantSS .Spec .Template .Spec .Affinity = proxyClassAllOpts .Spec .StatefulSet .Pod .Affinity
142144 wantSS .Spec .Template .Spec .Tolerations = proxyClassAllOpts .Spec .StatefulSet .Pod .Tolerations
143145 wantSS .Spec .Template .Spec .Containers [0 ].SecurityContext = proxyClassAllOpts .Spec .StatefulSet .Pod .TailscaleContainer .SecurityContext
144146 wantSS .Spec .Template .Spec .InitContainers [0 ].SecurityContext = proxyClassAllOpts .Spec .StatefulSet .Pod .TailscaleInitContainer .SecurityContext
@@ -176,6 +178,7 @@ func Test_applyProxyClassToStatefulSet(t *testing.T) {
176178 wantSS .Spec .Template .Spec .ImagePullSecrets = proxyClassAllOpts .Spec .StatefulSet .Pod .ImagePullSecrets
177179 wantSS .Spec .Template .Spec .NodeName = proxyClassAllOpts .Spec .StatefulSet .Pod .NodeName
178180 wantSS .Spec .Template .Spec .NodeSelector = proxyClassAllOpts .Spec .StatefulSet .Pod .NodeSelector
181+ wantSS .Spec .Template .Spec .Affinity = proxyClassAllOpts .Spec .StatefulSet .Pod .Affinity
179182 wantSS .Spec .Template .Spec .Tolerations = proxyClassAllOpts .Spec .StatefulSet .Pod .Tolerations
180183 wantSS .Spec .Template .Spec .Containers [0 ].SecurityContext = proxyClassAllOpts .Spec .StatefulSet .Pod .TailscaleContainer .SecurityContext
181184 wantSS .Spec .Template .Spec .Containers [0 ].Resources = proxyClassAllOpts .Spec .StatefulSet .Pod .TailscaleContainer .Resources
0 commit comments