func newService(cr *v1alpha1.RethinkDBCluster) *corev1.Service {
	labels := labelsForCluster(cr)
	return &corev1.Service{
		TypeMeta: metav1.TypeMeta{
			APIVersion: "v1",
			Kind:       "Service",
		},
		ObjectMeta: metav1.ObjectMeta{
			Name:      cr.ObjectMeta.Name,
			Namespace: cr.ObjectMeta.Namespace,
			Labels:    labels,
		},
		Spec: corev1.ServiceSpec{
			Selector:        labels,
			SessionAffinity: "ClientIP",
		},
	}
}
// newService constructs a new Service object.
newService constructs a new Service object.
// newService constructs a new Service object .
func newService(cr *v1alpha1.RethinkDBCluster) *corev1.Service {
	labels := labelsForCluster(cr)
	return &corev1.Service{
		TypeMeta: metav1.TypeMeta{
			APIVersion: "v1",
			Kind:       "Service",
		},
		ObjectMeta: metav1.ObjectMeta{
			Name:      cr.ObjectMeta.Name,
			Namespace: cr.ObjectMeta.Namespace,
			Labels:    labels,
		},
		Spec: corev1.ServiceSpec{
			Selector:        labels,
			SessionAffinity: "ClientIP",
		},
	}
}
func newService ( cr * v1alpha1 . RethinkDBCluster ) * corev1 . Service { labels := labelsForCluster ( cr ) return & corev1 . Service { TypeMeta : metav1 . TypeMeta { APIVersion : " " , Kind : " " , } , ObjectMeta : metav1 . ObjectMeta { Name : cr . ObjectMeta . Name , Namespace : cr . ObjectMeta . Namespace , Labels : labels , } , Spec : corev1 . ServiceSpec { Selector : labels , SessionAffinity : " " , } , } }
newService constructs a new Service object.
newService constructs a new Service object .