func newUserSecret(cr *v1alpha1.RethinkDBCluster, username string) (*corev1.Secret, error) {
	psswd, err := password.Generate(16, 4, 0, false, false)
	if err != nil {
		return nil, err
	}
	secret := newSecret(cr)
	secret.ObjectMeta.Name = fmt.Sprintf("%s-%s", cr.ObjectMeta.Name, username)
	secret.Data = map[string][]byte{
		RethinkDBUsernameKey: []byte(username),
		RethinkDBPasswordKey: []byte(psswd),
	}
	return secret, nil
}
// newUserSecret creates a new Opaque secret for the given username and RethinkDBCluster.
newUserSecret creates a new Opaque secret for the given username and RethinkDBCluster.
// newUserSecret creates a new Opaque secret for the given username and RethinkDBCluster .
func newUserSecret(cr *v1alpha1.RethinkDBCluster, username string) (*corev1.Secret, error) {
	psswd, err := password.Generate(16, 4, 0, false, false)
	if err != nil {
		return nil, err
	}
	secret := newSecret(cr)
	secret.ObjectMeta.Name = fmt.Sprintf("%s-%s", cr.ObjectMeta.Name, username)
	secret.Data = map[string][]byte{
		RethinkDBUsernameKey: []byte(username),
		RethinkDBPasswordKey: []byte(psswd),
	}
	return secret, nil
}
func newUserSecret ( cr * v1alpha1 . RethinkDBCluster , username string ) ( * corev1 . Secret , error ) { psswd , err := password . Generate ( 16 , 4 , 0 , false , false ) if err != nil { return nil , err } secret := newSecret ( cr ) secret . ObjectMeta . Name = fmt . Sprintf ( " " , cr . ObjectMeta . Name , username ) secret . Data = map [ string ] [ ] byte { RethinkDBUsernameKey : [ ] byte ( username ) , RethinkDBPasswordKey : [ ] byte ( psswd ) , } return secret , nil }
newUserSecret creates a new Opaque secret for the given username and RethinkDBCluster.
newUserSecret creates a new Opaque secret for the given username and RethinkDBCluster .