Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyFile(namespace, file string)
- func CreateNamespace(name string) error
- func GetCassDc(key types.NamespacedName) (*cassdcapi.CassandraDatacenter, error)
- func GetNodePortServiceAddress(serviceKey types.NamespacedName, portName string) (string, error)
- func Init()
- func KustomizeAndApply(namespace, dir string, useOverlay bool)
- func WaitForCRDs(namespace string)
- func WaitForCassDcReady(key types.NamespacedName, retryInterval, timeout time.Duration) error
- func WaitForCassOperatorReady(namespace string) error
- func WaitForDeploymentReady(key types.NamespacedName, readyReplicas int32, ...) error
- func WaitForReaper(key types.NamespacedName, retryInterval, timeout time.Duration, ...) error
- func WaitForReaperOperatorReady(namespace string) error
- func WaitForReaperReady(key types.NamespacedName, retryInterval, timeout time.Duration) error
- func WithDateSuffix(s string) string
- type ReaperConditionFunc
Constants ¶
const ( OperatorRetryInterval = 5 * time.Second OperatorTimeout = 30 * time.Second )
Variables ¶
var (
Client client.Client
)
Functions ¶
func CreateNamespace ¶
func GetCassDc ¶
func GetCassDc(key types.NamespacedName) (*cassdcapi.CassandraDatacenter, error)
func GetNodePortServiceAddress ¶
func GetNodePortServiceAddress(serviceKey types.NamespacedName, portName string) (string, error)
func KustomizeAndApply ¶
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 ¶
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 ¶
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 ¶
Returns s with a date suffix of -yyMMddHHmmss