internal

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCoordinatorsFromStatus added in v0.37.0

func GetCoordinatorsFromStatus(status *fdbtypes.FoundationDBStatus) map[string]None

GetCoordinatorsFromStatus gets the current coordinators from the status. The returning set will contain all processes by their process group ID.

func GetProcessClassFromMeta

func GetProcessClassFromMeta(metadata v1.ObjectMeta) v1beta1.ProcessClass

GetProcessClassFromMeta fetches the process class from an object's metadata.

func NormalizeClusterSpec

func NormalizeClusterSpec(spec *fdbtypes.FoundationDBClusterSpec, options DeprecationOptions) error

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.

func ProcessClassFromLabels

func ProcessClassFromLabels(labels map[string]string) v1beta1.ProcessClass

ProcessClassFromLabels extracts the ProcessClass label from the metav1.ObjectMeta.Labels map

func ValidateCustomParameters

func ValidateCustomParameters(customParameters []string) error

ValidateCustomParameters ensures that no duplicate values are set and that no protected/forbidden parameters are set. Theoretically we could also check if FDB supports the given parameter.

Types

type DeprecationOptions

type DeprecationOptions struct {
	// Whether we should apply the latest defaults rather than the defaults that
	// were initially established for this major version.
	UseFutureDefaults bool

	// Whether we should only fill in defaults that have changes between major
	// versions of the operator.
	OnlyShowChanges bool
}

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

type None added in v0.37.0

type None struct{}

None is a simple struct to create a set to indicate the value of the map has no meaning.

Jump to

Keyboard shortcuts

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