func newProjectedVolume(cr *v1alpha1.RethinkDBCluster, name string) corev1.Volume {
	return corev1.Volume{
		Name: name,
		VolumeSource: corev1.VolumeSource{
			Projected: &corev1.ProjectedVolumeSource{
				Sources: []corev1.VolumeProjection{
					corev1.VolumeProjection{
						Secret: &corev1.SecretProjection{
							LocalObjectReference: corev1.LocalObjectReference{Name: fmt.Sprintf("%s-%s", cr.ObjectMeta.Name, RethinkDBCAKey)},
							Items: []corev1.KeyToPath{
								corev1.KeyToPath{
									Key:  corev1.TLSCertKey,
									Path: fmt.Sprintf("%s.crt", RethinkDBCAKey),
								},
							},
						},
					},
					newTLSVolumeProjection(cr, RethinkDBClusterKey),
					newTLSVolumeProjection(cr, RethinkDBDriverKey),
					newTLSVolumeProjection(cr, RethinkDBHttpKey),
				},
			},
		},
	}
}
// newProjectedVolume creates a new Projected volume with the given name.
newProjectedVolume creates a new Projected volume with the given name.
// newProjectedVolume creates a new Projected volume with the given name .
func newProjectedVolume(cr *v1alpha1.RethinkDBCluster, name string) corev1.Volume {
	return corev1.Volume{
		Name: name,
		VolumeSource: corev1.VolumeSource{
			Projected: &corev1.ProjectedVolumeSource{
				Sources: []corev1.VolumeProjection{
					corev1.VolumeProjection{
						Secret: &corev1.SecretProjection{
							LocalObjectReference: corev1.LocalObjectReference{Name: fmt.Sprintf("%s-%s", cr.ObjectMeta.Name, RethinkDBCAKey)},
							Items: []corev1.KeyToPath{
								corev1.KeyToPath{
									Key:  corev1.TLSCertKey,
									Path: fmt.Sprintf("%s.crt", RethinkDBCAKey),
								},
							},
						},
					},
					newTLSVolumeProjection(cr, RethinkDBClusterKey),
					newTLSVolumeProjection(cr, RethinkDBDriverKey),
					newTLSVolumeProjection(cr, RethinkDBHttpKey),
				},
			},
		},
	}
}
func newProjectedVolume ( cr * v1alpha1 . RethinkDBCluster , name string ) corev1 . Volume { return corev1 . Volume { Name : name , VolumeSource : corev1 . VolumeSource { Projected : & corev1 . ProjectedVolumeSource { Sources : [ ] corev1 . VolumeProjection { corev1 . VolumeProjection { Secret : & corev1 . SecretProjection { LocalObjectReference : corev1 . LocalObjectReference { Name : fmt . Sprintf ( " " , cr . ObjectMeta . Name , RethinkDBCAKey ) } , Items : [ ] corev1 . KeyToPath { corev1 . KeyToPath { Key : corev1 . TLSCertKey , Path : fmt . Sprintf ( " " , RethinkDBCAKey ) , } , } , } , } , newTLSVolumeProjection ( cr , RethinkDBClusterKey ) , newTLSVolumeProjection ( cr , RethinkDBDriverKey ) , newTLSVolumeProjection ( cr , RethinkDBHttpKey ) , } , } , } , } }
newProjectedVolume creates a new Projected volume with the given name.
newProjectedVolume creates a new Projected volume with the given name .