v1beta1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package v1beta1 contains API Schema definitions for the apps v1beta1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/foundationdb/fdb-kubernetes-operator/pkg/apis/apps +k8s:defaulter-gen=TypeMeta +groupName=apps.foundationdb.org

Package v1beta1 contains API Schema definitions for the apps v1beta1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/foundationdb/fdb-kubernetes-operator/pkg/apis/apps +k8s:defaulter-gen=TypeMeta +groupName=apps.foundationdb.org

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "apps.foundationdb.org", Version: "v1beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme is required by pkg/client/...
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var ProcessClasses = fieldNames(ProcessCounts{})

ProcessClasses provides a consistent ordered list of the supported process classes.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource is required by pkg/client/listers/...

Types

type ClusterHealth

type ClusterHealth struct {
	// Available reports whether the database is accepting reads and writes.
	Available bool `json:"available,omitempty"`

	// Healthy reports whether the database is in a fully healthy state.
	Healthy bool `json:"healthy,omitempty"`

	// FullReplication reports whether all data are fully replicated according
	// to the current replication policy.
	FullReplication bool `json:"fullReplication,omitempty"`

	// DataMovementPriority reports the priority of the highest-priority data
	// movement in the cluster.
	DataMovementPriority int `json:"dataMovementPriority,omitempty"`
}

ClusterHealth represents different views into health in the cluster status.

func (*ClusterHealth) DeepCopy

func (in *ClusterHealth) DeepCopy() *ClusterHealth

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterHealth.

func (*ClusterHealth) DeepCopyInto

func (in *ClusterHealth) DeepCopyInto(out *ClusterHealth)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConnectionString

type ConnectionString struct {
	// DatabaseName provides an identifier for the database which persists
	// across coordinator changes.
	DatabaseName string

	// GenerationID provides a unique ID for the current generation of
	// coordinators.
	GenerationID string

	// Coordinators provides the addresses of the current coordinators.
	Coordinators []string
}

ConnectionString models the contents of a cluster file in a structured way

func ParseConnectionString

func ParseConnectionString(str string) (ConnectionString, error)

ParseConnectionString parses a connection string from its string representation

func (*ConnectionString) DeepCopy

func (in *ConnectionString) DeepCopy() *ConnectionString

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionString.

func (*ConnectionString) DeepCopyInto

func (in *ConnectionString) DeepCopyInto(out *ConnectionString)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ConnectionString) GenerateNewGenerationID

func (str *ConnectionString) GenerateNewGenerationID() error

GenerateNewGenerationID builds a new generation ID

func (*ConnectionString) HasCoordinators

func (str *ConnectionString) HasCoordinators(coordinators []string) bool

HasCoordinators checks whether this connection string matches a set of coordinators.

func (*ConnectionString) String

func (str *ConnectionString) String() string

String formats a connection string as a string

type ContainerOverrides

