cmd/k8s-operator: add affinity rules to DNSConfig (#19360)
This commit modifies the `DNSConfig` custom resource to allow the user to specify affinity rules on the nameserver pods. Updates: https://github.com/tailscale/tailscale/issues/18556 Signed-off-by: David Bond <davidsbond93@gmail.com>
This commit is contained in:
@@ -113,6 +113,9 @@ type NameserverPod struct {
|
||||
// If specified, applies tolerations to the pods deployed by the DNSConfig resource.
|
||||
// +optional
|
||||
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
|
||||
// If specified, applies affinity rules to the pods deployed by the DNSConfig resource.
|
||||
// +optional
|
||||
Affinity *corev1.Affinity `json:"affinity,omitzero"`
|
||||
}
|
||||
|
||||
type DNSConfigStatus struct {
|
||||
|
||||
@@ -469,6 +469,11 @@ func (in *NameserverPod) DeepCopyInto(out *NameserverPod) {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Affinity != nil {
|
||||
in, out := &in.Affinity, &out.Affinity
|
||||
*out = new(corev1.Affinity)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameserverPod.
|
||||
|
||||
Reference in New Issue
Block a user