mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Declare TCP default for service port protocol
This commit is contained in:
parent
b418bc83db
commit
dab5112240
6
pkg/apis/core/v1/zz_generated.defaults.go
generated
6
pkg/apis/core/v1/zz_generated.defaults.go
generated
@ -913,6 +913,12 @@ func SetObjectDefaults_SecretList(in *v1.SecretList) {
|
|||||||
|
|
||||||
func SetObjectDefaults_Service(in *v1.Service) {
|
func SetObjectDefaults_Service(in *v1.Service) {
|
||||||
SetDefaults_Service(in)
|
SetDefaults_Service(in)
|
||||||
|
for i := range in.Spec.Ports {
|
||||||
|
a := &in.Spec.Ports[i]
|
||||||
|
if a.Protocol == "" {
|
||||||
|
a.Protocol = "TCP"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetObjectDefaults_ServiceList(in *v1.ServiceList) {
|
func SetObjectDefaults_ServiceList(in *v1.ServiceList) {
|
||||||
|
@ -4751,6 +4751,7 @@ message ServicePort {
|
|||||||
|
|
||||||
// The IP protocol for this port. Supports "TCP", "UDP", and "SCTP".
|
// The IP protocol for this port. Supports "TCP", "UDP", and "SCTP".
|
||||||
// Default is TCP.
|
// Default is TCP.
|
||||||
|
// +default="TCP"
|
||||||
// +optional
|
// +optional
|
||||||
optional string protocol = 2;
|
optional string protocol = 2;
|
||||||
|
|
||||||
|
@ -4265,6 +4265,7 @@ type ServicePort struct {
|
|||||||
|
|
||||||
// The IP protocol for this port. Supports "TCP", "UDP", and "SCTP".
|
// The IP protocol for this port. Supports "TCP", "UDP", and "SCTP".
|
||||||
// Default is TCP.
|
// Default is TCP.
|
||||||
|
// +default="TCP"
|
||||||
// +optional
|
// +optional
|
||||||
Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,2,opt,name=protocol,casttype=Protocol"`
|
Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,2,opt,name=protocol,casttype=Protocol"`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user