controller

package
v0.0.0-...-0592d78 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ODF_NAMESPACE = "openshift-storage"

	FAILED_OSD_IDS      = "FAILED_OSD_IDS"
	FORCE_OSD_REMOVAL   = "FORCE_OSD_REMOVAL"
	HEALTH_OK           = "HEALTH_OK"
	OCS_OSD_REMOVAL_JOB = "ocs-osd-removal"
)

Variables

This section is empty.

Functions

func NewLogRetriever

func NewLogRetriever(config *rest.Config) podLogRetriever

Types

type LogClient

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

func (*LogClient) GetLogs

func (l *LogClient) GetLogs(podName string) (string, error)

getPodLogs retrieves the logs of a pod in the openshift-storage namespace

type NodeRecovery

type NodeRecovery struct {
	client.Client
	*rest.Config
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

NodeRecovery represents the structure of the object that recovers an ODF cluster from a physical failure

func (*NodeRecovery) Reconcile

func (r *NodeRecovery) Reconcile(instance *odfv1alpha1.NodeRecovery) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.16.3/pkg/reconcile

type NodeRecoveryReconciler

type NodeRecoveryReconciler struct {
	client.Client
	*rest.Config
	Scheme    *runtime.Scheme
	Recorder  record.EventRecorder
	CmdRunner pod.RemoteCommandExecutor
	LogClient podLogRetriever
}

NodeRecoveryReconciler reconciles a NodeRecovery object

func (*NodeRecoveryReconciler) Reconcile

func (r *NodeRecoveryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*NodeRecoveryReconciler) SetupWithManager

func (r *NodeRecoveryReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type RecoveryReason

type RecoveryReason string
var (
	EnableCephTools            RecoveryReason = "EnableCephTools"
	WaitForCephToolsPodRunning RecoveryReason = "WaitForCephToolsPodRunning"
	WaitForOSDPodsStabilize    RecoveryReason = "WaitForOSDPodsStabilize"
	LabelNodesWithPendingPods  RecoveryReason = "LabelNodesWithPendingPods"
	ManageCrashLoopBackOffPods RecoveryReason = "ManageCrashLoopBackOffPods"
	RestartStorageOperator     RecoveryReason = "RestartStorageOperator"
	StorageClusterFitnessCheck RecoveryReason = "StorageClusterFitnessCheck"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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