Documentation ¶
Index ¶
- Constants
- Variables
- type Controller
- func (c *Controller) CephFilesystemOK(name string) (bool, error)
- func (c *Controller) CheckRotateCertsDue() (bool, error)
- func (c *Controller) ClearNode(ctx context.Context, nodeName string) error
- func (c *Controller) PrioritizeRook() error
- func (c *Controller) PurgeNode(ctx context.Context, name string, rook bool) error
- func (c *Controller) ReconcileInternalLB(ctx context.Context, nodes []corev1.Node) error
- func (c *Controller) ReconcileMonCount(count int) error
- func (c *Controller) RotateAllCerts(ctx context.Context) error
- func (c *Controller) RotateKurlProxyCert() error
- func (c *Controller) RotateRegistryCert() error
- func (c *Controller) SetBlockPoolReplication(name string, level int, doFullReconcile bool) error
- func (c *Controller) SetDeviceHealthMetricsReplication(level int, doFullReconcile bool) error
- func (c *Controller) SetFilesystemReplication(name string, level int, doFullReconcile bool) error
- func (c *Controller) SetKubeconfigServer(ctx context.Context, node corev1.Node, server string) error
- func (c *Controller) SetObjectStoreReplication(name string, level int, doFullReconcile bool) error
- func (c *Controller) UpdateInternalLB(ctx context.Context, nodes []corev1.Node) error
- func (c *Controller) UpdateKubeletClientCertSecret() error
- func (c *Controller) UseNodesForStorage(names []string) (int, error)
- func (c *Controller) WaitCephFilesystem(ctx context.Context, name string) error
- type ControllerConfig
Constants ¶
const ( RookCephNS = "rook-ceph" CephClusterName = "rook-ceph" CephDeviceHealthMetricsPool = "device_health_metrics" RookCephObjectStoreRootPool = ".rgw.root" PrimaryRoleLabel = "node-role.kubernetes.io/master" RotateCertsLabel = "kurl.sh/task" RotateCertsValue = "rotate-certs" RotateCertsLastAttempted = "rotate-certs-last-attempted" TaskLabel = "kurl.sh/task" UpdateInternalLBValue = "update-internallb" SetKubeconfigServerValue = "set-kubeconfig-server" )
const (
DefaultEtcKubernetesDir = "/etc/kubernetes"
)
Variables ¶
var ( RookCephObjectStoreMetadataPools = []string{ "rgw.control", "rgw.meta", "rgw.log", "rgw.buckets.index", "rgw.buckets.non-ec", } RookCephObjectStoreDataPools = []string{ "rgw.buckets.data", } )
var Rookv14 = semver.MustParse("1.4.0")
var RotateCertsSelector = labels.SelectorFromSet(labels.Set{RotateCertsLabel: RotateCertsValue})
var SetKubeconfigServerSelector = labels.SelectorFromSet(labels.Set{TaskLabel: SetKubeconfigServerValue})
var UpdateInternalLBSelector = labels.SelectorFromSet(labels.Set{TaskLabel: UpdateInternalLBValue})
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() (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) ReconcileInternalLB ¶ added in v0.11.0
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) 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 (*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
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 HostTaskImage string HostTaskNamespace string EnableInternalLoadBalancer bool }