mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Implement multi-port Endpoints
This is a part of multi-port services.
This commit is contained in:
@@ -81,8 +81,14 @@ func init() {
|
||||
}
|
||||
},
|
||||
func(obj *Endpoints) {
|
||||
if obj.Protocol == "" {
|
||||
obj.Protocol = "TCP"
|
||||
for i := range obj.Endpoints {
|
||||
ep := &obj.Endpoints[i]
|
||||
for j := range ep.Ports {
|
||||
port := &ep.Ports[j]
|
||||
if port.Protocol == "" {
|
||||
port.Protocol = ProtocolTCP
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user