From 4ce6916e5f230bb10aa5672343fe28de4f12e30d Mon Sep 17 00:00:00 2001 From: cuisongliu Date: Tue, 18 Jan 2022 17:53:17 +0800 Subject: [PATCH] feat(main): delete udp feature --- api/network/v1beta1/types.go | 4 ---- api/network/v1beta1/zz_generated.deepcopy.go | 5 ----- .../crds/sealyun.com_clusterendpoints.yaml | 9 --------- config/crd/sealyun.com_clusterendpoints.yaml | 9 --------- controllers/sync.go | 13 ------------- 5 files changed, 40 deletions(-) diff --git a/api/network/v1beta1/types.go b/api/network/v1beta1/types.go index 720cb4f..59b57d3 100644 --- a/api/network/v1beta1/types.go +++ b/api/network/v1beta1/types.go @@ -97,10 +97,6 @@ type Handler struct { // TCP hooks not yet supported // +optional TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"` - // UDPSocket specifies an action involving a UDP port. - // UDP hooks not yet supported - // +optional - UDPSocket *UDPSocketAction `json:"udpSocket,omitempty" protobuf:"bytes,4,opt,name=tcpSocket"` } // ClusterEndpointSpec defines the desired state of ClusterEndpoint diff --git a/api/network/v1beta1/zz_generated.deepcopy.go b/api/network/v1beta1/zz_generated.deepcopy.go index 23bd69d..8d07549 100644 --- a/api/network/v1beta1/zz_generated.deepcopy.go +++ b/api/network/v1beta1/zz_generated.deepcopy.go @@ -189,11 +189,6 @@ func (in *Handler) DeepCopyInto(out *Handler) { *out = new(TCPSocketAction) **out = **in } - if in.UDPSocket != nil { - in, out := &in.UDPSocket, &out.UDPSocket - *out = new(UDPSocketAction) - **out = **in - } return } diff --git a/config/charts/endpoints-operator/crds/sealyun.com_clusterendpoints.yaml b/config/charts/endpoints-operator/crds/sealyun.com_clusterendpoints.yaml index e610575..a46e209 100644 --- a/config/charts/endpoints-operator/crds/sealyun.com_clusterendpoints.yaml +++ b/config/charts/endpoints-operator/crds/sealyun.com_clusterendpoints.yaml @@ -156,15 +156,6 @@ spec: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' format: int32 type: integer - udpSocket: - description: UDPSocket specifies an action involving a UDP port. - UDP hooks not yet supported - properties: - enable: - type: boolean - required: - - enable - type: object required: - port - targetPort diff --git a/config/crd/sealyun.com_clusterendpoints.yaml b/config/crd/sealyun.com_clusterendpoints.yaml index e610575..a46e209 100644 --- a/config/crd/sealyun.com_clusterendpoints.yaml +++ b/config/crd/sealyun.com_clusterendpoints.yaml @@ -156,15 +156,6 @@ spec: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' format: int32 type: integer - udpSocket: - description: UDPSocket specifies an action involving a UDP port. - UDP hooks not yet supported - properties: - enable: - type: boolean - required: - - enable - type: object required: - port - targetPort diff --git a/controllers/sync.go b/controllers/sync.go index 7b75156..2e44f45 100644 --- a/controllers/sync.go +++ b/controllers/sync.go @@ -174,12 +174,6 @@ func healthyCheck(host string, cep *v1beta1.ClusterEndpoint) ([]v1beta1.ServiceP HTTPHeaders: port.HTTPGet.HTTPHeaders, } } - if port.UDPSocket != nil && port.UDPSocket.Enable { - pro.TCPSocket = &libv1.TCPSocketAction{ - Port: intstr.FromInt(int(port.TargetPort)), - Host: host, - } - } network := "" if port.TCPSocket != nil && port.TCPSocket.Enable { network = "tcp" @@ -188,13 +182,6 @@ func healthyCheck(host string, cep *v1beta1.ClusterEndpoint) ([]v1beta1.ServiceP Host: host, } } - if port.UDPSocket != nil && port.UDPSocket.Enable { - network = "udp" - pro.TCPSocket = &libv1.TCPSocketAction{ - Port: intstr.FromInt(int(port.TargetPort)), - Host: host, - } - } w := &work{p: pro, network: network} for w.doProbe() { }