# README

Internal package

This package can't be included by external repositories. We will maintain methods/functions here that should be shared between our different implementations (e.g. kubectl-fdb and the controller). We mark these methods internal to prevent external usage, since we don't give any guarantees for backwards compatibility.

# Packages

No description provided by the author

# Functions

BuildOwnerReference returns an OwnerReference for the provided input.
CleanupOldCliLogs removes old fdbcli log files.
CreateDefaultBackup creates a defaultFoundationDBCluster for testing.
CreateDefaultCluster creates a default FoundationDBCluster for testing.
CreatePodMap creates a map with the process group ID as a key and the according Pod as a value.
CreatePVCMap creates a map with the process group ID as a key and the according PVC as a value.
GetBackupDeployment builds a deployment for backup agents for a cluster.
GetConfigMap builds a config map for a cluster's dynamic config.
GetConfigMapMonitorConfEntry returns the specific key for the monitor conf in the ConfigMap.
GetCoordinatorsFromStatus gets the current coordinators from the status.
GetDesiredImageType determines whether a cluster is configured to use the unified or the split image.
GetDynamicConfHash gets a hash of the data from the config map holding the cluster's dynamic conf.
GetEnvVars returns a HashMap of EnvVars for the container.
GetHeadlessService builds a headless service for a FoundationDB cluster.
GetImage returns the image for container.
GetImageType determines whether a pod is using the unified or the split image.
GetJSONHash serializes an object to JSON and takes a hash of the resulting JSON.
GetMonitorConf builds the monitor conf template.
GetMonitorProcessConfiguration builds the monitor conf template for the unifed image.
GetObjectMetadata returns the ObjectMetadata for a process.
GetPod builds a pod for a new process group.
GetPodDNSName determines the fully qualified DNS name for a pod.
GetPodLabels creates the labels that we will apply to a Pod.
GetPodListOptions returns the listOptions to list Pods.
GetPodMatchLabels creates the labels that we will use when filtering for a pod.
GetPodMetadata returns the metadata for a specific Pod.
GetPodSpec builds a pod spec for a FoundationDB pod.
GetPodSpecHash builds the hash of the expected spec for a pod.
GetProcessClassFromMeta fetches the process class from an object's metadata.
GetProcessGroupID generates an ID for a process group.
GetProcessGroupIDFromMeta fetches the process group ID from an object's metadata.
GetPublicIPsForPod returns the public IPs for a Pod.
GetPublicIPSource determines how a Pod has gotten its public IP.
GetPvc builds a persistent volume claim for a FoundationDB process group.
GetPvcMetadata returns the metadata for a PVC.
GetService builds a service for a new process group.
GetSidecarImage returns the expected sidecar image for a specific process class.
GetSinglePodListOptions returns the listOptions to list a single Pod.
GetStartCommand builds the expected start command for a process group.
GetStorageServersPerPodForPod returns the value of STORAGE_SERVERS_PER_POD from the sidecar or 1.
HasDesiredFaultTolerance checks if the cluster has the desired fault tolerance.
IsNetworkError returns true if the network is a network error net.Error.
IsTimeoutError returns true if the observed error was a timeout error.
NewFdbPodClient builds a client for working with an FDB Pod.
NewMockFdbPodClient builds a mock client for working with an FDB pod.
NormalizeClusterSpec converts a cluster spec into an unambiguous, future-proof form, by applying any implicit defaults and moving configuration from deprecated fields into fully-supported fields.
ParseProcessGroupID extracts the components of an process group ID.
ProcessClassFromLabels extracts the ProcessClass label from the metav1.ObjectMeta.Labels map.

# Constants

ClusterFileKey defines the key name in the ConfigMap.
CurrentConfigurationAnnotation is the annotation we use to store the latest configuration.
EnvironmentAnnotation is the annotation we use to store the environment variables.
FDBImageTypeSplit indicates that a pod is using a different image for the main container and sidecar container.
FDBImageTypeUnified indicates that a pod is using a unified image for the main container and sidecar container.
MockUnreachableAnnotation defines if a Pod should be unreachable.
OldFDBClusterLabel represents the label that is used to represent the cluster of an instance Deprecated: This label will not be applied by default in the future.
OldFDBProcessClassLabel represents the label that is used to represent the process class Deprecated: This label will not be applied by default in the future.
OldFDBProcessGroupIDLabel represents the label that is used to represent a instance ID Deprecated: This label will not be applied by default in the future.

# Structs

DeprecationOptions controls how deprecations and changes to defaults get applied to our specs.

# Type aliases

FDBImageType describes a type of image a pod or cluster is using.