Documentation
¶
Index ¶
- Constants
- func BuildAzureAccountKeyCommunalCredSecret(vdb *vapi.VerticaDB, accountName, accountKey string) *corev1.Secret
- func BuildAzureSASCommunalCredSecret(vdb *vapi.VerticaDB, blobEndpoint, sas string) *corev1.Secret
- func BuildExtSvc(nm types.NamespacedName, vdb *vapi.VerticaDB, sc *vapi.Subcluster, ...) *corev1.Service
- func BuildHlSvc(nm types.NamespacedName, vdb *vapi.VerticaDB) *corev1.Service
- func BuildKerberosSecretBase(vdb *vapi.VerticaDB) *corev1.Secret
- func BuildPV(vdb *vapi.VerticaDB, sc *vapi.Subcluster, podIndex int32) *corev1.PersistentVolume
- func BuildPVC(vdb *vapi.VerticaDB, sc *vapi.Subcluster, podIndex int32) *corev1.PersistentVolumeClaim
- func BuildPod(vdb *vapi.VerticaDB, sc *vapi.Subcluster, podIndex int32) *corev1.Pod
- func BuildS3CommunalCredSecret(vdb *vapi.VerticaDB, accessKey, secretKey string) *corev1.Secret
- func BuildS3SseCustomerKeySecret(vdb *vapi.VerticaDB, clientKey string) *corev1.Secret
- func BuildSecretBase(nm types.NamespacedName) *corev1.Secret
- func BuildStorageClass(allowVolumeExpansion bool) *storagev1.StorageClass
- func BuildStsSpec(nm types.NamespacedName, vdb *vapi.VerticaDB, sc *vapi.Subcluster, ...) *appsv1.StatefulSet
- func GetK8sAffinity(a vapi.Affinity) *corev1.Affinity
- func GetK8sLocalObjectReferenceArray(lors []vapi.LocalObjectReference) []corev1.LocalObjectReference
- func MakeAnnotationsForObject(vdb *vapi.VerticaDB) map[string]string
- func MakeAnnotationsForSubclusterService(vdb *vapi.VerticaDB, sc *vapi.Subcluster) map[string]string
- func MakeBaseSvcSelectorLabels(vdb *vapi.VerticaDB) map[string]string
- func MakeCommonLabels(vdb *vapi.VerticaDB, sc *vapi.Subcluster, forPod bool) map[string]string
- func MakeLabelsForPodObject(vdb *vapi.VerticaDB, sc *vapi.Subcluster) map[string]string
- func MakeLabelsForStsObject(vdb *vapi.VerticaDB, sc *vapi.Subcluster) map[string]string
- func MakeLabelsForSvcObject(vdb *vapi.VerticaDB, sc *vapi.Subcluster, svcType string) map[string]string
- func MakeOperatorLabels(vdb *vapi.VerticaDB) map[string]string
- func MakeStsSelectorLabels(vdb *vapi.VerticaDB, sc *vapi.Subcluster) map[string]string
- func MakeSubclusterLabels(sc *vapi.Subcluster) map[string]string
- func MakeSvcSelectorLabelsForServiceNameRouting(vdb *vapi.VerticaDB, sc *vapi.Subcluster) map[string]string
- func MakeSvcSelectorLabelsForSubclusterNameRouting(vdb *vapi.VerticaDB, sc *vapi.Subcluster) map[string]string
- type DeploymentNames
Constants ¶
const ( SuperuserPasswordPath = "superuser-passwd" TestStorageClassName = "test-storage-class" VerticaClientPort = 5433 VerticaAgentPort = 5444 VerticaHTTPPort = 8443 InternalVerticaCommPort = 5434 SSHPort = 22 VerticaClusterCommPort = 5434 SpreadClientPort = 4803 // Standard environment variables that are set in each pod PodIPEnv = "POD_IP" HostIPEnv = "HOST_IP" HostNameEnv = "HOST_NODENAME" DataPathEnv = "DATA_PATH" CatalogPathEnv = "CATALOG_PATH" DepotPathEnv = "DEPOT_PATH" DatabaseNameEnv = "DATABASE_NAME" )
const (
// The name of the key in the superuser password secret that holds the password
SuperuserPasswordKey = "password"
)
Variables ¶
This section is empty.
Functions ¶
func BuildAzureAccountKeyCommunalCredSecret ¶
func BuildAzureAccountKeyCommunalCredSecret(vdb *vapi.VerticaDB, accountName, accountKey string) *corev1.Secret
BuildAzureAccountKeyCommunalCredSecret builds a secret that is setup for Azure using an account key.
func BuildAzureSASCommunalCredSecret ¶
BuildAzureSASCommunalCredSecret builds a secret that is setup for Azure using shared access signature.
func BuildExtSvc ¶
func BuildExtSvc(nm types.NamespacedName, vdb *vapi.VerticaDB, sc *vapi.Subcluster, selectorLabelCreator func(*vapi.VerticaDB, *vapi.Subcluster) map[string]string) *corev1.Service
BuildExtSvc creates desired spec for the external service.
func BuildHlSvc ¶
BuildHlSvc creates the desired spec for the headless service.
func BuildKerberosSecretBase ¶
BuildKerberosSecretBase is a test helper that creates the skeleton of a Kerberos secret. The caller's responsibility to add the necessary data.
func BuildPV ¶ added in v1.7.0
func BuildPV(vdb *vapi.VerticaDB, sc *vapi.Subcluster, podIndex int32) *corev1.PersistentVolume
BuildPV will build a PV for test purposes
func BuildPVC ¶ added in v1.7.0
func BuildPVC(vdb *vapi.VerticaDB, sc *vapi.Subcluster, podIndex int32) *corev1.PersistentVolumeClaim
BuildPVC will build a PVC for test purposes
func BuildPod ¶
buildPod will construct a spec for a pod. This is only here for testing purposes when we need to construct the pods ourselves. This bit is typically handled by the statefulset controller.
func BuildS3CommunalCredSecret ¶
BuildS3CommunalCredSecret is a test helper to build up the Secret spec to store communal credentials
func BuildS3SseCustomerKeySecret ¶ added in v1.11.0
BuildS3SseCustomerKeySecret is a test helper that builds a secret that is setup for S3 SSE-C server-side encryption
func BuildSecretBase ¶
func BuildSecretBase(nm types.NamespacedName) *corev1.Secret
BuildSecretBase is a test helper that creates a Secret base with a specific name. The caller is responsible to add data elemets and create it.
func BuildStorageClass ¶ added in v1.7.0
func BuildStorageClass(allowVolumeExpansion bool) *storagev1.StorageClass
BuildStorageClass will construct a storageClass for test purposes
func BuildStsSpec ¶
func BuildStsSpec(nm types.NamespacedName, vdb *vapi.VerticaDB, sc *vapi.Subcluster, deployNames *DeploymentNames) *appsv1.StatefulSet
BuildStsSpec builds manifest for a subclusters statefulset
func GetK8sAffinity ¶
GetK8sAffinity returns a K8s Affinity object from a vapi.Affinity object
func GetK8sLocalObjectReferenceArray ¶
func GetK8sLocalObjectReferenceArray(lors []vapi.LocalObjectReference) []corev1.LocalObjectReference
GetK8sLocalObjectReferenceArray returns a k8s LocalObjecReference array from a vapi.LocalObjectReference array
func MakeAnnotationsForObject ¶
MakeAnnotationsForObjects builds the list of annotations that are to be included on new objects.
func MakeAnnotationsForSubclusterService ¶
func MakeAnnotationsForSubclusterService(vdb *vapi.VerticaDB, sc *vapi.Subcluster) map[string]string
MakeAnnotationsForSubclusterService returns a map of annotations for Subcluster sc's service under VerticaDB vdb.
func MakeBaseSvcSelectorLabels ¶
MakeSvcSelectorLabels returns the labels that are used for selectors in service objects.
func MakeCommonLabels ¶
MakeCommonLabels returns the labels that are common to all objects.
func MakeLabelsForPodObject ¶ added in v1.7.0
MakeLabelsForPodObject constructs the labels that are common for all pods
func MakeLabelsForStsObject ¶ added in v1.7.0
MakeLabelsForStsObject constructs the labels that are common for all statefulsets.
func MakeLabelsForSvcObject ¶
func MakeLabelsForSvcObject(vdb *vapi.VerticaDB, sc *vapi.Subcluster, svcType string) map[string]string
MakeLabelsForSvcObject will create the set of labels for use with service objects
func MakeOperatorLabels ¶
MakeOperatorLabels returns the labels that all objects created by this operator will have
func MakeStsSelectorLabels ¶
MakeStsSelectorLabels will create the selector labels for use within a StatefulSet
func MakeSubclusterLabels ¶
func MakeSubclusterLabels(sc *vapi.Subcluster) map[string]string
MakeSubclusterLabels returns the labels added for the subcluster
func MakeSvcSelectorLabelsForServiceNameRouting ¶
func MakeSvcSelectorLabelsForServiceNameRouting(vdb *vapi.VerticaDB, sc *vapi.Subcluster) map[string]string
MakeSvcSelectorLabelsForServiceNameRouting will create the labels for when we want a service object to pick the pods based on the service name. This allows us to combine multiple subcluster under a single service object.
func MakeSvcSelectorLabelsForSubclusterNameRouting ¶
func MakeSvcSelectorLabelsForSubclusterNameRouting(vdb *vapi.VerticaDB, sc *vapi.Subcluster) map[string]string
MakeSvcSelectorLabelsForSubclusterNameRouting will create the labels for when we want a service object to pick the pods based on the subcluster name.
Types ¶
type DeploymentNames ¶ added in v1.7.0
type DeploymentNames struct { ServiceAccountName string // Name of the service account to use for vertica pods PrefixName string // The common prefix for all objects created when deploying the operator }
DeploymentNames gives context about the names used in deploying the operator
func DefaultDeploymentNames ¶ added in v1.7.0
func DefaultDeploymentNames() *DeploymentNames
DefaultDeploymentNames generates a DeploymentNames based on the defaults. This is for test purposes.