clusterdisruption

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 32 Imported by: 8

Documentation

Overview

Package clusterdisruption implements the controller for ensuring that drains occurs in a safe manner. The design and purpose for clusterdisruption management is found at: https://github.com/rook/rook/blob/master/design/ceph/ceph-managed-disruptionbudgets.md

Index

Constants

View Source
const (

	// DefaultMaintenanceTimeout is the period for which a drained failure domain will remain in noout
	DefaultMaintenanceTimeout = 30 * time.Minute
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager, context *controllerconfig.Context) error

Add adds a new Controller to the Manager based on clusterdisruption.ReconcileClusterDisruption and registers the relevant watches and handlers. Read more about how Managers, Controllers, and their Watches, Handlers, Predicates, etc work here: https://godoc.org/github.com/kubernetes-sigs/controller-runtime/pkg

Types

type ClusterMap

type ClusterMap struct {
	// contains filtered or unexported fields
}

ClusterMap maintains the association between namespace and clusername

func (*ClusterMap) GetCluster

func (c *ClusterMap) GetCluster(namespace string) (*cephv1.CephCluster, bool)

GetCluster returns vars cluster, found. cluster is the cephcluster associated with that namespace and found is the boolean indicating whether a cluster was populated for that namespace or not.

func (*ClusterMap) GetClusterInfo added in v1.4.0

func (c *ClusterMap) GetClusterInfo(namespace string) *cephClient.ClusterInfo

GetClusterInfo looks up the context for the current ceph cluster. found is the boolean indicating whether a cluster was populated for that namespace or not.

func (*ClusterMap) GetClusterNamespaces added in v1.4.0

func (c *ClusterMap) GetClusterNamespaces() []string

GetClusterNamespaces returns the internal clustermap for iteration purposes

func (*ClusterMap) UpdateClusterMap

func (c *ClusterMap) UpdateClusterMap(namespace string, cluster *cephv1.CephCluster)

UpdateClusterMap to populate the clusterName for the namespace

type ReconcileClusterDisruption

type ReconcileClusterDisruption struct {
	// contains filtered or unexported fields
}

ReconcileClusterDisruption reconciles ReplicaSets

func (*ReconcileClusterDisruption) Reconcile

Reconcile reconciles a node and ensures that it has a drain-detection deployment attached to it. The Controller will requeue the Request to be processed again if an error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

Jump to

Keyboard shortcuts

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