func newConfigMapWithSuffix(cr *v1alpha1.RethinkDBCluster, suffix string) *corev1.ConfigMap {
	return newConfigMapWithName(cr, fmt.Sprintf("%s-%s", cr.ObjectMeta.Name, suffix))
}
newConfigMapWithName creates a new ConfigMap with the given suffix appended to the name.
The name for the CongifMap is based on the name of the given RethinkDBCluster.
package rethinkdbcluster
import (
	"fmt"
	"github.com/jmckind/rethinkdb-operator/pkg/apis/rethinkdb/v1alpha1"
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
func newCAConfigMap(cr *v1alpha1.RethinkDBCluster, caSecret *corev1.Secret) (*corev1.ConfigMap, error) {
	cm := newConfigMapWithSuffix(cr, "ca")
	cm.Data = map[string]string{
		TLSCACertKey: string(caSecret.Data[TLSCertKey]),
	}
	return cm, nil
}
func newConfigMap(cr *v1alpha1.RethinkDBCluster) *corev1.ConfigMap {
	return &corev1.ConfigMap{
		ObjectMeta: metav1.ObjectMeta{
			Name:      cr.Name,
			Namespace: cr.Namespace,
			Labels:    labelsForCluster(cr),
		},
	}
}
func newConfigMapWithName(cr *v1alpha1.RethinkDBCluster, name string) *corev1.ConfigMap {
	cm := newConfigMap(cr)
	cm.ObjectMeta.Name = name
	return cm
}