Unverified Commit b1485035 authored by pengbinbin1's avatar pengbinbin1 Committed by GitHub
Browse files

change the prtocol string to const (#1887)

parent 7e56931f
Showing with 6 additions and 5 deletions
+6 -5
......@@ -313,11 +313,11 @@ func (c *Controller) updatePodAttachNets(pod *corev1.Pod, svc *corev1.Service) e
var protocol string
switch port.Protocol {
case corev1.ProtocolTCP:
protocol = "tcp"
protocol = util.ProtocolTCP
case corev1.ProtocolUDP:
protocol = "udp"
protocol = util.ProtocolTCP
case corev1.ProtocolSCTP:
protocol = "sctp"
protocol = util.ProtocolSCTP
}
var rules []string
......
......@@ -90,8 +90,9 @@ const (
VpcDnsNameLabel = "ovn.kubernetes.io/vpc-dns"
NetworkPolicyLogAnnotation = "ovn.kubernetes.io/enable_log"
ProtocolTCP = "tcp"
ProtocolUDP = "udp"
ProtocolTCP = "tcp"
ProtocolUDP = "udp"
ProtocolSCTP = "sctp"
NetworkTypeVlan = "vlan"
NetworkTypeGeneve = "geneve"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment