func MakeVDBName() types.NamespacedName {
	return types.NamespacedName{Name: "vertica-sample", Namespace: "default"}
}
MakeVDBName is a helper that creates a sample name for test purposes
package v1beta1
import (
	"fmt"
	"regexp"
	"github.com/vertica/vertica-kubernetes/pkg/paths"
	corev1 "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/api/resource"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/types"
)
const VerticaDBKind = "VerticaDB"
const VerticaDBAPIVersion = "vertica.com/v1beta1"
type VerticaDBSpec struct {
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	Image string `json:"image,omitempty"`
	Labels map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
	AutoRestartVertica bool `json:"autoRestartVertica"`
	DBName string `json:"dbName"`
	ShardCount int `json:"shardCount"`
	SuperuserPasswordSecret string `json:"superuserPasswordSecret,omitempty"`
	LicenseSecret string `json:"licenseSecret,omitempty"`
	IgnoreClusterLease bool `json:"ignoreClusterLease,omitempty"`
	InitPolicy CommunalInitPolicy `json:"initPolicy"`
	ReviveOrder []SubclusterPodCount `json:"reviveOrder,omitempty"`
	RestartTimeout int `json:"restartTimeout,omitempty"`
	Communal CommunalStorage `json:"communal"`
	Local LocalStorage `json:"local"`
	Subclusters []Subcluster `json:"subclusters"`
	KSafety KSafetyType `json:"kSafety,omitempty"`
	RequeueTime int `json:"requeueTime,omitempty"`
	Sidecars []corev1.Container `json:"sidecars,omitempty"`
	Volumes []corev1.Volume `json:"volumes,omitempty"`
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
	CertSecrets []corev1.LocalObjectReference `json:"certSecrets,omitempty"`
}
type CommunalInitPolicy string
const (
	CommunalInitPolicyCreate = "Create"
	CommunalInitPolicyRevive = "Revive"
	CommunalInitPolicyScheduleOnly = "ScheduleOnly"
)
type KSafetyType string
const (
	KSafety0 KSafetyType = "0"
	KSafety1 KSafetyType = "1"
)
type SubclusterPodCount struct {
	SubclusterIndex int `json:"subclusterIndex"`
	PodCount int `json:"podCount,omitempty"`
}
type CommunalStorage struct {
	Path string `json:"path"`
	IncludeUIDInPath bool `json:"includeUIDInPath,omitempty"`
	Endpoint string `json:"endpoint"`
	CredentialSecret string `json:"credentialSecret"`
	CaFile string `json:"caFile,omitempty"`
	Region string `json:"region,omitempty"`
	HadoopConfig string `json:"hadoopConfig,omitempty"`
}
type LocalStorage struct {
	StorageClass string `json:"storageClass,omitempty"`
	RequestSize resource.Quantity `json:"requestSize,omitempty"`
	DataPath string `json:"dataPath"`
	DepotPath string `json:"depotPath"`
}
type Subcluster struct {
	Name string `json:"name"`
	Size int32 `json:"size"`
	IsPrimary bool `json:"isPrimary"`
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	Affinity *corev1.Affinity `json:"affinity,omitempty"`
	PriorityClassName string `json:"priorityClassName,omitempty"`
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	ServiceType corev1.ServiceType `json:"serviceType,omitempty"`
	NodePort int32 `json:"nodePort,omitempty"`
	ExternalIPs []string `json:"externalIPs,omitempty"`
}
type VerticaDBStatus struct {
	InstallCount int32 `json:"installCount"`
	AddedToDBCount int32 `json:"addedToDBCount"`
	UpNodeCount int32 `json:"upNodeCount"`
	SubclusterCount int32 `json:"subclusterCount"`
	Subclusters []SubclusterStatus `json:"subclusters,omitempty"`
	Conditions []VerticaDBCondition `json:"conditions,omitempty"`
}
type VerticaDBConditionType string
const (
	AutoRestartVertica VerticaDBConditionType = "AutoRestartVertica"
	DBInitialized VerticaDBConditionType = "DBInitialized"
	ImageChangeInProgress VerticaDBConditionType = "ImageChangeInProgress"
)
const (
	AutoRestartVerticaIndex = iota
	DBInitializedIndex
	ImageChangeInProgressIndex
)
var VerticaDBConditionIndexMap = map[VerticaDBConditionType]int{
	AutoRestartVertica:    AutoRestartVerticaIndex,
	DBInitialized:         DBInitializedIndex,
	ImageChangeInProgress: ImageChangeInProgressIndex,
}
var VerticaDBConditionNameMap = map[int]VerticaDBConditionType{
	AutoRestartVerticaIndex:    AutoRestartVertica,
	DBInitializedIndex:         DBInitialized,
	ImageChangeInProgressIndex: ImageChangeInProgress,
}
type VerticaDBCondition struct {
	Type VerticaDBConditionType `json:"type"`
	Status corev1.ConditionStatus `json:"status"`
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
}
type SubclusterStatus struct {
	Name string `json:"name"`
	InstallCount int32 `json:"installCount"`
	AddedToDBCount int32 `json:"addedToDBCount"`
	UpNodeCount int32 `json:"upNodeCount"`
	Detail []VerticaDBPodStatus `json:"detail"`
}
type VerticaDBPodStatus struct {
	Installed bool `json:"installed"`
	AddedToDB bool `json:"addedToDB"`
	VNodeName string `json:"vnodeName"`
	UpNode bool `json:"upNode"`
}
type VerticaDB struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec   VerticaDBSpec   `json:"spec,omitempty"`
	Status VerticaDBStatus `json:"status,omitempty"`
}
type VerticaDBList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VerticaDB `json:"items"`
}
func init() {
	SchemeBuilder.Register(&VerticaDB{}, &VerticaDBList{})
}
const (
	VersionAnnotation   = "vertica.com/version"
	BuildDateAnnotation = "vertica.com/buildDate"
	BuildRefAnnotation  = "vertica.com/buildRef"
	DefaultS3Region       = "us-east-1"
	DefaultGCloudRegion   = "US-EAST1"
	DefaultGCloudEndpoint = "https://storage.googleapis.com"
)
func (v *VerticaDB) ExtractNamespacedName() types.NamespacedName {
	return types.NamespacedName{
		Name:      v.ObjectMeta.Name,
		Namespace: v.ObjectMeta.Namespace,
	}
}