rook

package
v0.0.0-...-2da05cd Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlexvolumeToCSI

func FlexvolumeToCSI(ctx context.Context, logger *log.Logger, clientset kubernetes.Interface, clientConfig *rest.Config, opts FlexvolumeToCSIOpts) error

FlexvolumeToCSI will migrate from a Rook Flex volumes storage class to a Ceph-CSI volumes storage

func HasSufficientBlockOSDs

func HasSufficientBlockOSDs(ctx context.Context, client kubernetes.Interface) (bool, error)

HasSufficientBlockOSDs returns true if there are enough block-device based OSDs attached to the cluster at present, false otherwise. 'enough' is min(nodecount, 3). this is the same requirement as in waitForBlockOSDs.

func HostpathToOsd

func HostpathToOsd(ctx context.Context, config *rest.Config) error

func InitWriter

func InitWriter(wr io.Writer)

func RookHealth

func RookHealth(ctx context.Context, client kubernetes.Interface, ignoreChecks []string) (bool, string, error)

RookHealth checks if rook-ceph is in a healthy state (by kURL standards), and returns healthy, a message describing why things are unhealthy, and errors encountered determining the status. Individual checks can be ignored by passing in a list of Ceph health check unique identifiers (https://docs.ceph.com/en/quincy/rados/operations/health-checks/) to ignore.

func WaitForRookHealth

func WaitForRookHealth(ctx context.Context, client kubernetes.Interface, ignoreChecks []string) error

WaitForRookHealth waits for rook-ceph to report that it is healthy 5 times in a row. Individual checks can be ignored by passing in a list of Ceph health check unique identifiers (https://docs.ceph.com/en/quincy/rados/operations/health-checks/) to ignore.

func WaitForRookOrCephVersion

func WaitForRookOrCephVersion(ctx context.Context, client kubernetes.Interface, desiredVersion string, labelKey string, name string) error

WaitForRookOrCephVersion waits for all deployments to report that they are using the specified rook (or ceph) version (depending on provided label key) and replicas are updated and ready. see https://rook.io/docs/rook/v1.10/Upgrade/rook-upgrade/#4-wait-for-the-upgrade-to-complete

Types

type FlexvolumeToCSIOpts

type FlexvolumeToCSIOpts struct {
	// SourceStorageClass is the name of the storage class to migrate from
	SourceStorageClass string
	// DestinationStorageClass is the name of the storage class to migrate to
	DestinationStorageClass string
	// NodeName is the name of the node to run the migrator on on which this binary exists
	NodeName string
	// PVMigratorBinPath is the path to the ceph/pv-migrator binary
	PVMigratorBinPath string
	// CephMigratorImage is the image to use for the ceph/pv-migrator container
	CephMigratorImage string
}

FlexvolumeToCSIOpts are options for the FlexvolumeToCSI function

func (FlexvolumeToCSIOpts) Validate

func (o FlexvolumeToCSIOpts) Validate() error

Validate will validate options to the FlexvolumeToCSI function and return an error if any are invalid

type RookOSD

type RookOSD struct {
	Num        int64
	Node       string
	IsHostpath bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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