Documentation ¶
Index ¶
- func WithPVNodeAffinity(matchExpressions []corev1.NodeSelectorRequirement) func(pv *corev1.PersistentVolume)
- func WithPodCondition(condition corev1.PodCondition) func(pod *corev1.Pod)
- func WithPollRetryInterval(interval time.Duration) func(*option)
- func WithPollTimeout(timeout time.Duration) func(*option)
- type Client
- type EnvOption
- type PVOption
- type PodOption
- type ScyllaFake
- type StatefulSetOperatorStub
- func (s *StatefulSetOperatorStub) CreatePVCs(ctx context.Context, cluster *scyllav1.ScyllaCluster, pvOptions ...PVOption) error
- func (s *StatefulSetOperatorStub) CreatePods(ctx context.Context, cluster *scyllav1.ScyllaCluster, options ...PodOption) error
- func (s *StatefulSetOperatorStub) CreatePodsPartition(ctx context.Context, cluster *scyllav1.ScyllaCluster, partition int, ...) error
- func (s *StatefulSetOperatorStub) SyncPods(ctx context.Context, rack scyllav1.RackSpec, cluster *scyllav1.ScyllaCluster) error
- func (s *StatefulSetOperatorStub) SyncStatus(ctx context.Context, cluster *scyllav1.ScyllaCluster) error
- type TestEnvironment
- func (t *TestEnvironment) AssertRackScaled(ctx context.Context, rack scyllav1.RackSpec, cluster *scyllav1.ScyllaCluster, ...) error
- func (t *TestEnvironment) ClusterScaleSteps(desiredNodeCount int32) []int32
- func (t *TestEnvironment) CreateNamespace(ctx context.Context, generateName string) (*corev1.Namespace, error)
- func (t *TestEnvironment) MultiRackCluster(ns *corev1.Namespace, members ...int32) *scyllav1.ScyllaCluster
- func (t *TestEnvironment) RackMemberServices(ctx context.Context, namespace string, rack scyllav1.RackSpec, ...) ([]corev1.Service, error)
- func (t *TestEnvironment) SingleRackCluster(ns *corev1.Namespace) *scyllav1.ScyllaCluster
- func (t *TestEnvironment) StartManager(ctx context.Context) error
- func (t *TestEnvironment) StatefulSetOfRack(ctx context.Context, rack scyllav1.RackSpec, cluster *scyllav1.ScyllaCluster) (*appsv1.StatefulSet, error)
- func (t *TestEnvironment) Stop() error
- func (t *TestEnvironment) WaitForCluster(ctx context.Context, cluster *scyllav1.ScyllaCluster) error
- func (t *TestEnvironment) WaitForWebhooks()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithPVNodeAffinity ¶
func WithPVNodeAffinity(matchExpressions []corev1.NodeSelectorRequirement) func(pv *corev1.PersistentVolume)
func WithPodCondition ¶
func WithPodCondition(condition corev1.PodCondition) func(pod *corev1.Pod)
func WithPollRetryInterval ¶
func WithPollTimeout ¶
Types ¶
type Client ¶
func (*Client) UpdateScyllaCluster ¶
func (c *Client) UpdateScyllaCluster(ctx context.Context, cluster *scyllav1.ScyllaCluster, opts ...client.UpdateOption) error
type PVOption ¶
type PVOption func(pv *corev1.PersistentVolume)
type ScyllaFake ¶
type ScyllaFake struct {
// contains filtered or unexported fields
}
func NewScyllaFake ¶
func NewScyllaFake(operationalMode scyllaclient.OperationalMode, keyspaces []string) *ScyllaFake
func (*ScyllaFake) Close ¶
func (s *ScyllaFake) Close()
func (*ScyllaFake) DrainRequests ¶
func (s *ScyllaFake) DrainRequests() int
func (*ScyllaFake) KeyspaceSnapshots ¶
func (s *ScyllaFake) KeyspaceSnapshots() []string
func (*ScyllaFake) SetOperationalMode ¶
func (s *ScyllaFake) SetOperationalMode(mode scyllaclient.OperationalMode)
func (*ScyllaFake) Start ¶
func (s *ScyllaFake) Start() string
type StatefulSetOperatorStub ¶
type StatefulSetOperatorStub struct {
// contains filtered or unexported fields
}
func NewStatefulSetOperatorStub ¶
func NewStatefulSetOperatorStub(env *TestEnvironment) *StatefulSetOperatorStub
func (*StatefulSetOperatorStub) CreatePVCs ¶
func (s *StatefulSetOperatorStub) CreatePVCs(ctx context.Context, cluster *scyllav1.ScyllaCluster, pvOptions ...PVOption) error
func (*StatefulSetOperatorStub) CreatePods ¶
func (s *StatefulSetOperatorStub) CreatePods(ctx context.Context, cluster *scyllav1.ScyllaCluster, options ...PodOption) error
func (*StatefulSetOperatorStub) CreatePodsPartition ¶
func (s *StatefulSetOperatorStub) CreatePodsPartition(ctx context.Context, cluster *scyllav1.ScyllaCluster, partition int, options ...PodOption) error
func (*StatefulSetOperatorStub) SyncPods ¶ added in v1.1.0
func (s *StatefulSetOperatorStub) SyncPods(ctx context.Context, rack scyllav1.RackSpec, cluster *scyllav1.ScyllaCluster) error
func (*StatefulSetOperatorStub) SyncStatus ¶
func (s *StatefulSetOperatorStub) SyncStatus(ctx context.Context, cluster *scyllav1.ScyllaCluster) error
type TestEnvironment ¶
type TestEnvironment struct { manager.Manager Client KubeClient kubernetes.Interface Config *rest.Config // contains filtered or unexported fields }
TestEnvironment encapsulates a Kubernetes local test environment.
func NewTestEnvironment ¶
func NewTestEnvironment(logger log.Logger, options ...EnvOption) (*TestEnvironment, error)
NewTestEnvironment creates a new environment spinning up a local api-server.
func (*TestEnvironment) AssertRackScaled ¶
func (t *TestEnvironment) AssertRackScaled(ctx context.Context, rack scyllav1.RackSpec, cluster *scyllav1.ScyllaCluster, replicas int32) error
func (*TestEnvironment) ClusterScaleSteps ¶
func (t *TestEnvironment) ClusterScaleSteps(desiredNodeCount int32) []int32
func (*TestEnvironment) CreateNamespace ¶
func (*TestEnvironment) MultiRackCluster ¶ added in v1.1.0
func (t *TestEnvironment) MultiRackCluster(ns *corev1.Namespace, members ...int32) *scyllav1.ScyllaCluster
func (*TestEnvironment) RackMemberServices ¶
func (*TestEnvironment) SingleRackCluster ¶
func (t *TestEnvironment) SingleRackCluster(ns *corev1.Namespace) *scyllav1.ScyllaCluster
func (*TestEnvironment) StartManager ¶
func (t *TestEnvironment) StartManager(ctx context.Context) error
func (*TestEnvironment) StatefulSetOfRack ¶
func (t *TestEnvironment) StatefulSetOfRack(ctx context.Context, rack scyllav1.RackSpec, cluster *scyllav1.ScyllaCluster) (*appsv1.StatefulSet, error)
func (*TestEnvironment) Stop ¶
func (t *TestEnvironment) Stop() error
func (*TestEnvironment) WaitForCluster ¶
func (t *TestEnvironment) WaitForCluster(ctx context.Context, cluster *scyllav1.ScyllaCluster) error
func (*TestEnvironment) WaitForWebhooks ¶
func (t *TestEnvironment) WaitForWebhooks()
Click to show internal directories.
Click to hide internal directories.