feat: Gateway supports the configuration of forwarding tcp/udp traffic. (#5445)
Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io> Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io>
This commit is contained in:
@@ -38,6 +38,10 @@ type ControllerSpec struct {
|
||||
Config map[string]string `json:"config,omitempty"`
|
||||
// +optional
|
||||
Scope Scope `json:"scope,omitempty"`
|
||||
// +optional
|
||||
TCP map[string]string `json:"tcp,omitempty"`
|
||||
// +optional
|
||||
UDP map[string]string `json:"udp,omitempty"`
|
||||
}
|
||||
|
||||
type ServiceSpec struct {
|
||||
|
||||
@@ -48,6 +48,20 @@ func (in *ControllerSpec) DeepCopyInto(out *ControllerSpec) {
|
||||
}
|
||||
}
|
||||
out.Scope = in.Scope
|
||||
if in.TCP != nil {
|
||||
in, out := &in.TCP, &out.TCP
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.UDP != nil {
|
||||
in, out := &in.UDP, &out.UDP
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerSpec.
|
||||
|
||||
Reference in New Issue
Block a user