code: func (p *glusterBlockProvisioner) createSecretRef(nameSpace string, secretName string, user string, password string) (*v1.SecretReference, error) {
  	var err error
  	secret := &v1.Secret{
  		ObjectMeta: metav1.ObjectMeta{
  			Namespace: nameSpace,
  			Name:      secretName,
  		},
  		Data: map[string][]byte{
  			"node.session.auth.username": []byte(user),
  			"node.session.auth.password": []byte(password),
  		},
  		Type: chapType,
  	}
  
  	secretRef := &v1.SecretReference{}
  	if secret != nil {
  		_, err = p.client.CoreV1().Secrets(nameSpace).Create(secret)
  		if err != nil && errors.IsAlreadyExists(err) {
  
  			klog.V(1).Infof("secret %s already exist in namespace %s", secret, nameSpace)
  			err = nil
  		}
  		if err != nil {
  			return nil, fmt.Errorf("failed to create secret %s, %v", secret, err)
  		}
  
  		if secretRef != nil {
  			secretRef.Name = secretName
  			klog.V(1).Infof("secret %v and secretRef %v", secret, secretRef)
  		}
  	} else {
  		return nil, fmt.Errorf("secret is nil")
  
  	}
  	return secretRef, nil
  }
docs: //createSecretRef() creates a secret reference.