src/server/pkg/deploy/assets/assets.go
func EtcdHeadlessService(opts *AssetOpts) *v1.Service {
	return &v1.Service{
		TypeMeta: metav1.TypeMeta{
			Kind:       "Service",
			APIVersion: "v1",
		},
		ObjectMeta: objectMeta(etcdHeadlessServiceName, labels(etcdName), nil, opts.Namespace),
		Spec: v1.ServiceSpec{
			Selector: map[string]string{
				"app": etcdName,
			},
			ClusterIP: "None",
			Ports: []v1.ServicePort{
				{
					Name: "peer-port",
					Port: 2380,
				},
			},
		},
	}
}
func EtcdHeadlessService(opts *AssetOpts) *v1.Service {
	return &v1.Service{
		TypeMeta: metav1.TypeMeta{
			Kind:       "Service",
			APIVersion: "v1",
		},
		ObjectMeta: objectMeta(etcdHeadlessServiceName, labels(etcdName), nil, opts.Namespace),
		Spec: v1.ServiceSpec{
			Selector: map[string]string{
				"app": etcdName,
			},
			ClusterIP: "None",
			Ports: []v1.ServicePort{
				{
					Name: "peer-port",
					Port: 2380,
				},
			},
		},
	}
}
func EtcdHeadlessService ( opts * AssetOpts ) * v1 . Service { return & v1 . Service { TypeMeta : metav1 . TypeMeta { Kind : " " , APIVersion : " " , } , ObjectMeta : objectMeta ( etcdHeadlessServiceName , labels ( etcdName ) , nil , opts . Namespace ) , Spec : v1 . ServiceSpec { Selector : map [ string ] string { " " : etcdName , } , ClusterIP : " " , Ports : [ ] v1 . ServicePort { { Name : " " , Port : 2380 , } , } , } , } }
// EtcdHeadlessService returns a headless etcd service, which is only for DNS
// resolution.
EtcdHeadlessService returns a headless etcd service which is only for DNS resolution .