builder

package
v1.11.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
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

func BuildAzureSASCommunalCredSecret(vdb *vapi.VerticaDB, blobEndpoint, sas string) *corev1.Secret

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

func BuildHlSvc(nm types.NamespacedName, vdb *vapi.VerticaDB) *corev1.Service

BuildHlSvc creates the desired spec for the headless service.

func BuildKerberosSecretBase

func BuildKerberosSecretBase(vdb *vapi.VerticaDB) *corev1.Secret

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

func BuildPod(vdb *vapi.VerticaDB, sc *vapi.Subcluster, podIndex int32) *corev1.Pod

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

func BuildS3CommunalCredSecret(vdb *vapi.VerticaDB, accessKey, secretKey string) *corev1.Secret

BuildS3CommunalCredSecret is a test helper to build up the Secret spec to store communal credentials

func BuildS3SseCustomerKeySecret added in v1.11.0

func BuildS3SseCustomerKeySecret(vdb *vapi.VerticaDB, clientKey string) *corev1.Secret

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

func GetK8sAffinity(a vapi.Affinity) *corev1.Affinity

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

func MakeAnnotationsForObject(vdb *vapi.VerticaDB) map[string]string

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

func MakeBaseSvcSelectorLabels(vdb *vapi.VerticaDB) map[string]string

MakeSvcSelectorLabels returns the labels that are used for selectors in service objects.

func MakeCommonLabels

func MakeCommonLabels(vdb *vapi.VerticaDB, sc *vapi.Subcluster, forPod bool) map[string]string

MakeCommonLabels returns the labels that are common to all objects.

func MakeLabelsForPodObject added in v1.7.0

func MakeLabelsForPodObject(vdb *vapi.VerticaDB, sc *vapi.Subcluster) map[string]string

MakeLabelsForPodObject constructs the labels that are common for all pods

func MakeLabelsForStsObject added in v1.7.0

func MakeLabelsForStsObject(vdb *vapi.VerticaDB, sc *vapi.Subcluster) map[string]string

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

func MakeOperatorLabels(vdb *vapi.VerticaDB) map[string]string

MakeOperatorLabels returns the labels that all objects created by this operator will have

func MakeStsSelectorLabels

func MakeStsSelectorLabels(vdb *vapi.VerticaDB, sc *vapi.Subcluster) map[string]string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL