use const v1.ProtocolTCP replace of string TCP

This commit is contained in:
hangaoshuai
2018-08-07 12:09:19 +08:00
parent 7dcbdbb1df
commit fed9411d5d
3 changed files with 4 additions and 4 deletions

View File

@@ -548,7 +548,7 @@ func (f *Framework) CreateServiceForSimpleApp(contPort, svcPort int, appName str
return nil
} else {
return []v1.ServicePort{{
Protocol: "TCP",
Protocol: v1.ProtocolTCP,
Port: int32(svcPort),
TargetPort: intstr.FromInt(contPort),
}}