ekcoops

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package ekcoops provides a Kubernetes Operator for an embedded kURL cluster. It automates the functions that would otherwise be required of a cluster administrator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// how long a Node must be unreachable before considered dead
	NodeUnreachableToleration time.Duration `mapstructure:"node_unreachable_toleration"`
	// don't purge if it will result in less than this many ready masters
	MinReadyMasterNodes int `mapstructure:"min_ready_master_nodes"`
	// don't purge if it will result in less than this many ready workers
	MinReadyWorkerNodes int `mapstructure:"min_ready_worker_nodes"`

	// whether to purge dead nodes from the cluster automatically
	PurgeDeadNodes bool `mapstructure:"purge_dead_nodes"`

	// whether to maintain the list of nodes to use in the CephCluster config. With Rook 1.0
	// Replicated maintains the list to obviate the need to restart the operator, but with
	// earlier versions of Rook we just set `useAllNodes` to true. This also enables control of
	// the replication factor of ceph pools, scaling up and down with the number of nodes in the
	// cluster.
	MaintainRookStorageNodes bool `mapstructure:"maintain_rook_storage_nodes"`
	// names and levels of ceph pools to maintain if MaintainRookStorageNodes is enabled
	CephBlockPool          string `mapstructure:"ceph_block_pool"`
	CephFilesystem         string `mapstructure:"ceph_filesystem"`
	CephObjectStore        string `mapstructure:"ceph_object_store"`
	MinCephPoolReplication int    `mapstructure:"min_ceph_pool_replication"`
	MaxCephPoolReplication int    `mapstructure:"max_ceph_pool_replication"`

	// kubernetes certificates directory
	CertificatesDir string `mapstructure:"certificates_dir"`

	ReconcileInterval time.Duration `mapstructure:"reconcile_interval"`
}

type Operator

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

func New

func New(
	config Config,
	client kubernetes.Interface,
	controller *cluster.Controller,
	log *zap.SugaredLogger,
) *Operator

func (*Operator) Poll

func (o *Operator) Poll(ctx context.Context, interval time.Duration)

Poll will run the reconcile function on an interval

func (*Operator) Reconcile

func (o *Operator) Reconcile(nodes []corev1.Node) error

Jump to

Keyboard shortcuts

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