type ContainerOverrides struct {

	// EnableTLS controls whether we should be listening on a TLS connection.
	EnableTLS bool `json:"enableTls,omitempty"`

	// PeerVerificationRules provides the rules for what client certificates
	// the process should accept.
	PeerVerificationRules string `json:"peerVerificationRules,omitempty"`

	// Env provides environment variables.
	//
	// Deprecated: Use the PodTemplate field instead.
	Env []corev1.EnvVar `json:"env,omitempty"`

	// VolumeMounts provides volume mounts.
	//
	// Deprecated: Use the PodTemplate field instead.
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`

	// ImageName provides the name of the image to use for the container,
	// without the version tag.
	//
	// Deprecated: Use the PodTemplate field instead.
	ImageName string `json:"imageName,omitempty"`

	// SecurityContext provides the container's security context.
	//
	// Deprecated: Use the PodTemplate field instead.
	SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
}

ContainerOverrides provides options for customizing a container created by the operator.

func (*ContainerOverrides) DeepCopy

func (in *ContainerOverrides) DeepCopy() *ContainerOverrides

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerOverrides.

func (*ContainerOverrides) DeepCopyInto

func (in *ContainerOverrides) DeepCopyInto(out *ContainerOverrides)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DataCenter

type DataCenter struct {
	// The ID of the data center. This must match the dcid locality field.
	ID string `json:"id,omitempty"`

	// The priority of this data center when we have to choose a location.
	// Higher priorities are preferred over lower priorities.
	Priority int `json:"priority,omitempty"`

	// Satellite indicates whether the data center is serving as a satellite for
	// the region. A value of 1 indicates that it is a satellite, and a value of
	// 0 indicates that it is not a satellite.
	Satellite int `json:"satellite,omitempty"`
}

DataCenter represents a data center in the region configuration

func (*DataCenter) DeepCopy

func (in *DataCenter) DeepCopy() *DataCenter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataCenter.

func (*DataCenter) DeepCopyInto

func (in *DataCenter) DeepCopyInto(out *DataCenter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DatabaseConfiguration

type DatabaseConfiguration struct {
	// RedundancyMode defines the core replication factor for the database.
	RedundancyMode string `json:"redundancy_mode,omitempty"`

	// StorageEngine defines the storage engine the database uses.
	StorageEngine string `json:"storage_engine,omitempty"`

	// UsableRegions defines how many regions the database should store data in.
	UsableRegions int `json:"usable_regions,omitempty"`

	// Regions defines the regions that the database can replicate in.
	Regions []Region `json:"regions,omitempty"`

	// RoleCounts defines how many processes the database should recruit for
	// each role.
	RoleCounts
}

DatabaseConfiguration represents the configuration of the database

func (*DatabaseConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseConfiguration.

func (*DatabaseConfiguration) DeepCopyInto

func (in *DatabaseConfiguration) DeepCopyInto(out *DatabaseConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (DatabaseConfiguration) FillInDefaultsFromStatus deprecated

func (configuration DatabaseConfiguration) FillInDefaultsFromStatus() DatabaseConfiguration

FillInDefaultsFromStatus adds in missing fields from the database configuration in the database status to make sure they match the fields that will appear in the cluster spec.

Deprecated: Use NormalizeConfiguration instead.

func (DatabaseConfiguration) GetConfigurationString

func (configuration DatabaseConfiguration) GetConfigurationString() (string, error)

GetConfigurationString gets the CLI command for configuring a database.

func (DatabaseConfiguration) GetNextConfigurationChange added in v0.3.0

func (configuration DatabaseConfiguration) GetNextConfigurationChange(finalConfiguration DatabaseConfiguration) DatabaseConfiguration

GetNextConfigurationChange produces the next marginal change that should be made to transform this configuration into another configuration.

If there are multiple changes between the two configurations that can not be made simultaneously, this will produce a subset of the changes that move in the correct direction. Applying this method repeatedly will eventually converge on the final configuration.

func (DatabaseConfiguration) NormalizeConfiguration added in v0.3.0

func (configuration DatabaseConfiguration) NormalizeConfiguration() DatabaseConfiguration

NormalizeConfiguration ensures a standardized format and defaults when comparing database configuration in the cluster spec with database configuration in the cluster status.

This will fill in defaults of -1 for some fields that have a default of 0, and will ensure that the region configuration is ordered consistently.

type FdbVersion added in v0.3.0

type FdbVersion struct {
	// Major is the major version
	Major int

	// Minor is the major version
	Minor int

	// Patch is the major version
	Patch int
}

FdbVersion represents a version of FoundationDB.

This provides convenience methods for checking features available in different versions.

func ParseFdbVersion added in v0.3.0

func ParseFdbVersion(version string) (FdbVersion, error)

ParseFdbVersion parses a version from its string representation.

func (*FdbVersion) DeepCopy added in v0.3.0

func (in *FdbVersion) DeepCopy() *FdbVersion

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FdbVersion.

func (*FdbVersion) DeepCopyInto added in v0.3.0

func (in *FdbVersion) DeepCopyInto(out *FdbVersion)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (FdbVersion) HasInstanceIdInSidecarSubstitutions added in v0.3.0

func (version FdbVersion) HasInstanceIdInSidecarSubstitutions() bool

HasInstanceIdInSidecarSubstitutions determines if a version has FDB_INSTANCE_ID supported natively in the variable substitutions in the sidecar.

func (FdbVersion) IsAtLeast added in v0.3.0

func (version FdbVersion) IsAtLeast(other FdbVersion) bool

IsAtLeast determines if a version is greater than or equal to another version.

func (FdbVersion) PrefersCommandLineArgumentsInSidecar added in v0.3.0

func (version FdbVersion) PrefersCommandLineArgumentsInSidecar() bool

PrefersCommandLineArgumentsInSidecar determines if a version has support for configuring the sidecar exclusively through command-line arguments.

func (FdbVersion) String added in v0.3.0

func (version FdbVersion) String() string

String gets the string representation of an FDB version.

func (FdbVersion) SupportsUsingBinariesFromMainContainer added in v0.3.0

func (version FdbVersion) SupportsUsingBinariesFromMainContainer() bool

SupportsUsingBinariesFromMainContainer determines if a version has support for having the sidecar dynamically switch between using binaries from the main container and binaries provided by the sidecar.

type FoundationDBCluster

type FoundationDBCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the desired state of the cluster.
	Spec FoundationDBClusterSpec `json:"spec,omitempty"`

	// Status defines the current state of the cluster.
	Status FoundationDBClusterStatus `json:"status,omitempty"`
}

FoundationDBCluster is the Schema for the foundationdbclusters API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Generation",type="integer",JSONPath=".metadata.generation",description="Latest generation of the spec",priority=0 +kubebuilder:printcolumn:name="Reconciled",type="integer",JSONPath=".status.generations.reconciled",description="Last reconciled generation of the spec",priority=0 +kubebuilder:printcolumn:name="Healthy",type="boolean",JSONPath=".status.health.healthy",description="Database health",priority=0

func (*FoundationDBCluster) DeepCopy

func (in *FoundationDBCluster) DeepCopy() *FoundationDBCluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBCluster.

func (*FoundationDBCluster) DeepCopyInto

func (in *FoundationDBCluster) DeepCopyInto(out *FoundationDBCluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FoundationDBCluster) DeepCopyObject

func (in *FoundationDBCluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*FoundationDBCluster) DesiredCoordinatorCount

func (cluster *FoundationDBCluster) DesiredCoordinatorCount() int

DesiredCoordinatorCount returns the number of coordinators to recruit for a cluster.

func (*FoundationDBCluster) DesiredDatabaseConfiguration

func (cluster *FoundationDBCluster) DesiredDatabaseConfiguration() DatabaseConfiguration

DatabaseConfiguration builds the database configuration for the cluster based on its spec.

func (*FoundationDBCluster) DesiredFaultTolerance

func (cluster *FoundationDBCluster) DesiredFaultTolerance() int

DesiredFaultTolerance returns the number of replicas we should be able to lose when the cluster is at full replication health.

func (*FoundationDBCluster) GetFullAddress

func (cluster *FoundationDBCluster) GetFullAddress(ipAddress string) string

GetFullAddress gets the full public address we should use for a process. This will include the IP address, the port, and any additional flags.

func (*FoundationDBCluster) GetFullAddressList added in v0.3.0

func (cluster *FoundationDBCluster) GetFullAddressList(ipAddress string, primaryOnly bool) string

GetFullAddress gets the full list of public address we should use for a process.

This will include the IP address, the port, and any additional flags.

If a process needs multiple addresses, this will include all of them, separated by commas. If you pass false for primaryOnly, this will return only the primary address.

func (*FoundationDBCluster) GetFullSidecarVersion

func (cluster *FoundationDBCluster) GetFullSidecarVersion(useRunningVersion bool) string

GetFullSidecarVersion gets the version of the image for the sidecar, including the main FoundationDB version and the sidecar version suffix.

func (*FoundationDBCluster) GetProcessCountsWithDefaults

func (cluster *FoundationDBCluster) GetProcessCountsWithDefaults() ProcessCounts

GetProcessCountsWithDefaults gets the process counts from the cluster spec and fills in default values for any counts that are 0.

func (*FoundationDBCluster) GetRoleCountsWithDefaults

func (cluster *FoundationDBCluster) GetRoleCountsWithDefaults() RoleCounts

GetRoleCountsWithDefaults gets the role counts from the cluster spec and fills in default values for any role counts that are 0.

The default Storage value will be 2F + 1, where F is the cluster's fault tolerance.

The default Logs value will be 3.

The default Proxies value will be 3.

The default Resolvers value will be 1.

The default RemoteLogs value will be equal to the Logs value when the UsableRegions is greater than 1. It will be equal to -1 when the UsableRegions is less than or equal to 1.

The default LogRouters value will be equal to 3 times the Logs value when the UsableRegions is greater than 1. It will be equal to -1 when the UsableRegions is less than or equal to 1.

func (*FoundationDBCluster) IsBeingUpgraded added in v0.3.0

func (cluster *FoundationDBCluster) IsBeingUpgraded() bool

IsBeingUpgraded determines whether the cluster has a pending upgrade.

func (*FoundationDBCluster) MinimumFaultDomains

func (cluster *FoundationDBCluster) MinimumFaultDomains() int

MinimumFaultDomains returns the number of fault domains the cluster needs to function.

type FoundationDBClusterAutomationOptions

type FoundationDBClusterAutomationOptions struct {
	// ConfigureDatabase defines whether the operator is allowed to reconfigure
	// the database.
	ConfigureDatabase *bool `json:"configureDatabase,omitempty"`

	// KillProcesses defines whether the operator is allowed to bounce fdbserver
	// processes.
	KillProcesses *bool `json:"killProcesses,omitempty"`

	// DeletePods defines whether the operator is allowed to delete pods in
	// order to recreate them.
	DeletePods *bool `json:"deletePods,omitempty"`
}

FoundationDBClusterAutomationOptions provides flags for enabling or disabling operations that can be performed on a cluster.

func (*FoundationDBClusterAutomationOptions) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBClusterAutomationOptions.

func (*FoundationDBClusterAutomationOptions) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FoundationDBClusterFaultDomain

type FoundationDBClusterFaultDomain struct {
	// Key provides a topology key for the fault domain to replicate across.
	Key string `json:"key,omitempty"`

	// Value provides a harcoded value to use for the zoneid for the pods.
	Value string `json:"value,omitempty"`

	// ValueFrom provides a field selector to use as the source of the fault
	// domain.
	ValueFrom string `json:"valueFrom,omitempty"`

	// ZoneCount provides the number of fault domains in the data center where
	// these processes are running. This is only used in the
	// `kubernetes-cluster` fault domain strategy.
	ZoneCount int `json:"zoneCount,omitempty"`

	// ZoneIndex provides the index of this Kubernetes cluster in the list of
	// KCs in the data center. This is only used in the `kubernetes-cluster`
	// fault domain strategy.
	ZoneIndex int `json:"zoneIndex,omitempty"`
}

FoundationDBClusterFaultDomain describes the fault domain that a cluster is replicated across.

func (*FoundationDBClusterFaultDomain) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBClusterFaultDomain.

func (*FoundationDBClusterFaultDomain) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FoundationDBClusterList

type FoundationDBClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items defines the clusters in the list.
	Items []FoundationDBCluster `json:"items"`
}

FoundationDBClusterList contains a list of FoundationDBCluster

func (*FoundationDBClusterList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBClusterList.

func (*FoundationDBClusterList) DeepCopyInto

func (in *FoundationDBClusterList) DeepCopyInto(out *FoundationDBClusterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FoundationDBClusterList) DeepCopyObject

func (in *FoundationDBClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FoundationDBClusterSpec

type FoundationDBClusterSpec struct {
	// Version defines the version of FoundationDB the cluster should run.
	Version string `json:"version"`

	// SidecarVersions defines the build version of the sidecar to run. This
	// maps an FDB version to the corresponding sidecar build version.
	SidecarVersions map[string]int `json:"sidecarVersions,omitempty"`

	// RunningVersion defines the version of FoundationDB that the cluster is
	// currently running.
	RunningVersion string `json:"runningVersion,omitempty"`

	// DatabaseConfiguration defines the database configuration.
	DatabaseConfiguration `json:"databaseConfiguration,omitempty"`

	// Configured defines whether we have configured the database yet.
	Configured bool `json:"configured,omitempty"`

	// ProcessCounts defines the number of processes to configure for each
	// process class. You can generally omit this, to allow the operator to
	// infer the process counts based on the database configuration.
	ProcessCounts `json:"processCounts,omitempty"`

	// ConnectionString defines the contents of the cluster file.
	ConnectionString string `json:"connectionString,omitempty"`

	// FaultDomain defines the rules for what fault domain to replicate across.
	FaultDomain FoundationDBClusterFaultDomain `json:"faultDomain,omitempty"`

	// CustomParameters defines additional parameters to pass to the fdbserver
	// processes.
	CustomParameters []string `json:"customParameters,omitempty"`

	// PendingRemovals defines the processes that are pending removal.
	// This maps the name of a pod to its IP address. If a value is left blank,
	// the controller will provide the pod's current IP.
	PendingRemovals map[string]string `json:"pendingRemovals,omitempty"`

	// PodTemplate allows customizing the FoundationDB pods.
	PodTemplate *corev1.PodTemplateSpec `json:"podTemplate,omitempty"`

	// VolumeClaim allows customizing the persistent volume claim for the
	// FoundationDB pods.
	VolumeClaim *corev1.PersistentVolumeClaim

	// ConfigMap allows customizing the config map the operator creates.
	ConfigMap *corev1.ConfigMap

	// MainContainer defines customization for the foundationdb container.
	MainContainer ContainerOverrides `json:"mainContainer,omitempty"`

	// SidecarContainer defines customization for the
	// foundationdb-kubernetes-sidecar container.
	SidecarContainer ContainerOverrides `json:"sidecarContainer,omitempty"`

	// TrustedCAs defines a list of root CAs the cluster should trust, in PEM
	// format.
	TrustedCAs []string `json:"trustedCAs,omitempty"`

	// SidecarVariables defines Ccustom variables that the sidecar should make
	// available for substitution in the monitor conf file.
	SidecarVariables []string `json:"sidecarVariables,omitempty"`

	// LogGroup defines the log group to use for the trace logs for the cluster.
	LogGroup string `json:"logGroup,omitempty"`

	// DataCenter defines the data center where these processes are running.
	DataCenter string `json:"dataCenter,omitempty"`

	// AutomationOptions defines customization for enabling or disabling certain
	// operations in the operator.
	AutomationOptions FoundationDBClusterAutomationOptions `json:"automationOptions,omitempty"`

	// InstanceIDPrefix defines a prefix to append to the instance IDs in the
	// locality fields.
	InstanceIDPrefix string `json:"instanceIDPrefix,omitempty"`

	// SidecarVersion defines the build version of the sidecar to use.
	//
	// Deprecated: Use SidecarVersions instead.
	SidecarVersion int `json:"sidecarVersion,omitempty"`

	// PodLabels defines custom labels to apply to the FDB pods.
	//
	// Deprecated: Use the PodTemplate field instead.
	PodLabels map[string]string `json:"podLabels,omitempty"`

	// Resources defines the resource requirements for the foundationdb
	// containers.
	//
	// Deprecated: Use the PodTemplate field instead.
	Resources *corev1.ResourceRequirements `json:"resources,omitempty"`

	// InitContainers defines custom init containers for the FDB pods.
	//
	// Deprecated: Use the PodTemplate field instead.
	InitContainers []corev1.Container `json:"initContainers,omitempty"`

	// Containers defines custom containers for the FDB pods.
	//
	// Deprecated: Use the PodTemplate field instead.
	Containers []corev1.Container `json:"containers,omitempty"`

	// Volumes defines custom volumes for the FDB pods.
	//
	// Deprecated: Use the PodTemplate field instead.
	Volumes []corev1.Volume `json:"volumes,omitempty"`

	// PodSecurityContext defines the security context to apply to the FDB pods.
	//
	// Deprecated: Use the PodTemplate field instead.
	PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`

	// AutomountServiceAccountToken defines whether we should automount the
	// service account tokens in the FDB pods.
	//
	// Deprecated: Use the PodTemplate field instead.
	AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"`

	// NextInstanceID defines the ID to use when creating the next instance.
	//
	// Deprecated: This is no longer used.
	NextInstanceID int `json:"nextInstanceID,omitempty"`

	// StorageClass defines the storage class for the volumes in the cluster.
	//
	// Deprecated: Use the VolumeClaim field instead.
	StorageClass *string `json:"storageClass,omitempty"`

	// VolumeSize defines the size of the volume to use for stateful processes.
	//
	// Deprecated: Use the VolumeClaim field instead.
	VolumeSize string `json:"volumeSize,omitempty"`
}

