func NewEtcdCertSecret(e *v1alpha1.EtcdCluster, caSecret *corev1.Secret, t EtcdCertType) (*corev1.Secret, error) {
	switch t {
	case EtcdPeerCert:
		return NewEtcdPeerCertSecret(e, caSecret)
	case EtcdServerCert:
		return NewEtcdServerCertSecret(e, caSecret)
	case EtcdClientCert:
		return NewEtcdClientCertSecret(e, caSecret)
	default:
		return nil, errors.Errorf("unsupport cert type: %s", t)
	}
}
// NewEtcdCertSecret returns a new etcd certificate secret based on the provided etcd cluster and certificate type
NewEtcdCertSecret returns a new etcd certificate secret based on the provided etcd cluster and certificate type
// NewEtcdCertSecret returns a new etcd certificate secret based on the provided etcd cluster and certificate type
func NewEtcdCertSecret(e *v1alpha1.EtcdCluster, caSecret *corev1.Secret, t EtcdCertType) (*corev1.Secret, error) {
	switch t {
	case EtcdPeerCert:
		return NewEtcdPeerCertSecret(e, caSecret)
	case EtcdServerCert:
		return NewEtcdServerCertSecret(e, caSecret)
	case EtcdClientCert:
		return NewEtcdClientCertSecret(e, caSecret)
	default:
		return nil, errors.Errorf("unsupport cert type: %s", t)
	}
}
func NewEtcdCertSecret ( e * v1alpha1 . EtcdCluster , caSecret * corev1 . Secret , t EtcdCertType ) ( * corev1 . Secret , error ) { switch t { case EtcdPeerCert : return NewEtcdPeerCertSecret ( e , caSecret ) case EtcdServerCert : return NewEtcdServerCertSecret ( e , caSecret ) case EtcdClientCert : return NewEtcdClientCertSecret ( e , caSecret ) default : return nil , errors . Errorf ( " " , t ) } }
NewEtcdCertSecret returns a new etcd certificate secret based on the provided etcd cluster and certificate type
NewEtcdCertSecret returns a new etcd certificate secret based on the provided etcd cluster and certificate type