mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
use const v1.ProtocolTCP replace of string TCP in test/e2e/network/
This commit is contained in:
parent
d655c9a873
commit
57b4c1e7cf
@ -202,7 +202,7 @@ var _ = SIGDescribe("DNS", func() {
|
|||||||
_, err = framework.UpdateService(f.ClientSet, f.Namespace.Name, serviceName, func(s *v1.Service) {
|
_, err = framework.UpdateService(f.ClientSet, f.Namespace.Name, serviceName, func(s *v1.Service) {
|
||||||
s.Spec.Type = v1.ServiceTypeClusterIP
|
s.Spec.Type = v1.ServiceTypeClusterIP
|
||||||
s.Spec.Ports = []v1.ServicePort{
|
s.Spec.Ports = []v1.ServicePort{
|
||||||
{Port: 80, Name: "http", Protocol: "TCP"},
|
{Port: 80, Name: "http", Protocol: v1.ProtocolTCP},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
@ -213,7 +213,7 @@ func (t *dnsTestCommon) createUtilPodLabel(baseName string) {
|
|||||||
Image: imageutils.GetE2EImage(imageutils.Dnsutils),
|
Image: imageutils.GetE2EImage(imageutils.Dnsutils),
|
||||||
Command: []string{"sleep", "10000"},
|
Command: []string{"sleep", "10000"},
|
||||||
Ports: []v1.ContainerPort{
|
Ports: []v1.ContainerPort{
|
||||||
{ContainerPort: servicePort, Protocol: "TCP"},
|
{ContainerPort: servicePort, Protocol: v1.ProtocolTCP},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -238,7 +238,7 @@ func (t *dnsTestCommon) createUtilPodLabel(baseName string) {
|
|||||||
Selector: map[string]string{"app": baseName},
|
Selector: map[string]string{"app": baseName},
|
||||||
Ports: []v1.ServicePort{
|
Ports: []v1.ServicePort{
|
||||||
{
|
{
|
||||||
Protocol: "TCP",
|
Protocol: v1.ProtocolTCP,
|
||||||
Port: servicePort,
|
Port: servicePort,
|
||||||
TargetPort: intstr.FromInt(servicePort),
|
TargetPort: intstr.FromInt(servicePort),
|
||||||
},
|
},
|
||||||
|
@ -70,7 +70,7 @@ var _ = SIGDescribe("Firewall rule", func() {
|
|||||||
|
|
||||||
By("Creating a LoadBalancer type service with ExternalTrafficPolicy=Global")
|
By("Creating a LoadBalancer type service with ExternalTrafficPolicy=Global")
|
||||||
svc := jig.CreateLoadBalancerService(ns, serviceName, framework.LoadBalancerCreateTimeoutDefault, func(svc *v1.Service) {
|
svc := jig.CreateLoadBalancerService(ns, serviceName, framework.LoadBalancerCreateTimeoutDefault, func(svc *v1.Service) {
|
||||||
svc.Spec.Ports = []v1.ServicePort{{Protocol: "TCP", Port: framework.FirewallTestHttpPort}}
|
svc.Spec.Ports = []v1.ServicePort{{Protocol: v1.ProtocolTCP, Port: framework.FirewallTestHttpPort}}
|
||||||
svc.Spec.LoadBalancerSourceRanges = firewallTestSourceRanges
|
svc.Spec.LoadBalancerSourceRanges = firewallTestSourceRanges
|
||||||
})
|
})
|
||||||
defer func() {
|
defer func() {
|
||||||
|
@ -57,7 +57,7 @@ var (
|
|||||||
Ports: []v1.ServicePort{{
|
Ports: []v1.ServicePort{{
|
||||||
Port: int32(defaultServeHostnameServicePort),
|
Port: int32(defaultServeHostnameServicePort),
|
||||||
TargetPort: intstr.FromInt(9376),
|
TargetPort: intstr.FromInt(9376),
|
||||||
Protocol: "TCP",
|
Protocol: v1.ProtocolTCP,
|
||||||
}},
|
}},
|
||||||
Selector: map[string]string{
|
Selector: map[string]string{
|
||||||
"name": defaultServeHostnameServiceName,
|
"name": defaultServeHostnameServiceName,
|
||||||
@ -897,7 +897,7 @@ var _ = SIGDescribe("Services", func() {
|
|||||||
s.Spec.Type = v1.ServiceTypeClusterIP
|
s.Spec.Type = v1.ServiceTypeClusterIP
|
||||||
s.Spec.ExternalName = ""
|
s.Spec.ExternalName = ""
|
||||||
s.Spec.Ports = []v1.ServicePort{
|
s.Spec.Ports = []v1.ServicePort{
|
||||||
{Port: 80, Name: "http", Protocol: "TCP"},
|
{Port: 80, Name: "http", Protocol: v1.ProtocolTCP},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
jig.SanityCheckService(clusterIPService, v1.ServiceTypeClusterIP)
|
jig.SanityCheckService(clusterIPService, v1.ServiceTypeClusterIP)
|
||||||
@ -921,7 +921,7 @@ var _ = SIGDescribe("Services", func() {
|
|||||||
s.Spec.Type = v1.ServiceTypeNodePort
|
s.Spec.Type = v1.ServiceTypeNodePort
|
||||||
s.Spec.ExternalName = ""
|
s.Spec.ExternalName = ""
|
||||||
s.Spec.Ports = []v1.ServicePort{
|
s.Spec.Ports = []v1.ServicePort{
|
||||||
{Port: 80, Name: "http", Protocol: "TCP"},
|
{Port: 80, Name: "http", Protocol: v1.ProtocolTCP},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
jig.SanityCheckService(nodePortService, v1.ServiceTypeNodePort)
|
jig.SanityCheckService(nodePortService, v1.ServiceTypeNodePort)
|
||||||
|
Loading…
Reference in New Issue
Block a user