FoundationDBClusterSpec defines the desired state of a cluster.

func (*FoundationDBClusterSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBClusterSpec.

func (*FoundationDBClusterSpec) DeepCopyInto

func (in *FoundationDBClusterSpec) DeepCopyInto(out *FoundationDBClusterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FoundationDBClusterStatus

type FoundationDBClusterStatus struct {
	// ProcessCounts defines the number of processes that are currently running
	// in the cluster.
	ProcessCounts `json:"processCounts,omitempty"`

	// IncorrectProcesses provides the processes that do not have the correct
	// configuration.
	//
	// This will map the instance ID to the timestamp when we observed the
	// incorrect configuration.
	IncorrectProcesses map[string]int64 `json:"incorrectProcesses,omitempty"`

	// MissingProcesses provides the processes that are not reporting to the
	// cluster.
	// This will map the names of the pod to the timestamp when we observed
	// that the process was missing.
	MissingProcesses map[string]int64 `json:"missingProcesses,omitempty"`

	// DatabaseConfiguration provides the running configuration of the database.
	DatabaseConfiguration DatabaseConfiguration `json:"databaseConfiguration,omitempty"`

	// Generations provides information about the latest generation to be
	// reconciled, or to reach other stages at which reconciliation can halt.
	Generations GenerationStatus `json:"generations,omitempty"`

	// Health provides information about the health of the database.
	Health ClusterHealth `json:"health,omitempty"`

	// RequiredAddresses define that addresses that we need to enable for the
	// processes in the cluster.
	RequiredAddresses RequiredAddressSet `json:"requiredAddresses,omitempty"`
}

FoundationDBClusterStatus defines the observed state of FoundationDBCluster

func (*FoundationDBClusterStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBClusterStatus.

func (*FoundationDBClusterStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FoundationDBStatus

type FoundationDBStatus struct {
	// Client provides the client section of the status.
	Client FoundationDBStatusLocalClientInfo `json:"client,omitempty"`

	// Cluster provides the cluster section of the status.
	Cluster FoundationDBStatusClusterInfo `json:"cluster,omitempty"`
}

FoundationDBStatus describes the status of the cluster as provided by FoundationDB itself.

func (*FoundationDBStatus) DeepCopy

func (in *FoundationDBStatus) DeepCopy() *FoundationDBStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBStatus.

func (*FoundationDBStatus) DeepCopyInto

func (in *FoundationDBStatus) DeepCopyInto(out *FoundationDBStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FoundationDBStatusClientDBStatus

type FoundationDBStatusClientDBStatus struct {
	// Available indicates whether the database is accepting traffic.
	Available bool `json:"available,omitempty"`

	// Healthy indicates whether the database is fully healthy.
	Healthy bool `json:"healthy,omitempty"`
}

FoundationDBStatusClientDBStatus represents the databaseStatus field in the JSON database status

func (*FoundationDBStatusClientDBStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBStatusClientDBStatus.

func (*FoundationDBStatusClientDBStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FoundationDBStatusClusterClientInfo added in v0.2.0

type FoundationDBStatusClusterClientInfo struct {
	// Count provides the number of clients connected to the database.
	Count int `json:"count,omitempty"`

	// SupportedVersions provides information about the versions supported by
	// the connected clients.
	SupportedVersions []FoundationDBStatusSupportedVersion `json:"supported_versions,omitempty"`
}

FoundationDBStatusClusterClientInfo represents the connected client details in the cluster status.

func (*FoundationDBStatusClusterClientInfo) DeepCopy added in v0.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBStatusClusterClientInfo.

func (*FoundationDBStatusClusterClientInfo) DeepCopyInto added in v0.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FoundationDBStatusClusterInfo

type FoundationDBStatusClusterInfo struct {
	// DatabaseConfiguration describes the current configuration of the
	// database.
	DatabaseConfiguration DatabaseConfiguration `json:"configuration,omitempty"`

	// Processes provides details on the processes that are reporting to the
	// cluster.
	Processes map[string]FoundationDBStatusProcessInfo `json:"processes,omitempty"`

	// Data provides information about the data in the database.
	Data FoundationDBStatusDataStatistics `json:"data,omitempty"`

	// FullReplication indicates whether the database is fully replicated.
	FullReplication bool `json:"full_replication,omitempty"`

	// Clients provides information about clients that are connected to the
	// database.
	Clients FoundationDBStatusClusterClientInfo `json:"clients,omitemtpy"`
}

FoundationDBStatusClusterInfo describes the "cluster" portion of the cluster status

func (*FoundationDBStatusClusterInfo) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBStatusClusterInfo.

func (*FoundationDBStatusClusterInfo) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FoundationDBStatusConnectedClient added in v0.2.0

type FoundationDBStatusConnectedClient struct {
	// Address provides the address the client is connecting from.
	Address string `json:"address,omitempty"`

	// LogGroup provides the trace log group the client has set.
	LogGroup string `json:"log_group,omitempty"`
}

FoundationDBStatusConnectedClient provides information about a client that is connected to the database.

func (*FoundationDBStatusConnectedClient) DeepCopy added in v0.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBStatusConnectedClient.

func (*FoundationDBStatusConnectedClient) DeepCopyInto added in v0.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (FoundationDBStatusConnectedClient) Description added in v0.2.0

func (client FoundationDBStatusConnectedClient) Description() string

Description returns a string description of the a connected client.

type FoundationDBStatusCoordinator

type FoundationDBStatusCoordinator struct {
	// Address provides the coordinator's address.
	Address string `json:"address,omitempty"`

	// Reachable indicates whether the coordinator is reachable.
	Reachable bool `json:"reachable,omitempty"`
}

FoundationDBStatusCoordinator contains information about one of the coordinators.

func (*FoundationDBStatusCoordinator) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBStatusCoordinator.

func (*FoundationDBStatusCoordinator) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FoundationDBStatusCoordinatorInfo

type FoundationDBStatusCoordinatorInfo struct {
	// Coordinators provides a list with coordinator details.
	Coordinators []FoundationDBStatusCoordinator `json:"coordinators,omitempty"`
}

FoundationDBStatusCoordinatorInfo contains information about the client's connection to the coordinators.

func (*FoundationDBStatusCoordinatorInfo) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBStatusCoordinatorInfo.

func (*FoundationDBStatusCoordinatorInfo) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FoundationDBStatusDataStatistics

type FoundationDBStatusDataStatistics struct {
	// KVBytes provides the total Key Value Bytes in the database.
	KVBytes int `json:"total_kv_size_bytes,omitempty"`

	// MovingData provides information about the current data movement.
	MovingData FoundationDBStatusMovingData `json:"moving_data,omitempty"`
}

FoundationDBStatusDataStatistics provides information about the data in the database

func (*FoundationDBStatusDataStatistics) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBStatusDataStatistics.

func (*FoundationDBStatusDataStatistics) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FoundationDBStatusLocalClientInfo added in v0.2.0

type FoundationDBStatusLocalClientInfo struct {
	// Coordinators provides information about the cluster's coordinators.
	Coordinators FoundationDBStatusCoordinatorInfo `json:"coordinators,omitempty"`

	// DatabaseStatus provides a summary of the database's health.
	DatabaseStatus FoundationDBStatusClientDBStatus `json:"database_status,omitempty"`
}

FoundationDBStatusLocalClientInfo contains information about the client connection from the process getting the status.

func (*FoundationDBStatusLocalClientInfo) DeepCopy added in v0.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBStatusLocalClientInfo.

func (*FoundationDBStatusLocalClientInfo) DeepCopyInto added in v0.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FoundationDBStatusMovingData

type FoundationDBStatusMovingData struct {
	// HighestPriority provides the priority of the highest-priority data
	// movement.
	HighestPriority int `json:"highest_priority,omitempty"`

	// InFlightBytes provides how many bytes are being actively moved.
	InFlightBytes int `json:"in_flight_bytes,omitempty"`

	// InQueueBytes provides how many bytes are pending data movement.
	InQueueBytes int `json:"in_queue_bytes,omitempty"`
}

FoundationDBStatusMovingData provides information about the current data movement

func (*FoundationDBStatusMovingData) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBStatusMovingData.

func (*FoundationDBStatusMovingData) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FoundationDBStatusProcessInfo

type FoundationDBStatusProcessInfo struct {
	// Address provides the address of the process.
	Address string `json:"address,omitempty"`

	// ProcessClass provides the process class the process has been given.
	ProcessClass string `json:"class_type,omitempty"`

	// CommandLine provides the command-line invocation for the process.
	CommandLine string `json:"command_line,omitempty"`

	// Excluded indicates whether the process has been excluded.
	Excluded bool `json:"excluded,omitempty"`

	// The locality information for the process.
	Locality map[string]string `json:"locality,omitempty"`
}

FoundationDBStatusProcessInfo describes the "processes" portion of the cluster status

func (*FoundationDBStatusProcessInfo) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBStatusProcessInfo.

func (*FoundationDBStatusProcessInfo) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FoundationDBStatusSupportedVersion added in v0.2.0

type FoundationDBStatusSupportedVersion struct {
	// ClientVersion provides the version of FDB the client is connecting
	// through.
	ClientVersion string `json:"client_version,omitempty"`

	// ConnectedClient provides the clients that are using this version.
	ConnectedClients []FoundationDBStatusConnectedClient `json:"connected_clients"`

	// ProtocolVersion is the version of the wire protocol the client is using.
	ProtocolVersion string `json:"protocol_version,omitempty"`

	// SourceVersion is the version of the source code that the client library
	// was built from.
	SourceVersion string `json:"source_version,omitempty"`
}

FoundationDBStatusSupportedVersion provides information about a version of FDB supported by the connected clients.

func (*FoundationDBStatusSupportedVersion) DeepCopy added in v0.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FoundationDBStatusSupportedVersion.

func (*FoundationDBStatusSupportedVersion) DeepCopyInto added in v0.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GenerationStatus

type GenerationStatus struct {
	// Reconciled provides the last generation that was fully reconciled.
	Reconciled int64 `json:"reconciled,omitempty"`

	// NeedsConfigurationChange provides the last generation that is pending
	// a change to configuration.
	NeedsConfigurationChange int64 `json:"needsConfigurationChange,omitempty"`

	// NeedsBounce provides the last generation that is pending a bounce of
	// fdbserver.
	NeedsBounce int64 `json:"needsBounce,omitempty"`

	// NeedsPodDeletion provides the last generation that is pending pods being
	// deleted and recreated.
	NeedsPodDeletion int64 `json:"needsPodDeletion,omitempty"`
}

GenerationStatus stores information on which generations have reached different stages in reconciliation.

func (*GenerationStatus) DeepCopy

func (in *GenerationStatus) DeepCopy() *GenerationStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenerationStatus.

func (*GenerationStatus) DeepCopyInto

func (in *GenerationStatus) DeepCopyInto(out *GenerationStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProcessAddress added in v0.3.0

type ProcessAddress struct {
	IPAddress string
	Port      int
	Flags     map[string]bool
}

ProcessAddress provides a structured address for a process.

func ParseProcessAddress added in v0.3.0

func ParseProcessAddress(address string) (ProcessAddress, error)

ParseProcessAddress parses a structured address from its string representation.

func (*ProcessAddress) DeepCopy added in v0.3.0

func (in *ProcessAddress) DeepCopy() *ProcessAddress

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProcessAddress.

func (*ProcessAddress) DeepCopyInto added in v0.3.0

func (in *ProcessAddress) DeepCopyInto(out *ProcessAddress)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ProcessAddress) String added in v0.3.0

func (address ProcessAddress) String() string

String gets the string representation of an address.

type ProcessCounts

type ProcessCounts struct {
	// Storage defines the number of storage class processes.
	Storage int `json:"storage,omitempty"`

	// Transaction defines the number of transaction class processes.
	Transaction int `json:"transaction,omitempty"`

	// Stateless defines the number of stateless class processes.
	Stateless int `json:"stateless,omitempty"`

	// Resolution defines the number of resolution class processes.
	Resolution        int `json:"resolution,omitempty"`
	Unset             int `json:"unset,omitempty"`
	Log               int `json:"log,omitempty"`
	Master            int `json:"master,omitempty"`
	ClusterController int `json:"cluster_controller,omitempty"`
	Proxy             int `json:"proxy,omitempty"`
	Resolver          int `json:"resolver,omitempty"`
	Router            int `json:"router,omitempty"`
}

ProcessCounts represents the number of processes we have for each valid process class.

If one of the counts in the spec is set to 0, we will infer the process count for that class from the role counts. If one of the counts in the spec is set to -1, we will not create any processes for that class. See GetProcessCountsWithDefaults for more information on the rules for inferring process counts.

func (ProcessCounts) CountsAreSatisfied

func (counts ProcessCounts) CountsAreSatisfied(currentCounts ProcessCounts) bool

CountsAreSatisfied checks whether the current counts of processes satisfy a desired set of counts.

func (*ProcessCounts) DeepCopy

func (in *ProcessCounts) DeepCopy() *ProcessCounts

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProcessCounts.

func (*ProcessCounts) DeepCopyInto

func (in *ProcessCounts) DeepCopyInto(out *ProcessCounts)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ProcessCounts) IncreaseCount

func (counts *ProcessCounts) IncreaseCount(name string, amount int)

IncreaseCount adds to one of the process counts based on the name.

func (ProcessCounts) Map

func (counts ProcessCounts) Map() map[string]int

Map returns a map from process classes to the number of processes with that class.

type Region

type Region struct {
	// The data centers in this region.
	DataCenters []DataCenter `json:"datacenters,omitempty"`

	// The number of satellite logs that we should recruit.
	SatelliteLogs int `json:"satellite_logs,omitempty"`

	// The replication strategy for satellite logs.
	SatelliteRedundancyMode string `json:"satellite_redundancy_mode,omitempty"`
}

Region represents a region in the database configuration

func (*Region) DeepCopy

func (in *Region) DeepCopy() *Region

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Region.

func (*Region) DeepCopyInto

func (in *Region) DeepCopyInto(out *Region)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RequiredAddressSet added in v0.3.0

type RequiredAddressSet struct {
	// TLS defines whether we need to listen on a TLS address.
	TLS bool `json:"tls,omitempty"`

	// NonTLS defines whether we need to listen on a non-TLS address.
	NonTLS bool `json:"nonTLS,omitempty"`
}

RequiredAddressSet provides settings for which addresses we need to listen on.

func (*RequiredAddressSet) DeepCopy added in v0.3.0

func (in *RequiredAddressSet) DeepCopy() *RequiredAddressSet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequiredAddressSet.

func (*RequiredAddressSet) DeepCopyInto added in v0.3.0

func (in *RequiredAddressSet) DeepCopyInto(out *RequiredAddressSet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RoleCounts

type RoleCounts struct {
	Storage    int `json:"storage,omitempty"`
	Logs       int `json:"logs,omitempty"`
	Proxies    int `json:"proxies,omitempty"`
	Resolvers  int `json:"resolvers,omitempty"`
	LogRouters int `json:"log_routers,omitempty"`
	RemoteLogs int `json:"remote_logs,omitempty"`
}

RoleCounts represents the roles whose counts can be customized.

func (*RoleCounts) DeepCopy

func (in *RoleCounts) DeepCopy() *RoleCounts

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleCounts.

func (*RoleCounts) DeepCopyInto

func (in *RoleCounts) DeepCopyInto(out *RoleCounts)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (RoleCounts) Map

func (counts RoleCounts) Map() map[string]int

Map returns a map from process classes to the desired count for that role

Jump to

Keyboard shortcuts

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