cmd/k8s-operator,k8s-operator: allow proxies accept advertized routes. (#12388)
Add a new .spec.tailscale.acceptRoutes field to ProxyClass, that can be optionally set to true for the proxies to accept routes advertized by other nodes on tailnet (equivalent of setting --accept-routes to true). Updates tailscale/tailscale#12322,tailscale/tailscale#10684 Signed-off-by: Irbe Krumina <irbe@tailscale.com>
This commit is contained in:
@ -62,6 +62,20 @@ type ProxyClassSpec struct {
|
||||
// recommend that you use those for debugging purposes.
|
||||
// +optional
|
||||
Metrics *Metrics `json:"metrics,omitempty"`
|
||||
// TailscaleConfig contains options to configure the tailscale-specific
|
||||
// parameters of proxies.
|
||||
// +optional
|
||||
TailscaleConfig *TailscaleConfig `json:"tailscale,omitempty"`
|
||||
}
|
||||
|
||||
type TailscaleConfig struct {
|
||||
// AcceptRoutes can be set to true to make the proxy instance accept
|
||||
// routes advertized by other nodes on the tailnet, such as subnet
|
||||
// routes.
|
||||
// This is equivalent of passing --accept-routes flag to a tailscale Linux client.
|
||||
// https://tailscale.com/kb/1019/subnets#use-your-subnet-routes-from-other-machines
|
||||
// Defaults to false.
|
||||
AcceptRoutes bool `json:"acceptRoutes,omitempty"`
|
||||
}
|
||||
|
||||
type StatefulSet struct {
|
||||
|
@ -494,6 +494,11 @@ func (in *ProxyClassSpec) DeepCopyInto(out *ProxyClassSpec) {
|
||||
*out = new(Metrics)
|
||||
**out = **in
|
||||
}
|
||||
if in.TailscaleConfig != nil {
|
||||
in, out := &in.TailscaleConfig, &out.TailscaleConfig
|
||||
*out = new(TailscaleConfig)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyClassSpec.
|
||||
@ -619,3 +624,18 @@ func (in Tags) DeepCopy() Tags {
|
||||
in.DeepCopyInto(out)
|
||||
return *out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *TailscaleConfig) DeepCopyInto(out *TailscaleConfig) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TailscaleConfig.
|
||||
func (in *TailscaleConfig) DeepCopy() *TailscaleConfig {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(TailscaleConfig)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
Reference in New Issue
Block a user