Versions in this module Expand all Collapse all v1 v1.7.14 Jul 6, 2021 v1.7.13 Jun 23, 2021 v1.7.7 May 27, 2021 v1.7.6 May 20, 2021 v1.7.5 Apr 28, 2021 v1.7.4 Apr 27, 2021 v1.7.3 Apr 21, 2021 v1.7.2 Apr 20, 2021 v1.7.1 Apr 19, 2021 v1.7.0 Apr 15, 2021 Changes in this version + var ErrDecommissioningStalled = errors.New("decommissioning has stalled") + func IsStatefulSetReadyToServe(ctx context.Context, clientset kubernetes.Interface, namespace, name string, ...) error + func StatefulSetIsRunning(ctx context.Context, clientset kubernetes.Interface, namespace string, ...) error + func WaitUntilStatefulSetIsReadyToServe(ctx context.Context, clientset kubernetes.Interface, namespace, name string, ...) error + func WaitUntilStatefulSetIsRunning(ctx context.Context, clientset kubernetes.Interface, namespace string, ...) error + type ClusterScaler interface + Replicas func(context.Context) (uint, error) + SetReplicas func(context.Context, uint) error + WaitUntilHealthy func(context.Context, uint) error + WaitUntilRunning func(context.Context) error + type CockroachExecutor struct + ClientSet kubernetes.Interface + Config *rest.Config + Container string + Namespace string + StatefulSet string + TTY bool + func (e CockroachExecutor) Exec(ctx context.Context, podIdx uint, cmd []string) (string, string, error) + type CockroachNodeDrainer struct + Executor *CockroachExecutor + Logger logr.Logger + RangeRelocationTimeout time.Duration + Secure bool + func (d *CockroachNodeDrainer) Decommission(ctx context.Context, replica uint) error + type CockroachStatefulSet struct + ClientSet kubernetes.Interface + Name string + Namespace string + func (c *CockroachStatefulSet) Replicas(ctx context.Context) (uint, error) + func (c *CockroachStatefulSet) SetReplicas(ctx context.Context, scale uint) error + func (c *CockroachStatefulSet) WaitUntilHealthy(ctx context.Context, scale uint) error + func (c *CockroachStatefulSet) WaitUntilRunning(ctx context.Context) error + type Drainer interface + Decommission func(ctx context.Context, replica uint) error + func NewCockroachNodeDrainer(logger logr.Logger, namespace, ssname string, config *rest.Config, ...) Drainer + type Executor struct + Config *rest.Config + Namespace string + func (e Executor) Exec(ctx context.Context, o ExecutorOptions) error + type ExecutorOptions struct + Cmd []string + Container string + Pod string + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + TTY bool + type PVCPruner interface + Prune func(ctx context.Context) error + type PersistentVolumePruner struct + ClientSet kubernetes.Interface + Logger logr.Logger + Namespace string + StatefulSet string + func (p *PersistentVolumePruner) Prune(ctx context.Context) error + type Scaler struct + CRDB ClusterScaler + Drainer Drainer + Logger logr.Logger + PVCPruner PVCPruner + func (s *Scaler) EnsureScale(ctx context.Context, scale uint) error