framework

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperatorRetryInterval = 5 * time.Second
	OperatorTimeout       = 30 * time.Second
)

Variables

View Source
var (
	Client client.Client
)

Functions

func ApplyFile

func ApplyFile(namespace, file string)

func CreateNamespace

func CreateNamespace(name string) error

func GetNodePortServiceAddress

func GetNodePortServiceAddress(serviceKey types.NamespacedName, portName string) (string, error)

func Init

func Init()

func KustomizeAndApply

func KustomizeAndApply(namespace, dir string, useOverlay bool)

Runs kustomize build followed kubectl apply. dir specifies the name of a test directory. By default this function will run kustomize build on dir/overlays/k8ssandra. This will result in using upstream operator images. If you are testing against a fork, then set the TEST_OVERLAY environment variable to specify the fork overlay to use. When TEST_OVERLAY is set this function will run kustomize build on dir/overlays/forks/TEST_OVERLAY which will allow you to use a custom operator image.

func WaitForCRDs added in v0.2.0

func WaitForCRDs(namespace string)

func WaitForCassDcReady

func WaitForCassDcReady(key types.NamespacedName, retryInterval, timeout time.Duration) error

Blocks until the CassandraDatacenter is ready as determined by .Status.CassandraOperatorProgress == ProgressReady or until timeout is reached. An error is returned is fetching the CassandraDatacenter fails.

func WaitForCassOperatorReady

func WaitForCassOperatorReady(namespace string) error

Blocks until the cass-operator Deployment is ready. This function assumes that there will be a single replica in the Deployment.

func WaitForDeploymentReady

func WaitForDeploymentReady(key types.NamespacedName, readyReplicas int32, retryInterval, timeout time.Duration) error

Blocks until .Status.ReadyReplicas == readyReplicas or until timeout is reached. An error is returned if fetching the Deployment fails.

func WaitForReaper

func WaitForReaper(key types.NamespacedName, retryInterval, timeout time.Duration, condition ReaperConditionFunc) error

func WaitForReaperOperatorReady

func WaitForReaperOperatorReady(namespace string) error

Blocks until the reaper-operator deployment is ready. This function assumes that there will be a single replica in the Deployment.

func WaitForReaperReady

func WaitForReaperReady(key types.NamespacedName, retryInterval, timeout time.Duration) error

func WithDateSuffix

func WithDateSuffix(s string) string

Returns s with a date suffix of -yyMMddHHmmss

Types

type ReaperConditionFunc

type ReaperConditionFunc func(reaper *api.Reaper) bool

Jump to

Keyboard shortcuts

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