func createStatefulSetService(name string, labels map[string]string) *v1.Service {
	headlessService := &v1.Service{
		ObjectMeta: metav1.ObjectMeta{
			Name: name,
		},
		Spec: v1.ServiceSpec{
			Selector: labels,
		},
	}
	headlessService.Spec.Ports = []v1.ServicePort{
		{Port: 80, Name: "http", Protocol: v1.ProtocolTCP},
	}
	headlessService.Spec.ClusterIP = "None"
	return headlessService
}
// createStatefulSetService creates a Headless Service with Name name and Selector set to match labels.
createStatefulSetService creates a Headless Service with Name name and Selector set to match labels.
// createStatefulSetService creates a Headless Service with Name name and Selector set to match labels .
func createStatefulSetService(name string, labels map[string]string) *v1.Service {
	headlessService := &v1.Service{
		ObjectMeta: metav1.ObjectMeta{
			Name: name,
		},
		Spec: v1.ServiceSpec{
			Selector: labels,
		},
	}
	headlessService.Spec.Ports = []v1.ServicePort{
		{Port: 80, Name: "http", Protocol: v1.ProtocolTCP},
	}
	headlessService.Spec.ClusterIP = "None"
	return headlessService
}
func createStatefulSetService ( name string , labels map [ string ] string ) * v1 . Service { headlessService := & v1 . Service { ObjectMeta : metav1 . ObjectMeta { Name : name , } , Spec : v1 . ServiceSpec { Selector : labels , } , } headlessService . Spec . Ports = [ ] v1 . ServicePort { { Port : 80 , Name : " " , Protocol : v1 . ProtocolTCP } , } headlessService . Spec . ClusterIP = " " return headlessService }
createStatefulSetService creates a Headless Service with Name name and Selector set to match labels.
createStatefulSetService creates a Headless Service with Name name and Selector set to match labels .