cluster

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RookCephNS                   = "rook-ceph"
	CephClusterName              = "rook-ceph"
	RookCephSharedFSMetadataPool = "rook-shared-fs-metadata"
	RookCephSharedFSDataPool     = "rook-shared-fs-data0"
	CephDeviceHealthMetricsPool  = "device_health_metrics"

	RookCephObjectStoreRootPool = ".rgw.root"

	RotateCertsLabel         = "kurl.sh/task"
	RotateCertsValue         = "rotate-certs"
	RotateCertsLastAttempted = "rotate-certs-last-attempted"

	TaskLabel                = "kurl.sh/task"
	UpdateInternalLBValue    = "update-internallb"
	SetKubeconfigServerValue = "set-kubeconfig-server"
)
View Source
const (
	DefaultEtcKubernetesDir = "/etc/kubernetes"
)

Variables

View Source
var (
	RookCephObjectStoreMetadataPools = []string{

		"rgw.control",
		"rgw.meta",
		"rgw.log",
		"rgw.buckets.index",
		"rgw.buckets.non-ec",
	}
	RookCephObjectStoreDataPools = []string{
		"rgw.buckets.data",
	}
)
View Source
var Rookv14 = semver.MustParse("1.4.0")

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Config ControllerConfig
	Log    *zap.SugaredLogger

	sync.Mutex
}

func NewController

func NewController(config ControllerConfig, log *zap.SugaredLogger) *Controller

func (*Controller) CephFilesystemOK

func (c *Controller) CephFilesystemOK(name string) (bool, error)

func (*Controller) CheckRotateCertsDue added in v0.5.0

func (c *Controller) CheckRotateCertsDue(reset bool) (bool, error)

Any time this returns true it updates the last attempted timestamp

func (*Controller) ClearNode added in v0.3.0

func (c *Controller) ClearNode(ctx context.Context, nodeName string) error

ClearNode force deletes pods stuck in Terminating state on a single node.

func (*Controller) PrioritizeRook added in v0.9.0

func (c *Controller) PrioritizeRook() error

func (*Controller) PurgeNode

func (c *Controller) PurgeNode(ctx context.Context, name string, rook bool) error

PurgeNode cleans up a lost node.

func (*Controller) ReconcileInternalLB added in v0.11.0

func (c *Controller) ReconcileInternalLB(ctx context.Context, nodes []corev1.Node) error

func (*Controller) ReconcileMonCount added in v0.4.0

func (c *Controller) ReconcileMonCount(count int) error

func (*Controller) RotateAllCerts added in v0.5.0

func (c *Controller) RotateAllCerts(ctx context.Context) error

This launches a pod on each primary to mount /etc/kubernetes and rotate the certs. It leaves the pods up if any fail.

func (*Controller) RotateContourCerts added in v0.15.0

func (c *Controller) RotateContourCerts() error

func (*Controller) RotateKurlProxyCert added in v0.7.0

func (c *Controller) RotateKurlProxyCert() error

func (*Controller) RotateRegistryCert added in v0.5.0

func (c *Controller) RotateRegistryCert() error

func (*Controller) SetBlockPoolReplication added in v0.2.4

func (c *Controller) SetBlockPoolReplication(name string, level int, doFullReconcile bool) error

SetBlockPoolReplicationLevel ignores NotFound errors.

func (*Controller) SetDeviceHealthMetricsReplication added in v0.4.0

func (c *Controller) SetDeviceHealthMetricsReplication(level int, doFullReconcile bool) error

func (*Controller) SetFilesystemReplication

func (c *Controller) SetFilesystemReplication(name string, level int, doFullReconcile bool) error

SetSharedFilesystemReplication ignores NotFound errors.

func (*Controller) SetKubeconfigServer added in v0.11.0

func (c *Controller) SetKubeconfigServer(ctx context.Context, node corev1.Node, server string) error

func (*Controller) SetObjectStoreReplication

func (c *Controller) SetObjectStoreReplication(name string, level int, doFullReconcile bool) error

SetObjectStoreReplication ignores NotFound errors.

func (*Controller) UpdateInternalLB added in v0.11.0

func (c *Controller) UpdateInternalLB(ctx context.Context, nodes []corev1.Node) error

Update /etc/haproxy/haproxy.cfg and /etc/kubernetes/manifests/haproxy.yaml on all nodes.

func (*Controller) UpdateKubeletClientCertSecret added in v0.7.0

func (c *Controller) UpdateKubeletClientCertSecret() error

Copies apiserver-kubelet-client.crt into secret used by kotsadm to collect metrics

func (*Controller) UseNodesForStorage

func (c *Controller) UseNodesForStorage(names []string) (int, error)

returns the number of nodes used for storage, which may be higher than the number of names passed in if a node is currenlty not ready but has not been purged

func (*Controller) WaitCephFilesystem

func (c *Controller) WaitCephFilesystem(ctx context.Context, name string) error

type ControllerConfig

type ControllerConfig struct {
	Client                                kubernetes.Interface
	ClientConfig                          *restclient.Config
	CephV1                                *cephv1.CephV1Client
	AlertManagerV1                        dynamic.NamespaceableResourceInterface
	PrometheusV1                          dynamic.NamespaceableResourceInterface
	CertificatesDir                       string
	RookVersion                           semver.Version
	RookPriorityClass                     string
	RotateCerts                           bool
	RotateCertsImage                      string
	RotateCertsNamespace                  string
	RotateCertsCheckInterval              time.Duration
	RotateCertsTTL                        time.Duration
	RegistryCertNamespace                 string
	RegistryCertSecret                    string
	KurlProxyCertNamespace                string
	KurlProxyCertSecret                   string
	KotsadmKubeletCertNamespace           string
	KotsadmKubeletCertSecret              string
	ContourCertNamespace                  string
	ContourCertSecret                     string
	EnvoyCertSecret                       string
	HostTaskImage                         string
	HostTaskNamespace                     string
	EnableInternalLoadBalancer            bool
	AutoApproveKubeletCertSigningRequests bool
}

Jump to

Keyboard shortcuts

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