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

@@ -64,7 +64,7 @@ func CreateStatefulSetService(name string, labels map[string]string) *v1.Service
},
}
headlessService.Spec.Ports = []v1.ServicePort{
{Port: 80, Name: "http", Protocol: "TCP"},
{Port: 80, Name: "http", Protocol: v1.ProtocolTCP},
}
headlessService.Spec.ClusterIP = "None"
return headlessService