Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Kube OVN
Commits
b1485035
Unverified
Commit
b1485035
authored
2 years ago
by
pengbinbin1
Committed by
GitHub
2 years ago
Browse files
Options
Download
Email Patches
Plain Diff
change the prtocol string to const (#1887)
parent
7e56931f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pkg/controller/service_lb.go
+3
-3
pkg/controller/service_lb.go
pkg/util/const.go
+3
-2
pkg/util/const.go
with
6 additions
and
5 deletions
+6
-5
pkg/controller/service_lb.go
+
3
-
3
View file @
b1485035
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
pkg/util/const.go
+
3
-
2
View file @
b1485035
...
...
@@ -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"
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment