cmd/k8s-operator: add nodeSelector to DNSConfig resource (#19429)
This commit modifies the `DNSConfig` resource to allow customisation of the `spec.nodeSelector` field in the nameserver pods. Closes: https://github.com/tailscale/tailscale/issues/19419 Signed-off-by: David Bond <davidsbond93@gmail.com>
This commit is contained in:
@@ -43,6 +43,9 @@ func TestNameserverReconciler(t *testing.T) {
|
||||
ClusterIP: "5.4.3.2",
|
||||
},
|
||||
Pod: &tsapi.NameserverPod{
|
||||
NodeSelector: map[string]string{
|
||||
"foo": "bar",
|
||||
},
|
||||
Tolerations: []corev1.Toleration{
|
||||
{
|
||||
Key: "some-key",
|
||||
@@ -131,6 +134,9 @@ func TestNameserverReconciler(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
wantsDeploy.Spec.Template.Spec.NodeSelector = map[string]string{
|
||||
"foo": "bar",
|
||||
}
|
||||
|
||||
expectEqual(t, fc, wantsDeploy)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user