drivers

package
v0.8.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogClusterDriverFailure

func LogClusterDriverFailure(name string, err error)

func RegisterClusterDriver

func RegisterClusterDriver(driver ClusterDriver)

func RegisterPersistentClusterDriver

func RegisterPersistentClusterDriver(driverFunc func() ClusterDriver)

func ResetClusterDrivers

func ResetClusterDrivers()

Types

type ClusterDriver

type ClusterDriver interface {
	cortexops.CortexOpsServer
	// Unique name of the driver
	Name() string
	// ShouldDisableNode is called during node sync for nodes which otherwise
	// have this capability enabled. If this function returns an error, the
	// node will be set to disabled instead, and the error will be logged.
	ShouldDisableNode(*corev1.Reference) error
}

func GetClusterDriver

func GetClusterDriver(name string) (ClusterDriver, error)

type NoopClusterDriver

type NoopClusterDriver struct {
	cortexops.UnimplementedCortexOpsServer
}

func (*NoopClusterDriver) Name

func (d *NoopClusterDriver) Name() string

func (*NoopClusterDriver) ShouldDisableNode

func (d *NoopClusterDriver) ShouldDisableNode(*corev1.Reference) error

type OpniManager

func NewOpniManagerClusterDriver

func NewOpniManagerClusterDriver(opts ...OpniManagerClusterDriverOption) (*OpniManager, error)

func (*OpniManager) ConfigureCluster

func (k *OpniManager) ConfigureCluster(ctx context.Context, conf *cortexops.ClusterConfiguration) (*emptypb.Empty, error)

func (*OpniManager) GetClusterConfiguration

func (k *OpniManager) GetClusterConfiguration(ctx context.Context, _ *emptypb.Empty) (*cortexops.ClusterConfiguration, error)

func (*OpniManager) GetClusterStatus

func (k *OpniManager) GetClusterStatus(ctx context.Context, _ *emptypb.Empty) (*cortexops.InstallStatus, error)

func (*OpniManager) Name

func (k *OpniManager) Name() string

func (*OpniManager) ShouldDisableNode

func (k *OpniManager) ShouldDisableNode(_ *corev1.Reference) error

func (*OpniManager) UninstallCluster

func (k *OpniManager) UninstallCluster(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)

type OpniManagerClusterDriverOption

type OpniManagerClusterDriverOption func(*OpniManagerClusterDriverOptions)

func WithK8sClient

func WithK8sClient(k8sClient client.Client) OpniManagerClusterDriverOption

func WithMonitoringCluster

func WithMonitoringCluster(namespacedName types.NamespacedName) OpniManagerClusterDriverOption

type OpniManagerClusterDriverOptions

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

Jump to

Keyboard shortcuts

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