openshift

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InfraResourceName is the name of the openshift infrastructure resource
	InfraResourceName = "cluster"
	// DesiredMachineConfigAnnotationKey is used to specify the desired MachineConfig for a machine
	DesiredMachineConfigAnnotationKey = "machineconfiguration.openshift.io/desiredConfig"

	// McpPausedAnnotKey is the annotations used to mark a MachineConfigPool as paused by the operator
	McpPausedAnnotKey   = "maintenance.nvidia.com/mcp-paused"
	McpPausedAnnotValue = "true"

	// McpNameLabelKey is the label that contains the name of the MachineConfigPool which was paused. it is set on NodeMaintenance object
	McpNameLabelKey = "maintenance.nvidia.com/paused-mcp-name"
)

Variables

View Source
var ErrMachineConfigBusy = errors.New("machineconfigpool busy")

ErrMachineConfigBusy is returned when MachineConfigPool is busy, either currently under configuration or is paused by another entity operation should be retried at a later time

Functions

This section is empty.

Types

type MCPManager

type MCPManager interface {
	// PauseMCP pauses the MachineConfigPool on the given node
	PauseMCP(ctx context.Context, node *corev1.Node, nm *maintenancev1.NodeMaintenance) error
	// UnpauseMCP unpauses the MachineConfigPool on the given node
	UnpauseMCP(ctx context.Context, node *corev1.Node, nm *maintenancev1.NodeMaintenance) error
}

MCPManager manages MachineConfigPool operations

func NewMCPManager

func NewMCPManager(client client.Client) MCPManager

NewMCPManager returns a new MCPManager

type OpenshiftUtils

type OpenshiftUtils interface {
	// IsOpenshift returns true if the cluster is openshift
	IsOpenshift() bool
	// IsHypershift returns true if the cluster is hypershift (openshift with extenal control plane nodes)
	IsHypershift() bool
}

OpenshiftUtils provides utility functions for openshift

func NewOpenshiftUtils

func NewOpenshiftUtils(ctx context.Context, client client.Reader) (OpenshiftUtils, error)

NewOpenshiftUtils returns a new OpenshiftUtils

Jump to

Keyboard shortcuts

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