cmd/k8s-operator: add replica support to nameserver (#17246)
This commit modifies the `DNSConfig` custom resource to allow specifying a replica count when deploying a nameserver. This allows deploying nameservers in a HA configuration. Updates https://github.com/tailscale/corp/issues/32589 Signed-off-by: David Bond <davidsbond93@gmail.com>
This commit is contained in:
@@ -443,6 +443,7 @@ _Appears in:_
|
||||
| --- | --- | --- | --- |
|
||||
| `image` _[NameserverImage](#nameserverimage)_ | Nameserver image. Defaults to tailscale/k8s-nameserver:unstable. | | |
|
||||
| `service` _[NameserverService](#nameserverservice)_ | Service configuration. | | |
|
||||
| `replicas` _integer_ | Replicas specifies how many Pods to create. Defaults to 1. | | Minimum: 0 <br /> |
|
||||
|
||||
|
||||
#### NameserverImage
|
||||
|
||||
@@ -84,6 +84,10 @@ type Nameserver struct {
|
||||
// Service configuration.
|
||||
// +optional
|
||||
Service *NameserverService `json:"service,omitempty"`
|
||||
// Replicas specifies how many Pods to create. Defaults to 1.
|
||||
// +optional
|
||||
// +kubebuilder:validation:Minimum=0
|
||||
Replicas *int32 `json:"replicas,omitempty"`
|
||||
}
|
||||
|
||||
type NameserverImage struct {
|
||||
|
||||
@@ -422,6 +422,11 @@ func (in *Nameserver) DeepCopyInto(out *Nameserver) {
|
||||
*out = new(NameserverService)
|
||||
**out = **in
|
||||
}
|
||||
if in.Replicas != nil {
|
||||
in, out := &in.Replicas, &out.Replicas
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Nameserver.
|
||||
|
||||
Reference in New Issue
Block a user