mgr

package
v0.0.0-...-331d270 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package mgr for the Ceph manager.

Package mgr for the Ceph manager.

Package mgr for the Ceph manager.

Index

Constants

View Source
const (
	AppName = "rook-ceph-mgr"

	PrometheusModuleName = "prometheus"

	// DefaultMetricsPort prometheus exporter port
	DefaultMetricsPort uint16 = 9283
)

Variables

This section is empty.

Functions

func GeneratePassword

func GeneratePassword(length int) (string, error)

func GenerateRandomBytes

func GenerateRandomBytes(length int) ([]byte, error)

GenerateRandomBytes returns securely generated random bytes.

func IsModuleInSpec

func IsModuleInSpec(modules []cephv1.Module, moduleName string) bool

IsModuleInSpec returns whether a module is present in the CephCluster manager spec

Types

type Cluster

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

Cluster represents the Rook and environment configuration settings needed to set up Ceph mgrs.

func New

func New(context *clusterd.Context, clusterInfo *cephclient.ClusterInfo, spec cephv1.ClusterSpec, rookVersion string) *Cluster

New creates an instance of the mgr

func (*Cluster) EnableServiceMonitor

func (c *Cluster) EnableServiceMonitor() error

EnableServiceMonitor add a servicemonitor that allows prometheus to scrape from the monitoring endpoint of the cluster

func (*Cluster) MakeMetricsService

func (c *Cluster) MakeMetricsService(name, servicePortMetricName string) (*v1.Service, error)

MakeMetricsService generates the Kubernetes service object for the monitoring service

func (*Cluster) Start

func (c *Cluster) Start() error

Start begins the process of running a cluster of Ceph mgrs.

func (*Cluster) UpdateActiveMgrLabel

func (c *Cluster) UpdateActiveMgrLabel(daemonNameToUpdate string, prevActiveMgr string) (string, error)

UpdateActiveMgrLabel updates the mgr_role label value to either active or standby depending on the status of the ceph mgr running in the pod

Jump to

Keyboard shortcuts

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