controller

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 59 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConditionTrue  bool = true
	ConditionFalse bool = false
)

Define condition values

View Source
const (

	// NnfAccessAnnotation is an annotation applied to the NnfStorage object used to
	// prevent multiple accesses to a non-clustered file system
	NnfAccessAnnotation = "nnf.cray.hpe.com/access"
)
View Source
const (
	// NnfNlcResourceName is the name of the NNF Node Local Controller resource.
	NnfNlcResourceName = "nnf-nlc"
)
View Source
const (
	NnfNodeECDataResourceName = "ec-data"
)

Variables

This section is empty.

Functions

func Requeue

func Requeue(reason string) *result

When workflow stages cannot advance they return a Requeue result with a particular reason.

Types

type AllocationSpec

type aliases for name shortening

type ClientType added in v0.1.8

type ClientType string
const (
	ClientCompute ClientType = "Compute"
	ClientRabbit  ClientType = "Rabbit"
)

type ControllerType added in v0.1.11

type ControllerType string
const (
	ControllerWorker ControllerType = "Worker"
	ControllerRabbit ControllerType = "Rabbit"
	ControllerTest   ControllerType = "Test"
)

type DWSServersReconciler

type DWSServersReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *kruntime.Scheme
}

DWSServersReconciler reconciles a DWS Servers object

func (*DWSServersReconciler) Reconcile

func (r *DWSServersReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err 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. TODO(user): Modify the Reconcile function to compare the state specified by the Workflow object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.9.2/pkg/reconcile

func (*DWSServersReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type DWSStorageReconciler

type DWSStorageReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

func (*DWSStorageReconciler) Reconcile

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

Reconcile is part of the main Kubernetes reconciliation loop which aims to move the current state of the Storage resource to the desired state.

func (*DWSStorageReconciler) SetupWithManager

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

type DirectiveBreakdownReconciler

type DirectiveBreakdownReconciler struct {
	client.Client
	Log          logr.Logger
	Scheme       *kruntime.Scheme
	ChildObjects []dwsv1alpha2.ObjectList
}

DirectiveBreakdownReconciler reconciles a DirectiveBreakdown object

func (*DirectiveBreakdownReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the directiveBreakdown closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.9.2/pkg/reconcile

func (*DirectiveBreakdownReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type K8sNodeState added in v0.1.11

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

type NnfAccessReconciler

type NnfAccessReconciler struct {
	client.Client
	Log          logr.Logger
	Scheme       *kruntime.Scheme
	ChildObjects []dwsv1alpha2.ObjectList
}

NnfAccessReconciler reconciles a NnfAccess object

func (*NnfAccessReconciler) ComputesEnqueueRequests added in v0.1.14

func (r *NnfAccessReconciler) ComputesEnqueueRequests(ctx context.Context, o client.Object) []reconcile.Request

ComputesEnqueueRequests triggers on a Computes resource. It finds any NnfAccess resources with the same owner as the Computes resource and adds them to the Request list.

func (*NnfAccessReconciler) Reconcile

func (r *NnfAccessReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err 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.

func (*NnfAccessReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NnfClientMountReconciler

type NnfClientMountReconciler struct {
	client.Client
	Log               logr.Logger
	Scheme            *kruntime.Scheme
	SemaphoreForStart chan struct{}
	ClientType        ClientType

	sync.Mutex
	// contains filtered or unexported fields
}

NnfClientMountReconciler contains the pieces used by the reconciler

func (*NnfClientMountReconciler) Reconcile

func (r *NnfClientMountReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err 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.

func (*NnfClientMountReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*NnfClientMountReconciler) Start added in v0.1.5

type NnfLustreMGTReconciler added in v0.1.11

type NnfLustreMGTReconciler struct {
	client.Client
	Log          logr.Logger
	Scheme       *kruntime.Scheme
	ChildObjects []dwsv1alpha2.ObjectList

	ControllerType ControllerType
}

NnfLustreMGTReconciler contains the elements needed during reconciliation for NnfLustreMGT

func (*NnfLustreMGTReconciler) EraseOldFsName added in v0.1.11

func (r *NnfLustreMGTReconciler) EraseOldFsName(nnfLustreMgt *nnfv1alpha2.NnfLustreMGT, fsname string) error

func (*NnfLustreMGTReconciler) HandleNewClaims added in v0.1.11

func (r *NnfLustreMGTReconciler) HandleNewClaims(ctx context.Context, nnfLustreMgt *nnfv1alpha2.NnfLustreMGT) (*ctrl.Result, error)

HandleNewClaims looks for any new claims in Spec.ClaimList and assigns them an fsname

func (*NnfLustreMGTReconciler) Reconcile added in v0.1.11

func (r *NnfLustreMGTReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err 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.7.2/pkg/reconcile

func (*NnfLustreMGTReconciler) RemoveOldClaims added in v0.1.11

func (r *NnfLustreMGTReconciler) RemoveOldClaims(ctx context.Context, nnfLustreMgt *nnfv1alpha2.NnfLustreMGT) error

RemoveOldClaims removes any old entries from the Status.ClaimList and erases the fsname from the MGT if necessary.

func (*NnfLustreMGTReconciler) SetFsNameNext added in v0.1.11

func (r *NnfLustreMGTReconciler) SetFsNameNext(ctx context.Context, nnfLustreMgt *nnfv1alpha2.NnfLustreMGT, fsname string) (*ctrl.Result, error)

SetFsNameNext sets the Status.FsNameNext field to the next available fsname. It also updates the configmap the FsNameStartReference field if needed.

func (*NnfLustreMGTReconciler) SetupWithManager added in v0.1.11

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

SetupWithManager sets up the controller with the Manager.

type NnfNodeBlockStorageReconciler

type NnfNodeBlockStorageReconciler struct {
	client.Client
	Log               logr.Logger
	Scheme            *kruntime.Scheme
	SemaphoreForStart chan struct{}
	SemaphoreForDone  chan struct{}
	Options           *nnfec.Options

	types.NamespacedName

	sync.Mutex
	Events chan event.GenericEvent
	// contains filtered or unexported fields
}

NnfNodeBlockStorageReconciler contains the elements needed during reconciliation for NnfNodeBlockStorage

func (*NnfNodeBlockStorageReconciler) EventHandler added in v0.1.14

EventHandler implements event.Subscription. Every Upstream or Downstream event triggers a watch on all the NnfNodeBlockStorages. This is needed to create the StorageGroup for a compute node that was powered off when the Access list was updated.

func (*NnfNodeBlockStorageReconciler) NnfEcEventEnqueueHandler added in v0.1.14

func (r *NnfNodeBlockStorageReconciler) NnfEcEventEnqueueHandler(ctx context.Context, o client.Object) []reconcile.Request

Enqueue all the NnfNodeBlockStorage resources after an nnf-ec node-up/node-down event. If we can't List() the NnfNodeBlockStorages, trigger the watch again after 10 seconds.

func (*NnfNodeBlockStorageReconciler) Reconcile

func (r *NnfNodeBlockStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err 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.7.2/pkg/reconcile

func (*NnfNodeBlockStorageReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*NnfNodeBlockStorageReconciler) Start added in v0.1.5

type NnfNodeECDataReconciler

type NnfNodeECDataReconciler struct {
	client.Client
	Scheme  *runtime.Scheme
	Options *nnfec.Options
	types.NamespacedName
	SemaphoreForStart chan struct{}
	SemaphoreForDone  chan struct{}

	RawLog logr.Logger // RawLog, as opposed to Log, is the un-edited controller logger
}

NnfNodeECDataReconciler reconciles a NnfNodeECData object

func (*NnfNodeECDataReconciler) NewPersistentStorageInterface

func (r *NnfNodeECDataReconciler) NewPersistentStorageInterface(name string, readOnly bool) (persistent.PersistentStorageApi, error)

func (*NnfNodeECDataReconciler) Reconcile

func (r *NnfNodeECDataReconciler) Reconcile(ctx context.Context, req ctrl.Request) (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. TODO(user): Modify the Reconcile function to compare the state specified by the NnfNodeECData object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.10.0/pkg/reconcile

func (*NnfNodeECDataReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*NnfNodeECDataReconciler) Start

Start implements manager.Runnable

type NnfNodeReconciler

type NnfNodeReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *kruntime.Scheme

	Options          *nnfec.Options
	SemaphoreForDone chan struct{}
	types.NamespacedName

	sync.Mutex
	Events chan event.GenericEvent
	// contains filtered or unexported fields
}

NnfNodeReconciler reconciles a NnfNode object

func (*NnfNodeReconciler) EventHandler

func (r *NnfNodeReconciler) EventHandler(e nnfevent.Event) error

EventHandler implements event.Subscription. Every Upstream or Downstream event runs the reconciler so all the NNF Node server/drive status stays current.

func (*NnfNodeReconciler) Reconcile

func (r *NnfNodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err 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.7.2/pkg/reconcile

func (*NnfNodeReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*NnfNodeReconciler) Start

func (r *NnfNodeReconciler) Start(ctx context.Context) error

Start is called upon starting the component manager and will create the Namespace for controlling the NNF Node CRD that is representiative of this particular NNF Node.

type NnfNodeStorageReconciler

type NnfNodeStorageReconciler struct {
	client.Client
	Log               logr.Logger
	Scheme            *kruntime.Scheme
	SemaphoreForStart chan struct{}
	SemaphoreForDone  chan struct{}

	types.NamespacedName
	ChildObjects []dwsv1alpha2.ObjectList

	sync.Mutex
	// contains filtered or unexported fields
}

NnfNodeStorageReconciler contains the elements needed during reconciliation for NnfNodeStorage

func (*NnfNodeStorageReconciler) Reconcile

func (r *NnfNodeStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err 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.7.2/pkg/reconcile

func (*NnfNodeStorageReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*NnfNodeStorageReconciler) Start added in v0.1.5

type NnfPortManagerReconciler

type NnfPortManagerReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

NnfPortManagerReconciler reconciles a NnfPortManager object

func (*NnfPortManagerReconciler) Reconcile

func (r *NnfPortManagerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err 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.14.1/pkg/reconcile

func (*NnfPortManagerReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NnfStorageReconciler

type NnfStorageReconciler struct {
	client.Client
	Log          logr.Logger
	Scheme       *kruntime.Scheme
	ChildObjects []dwsv1alpha2.ObjectList
}

NnfStorageReconciler reconciles a Storage object

func (*NnfStorageReconciler) Reconcile

func (r *NnfStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err 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.

func (*NnfStorageReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NnfSystemConfigurationReconciler

type NnfSystemConfigurationReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *kruntime.Scheme
}

NnfSystemConfigurationReconciler contains the pieces used by the reconciler

func (*NnfSystemConfigurationReconciler) Reconcile

func (r *NnfSystemConfigurationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err 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.

func (*NnfSystemConfigurationReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NnfSystemStorageReconciler added in v0.1.12

type NnfSystemStorageReconciler struct {
	client.Client
	Log          logr.Logger
	Scheme       *kruntime.Scheme
	ChildObjects []dwsv1alpha2.ObjectList
}

NnfSystemStorageReconciler reconciles a NnfSystemStorage object

func (*NnfSystemStorageReconciler) NnfSystemStorageEnqueueAll added in v0.1.14

func (r *NnfSystemStorageReconciler) NnfSystemStorageEnqueueAll(ctx context.Context, o client.Object) []reconcile.Request

NnfSystemStorageEnqueueAll enqueues all of the NnfSystemStorage resources after a watch is triggered

func (*NnfSystemStorageReconciler) Reconcile added in v0.1.12

func (r *NnfSystemStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err 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.

func (*NnfSystemStorageReconciler) SetupWithManager added in v0.1.12

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

SetupWithManager sets up the controller with the Manager.

type NnfWorkflowReconciler

type NnfWorkflowReconciler struct {
	client.Client
	Log          logr.Logger
	Scheme       *kruntime.Scheme
	ChildObjects []dwsv1alpha2.ObjectList
}

NnfWorkflowReconciler contains the pieces used by the reconciler

func (*NnfWorkflowReconciler) Reconcile

func (r *NnfWorkflowReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err 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.9.2/pkg/reconcile

func (*NnfWorkflowReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type PersistentStorageReconciler

type PersistentStorageReconciler struct {
	client.Client
	Log          logr.Logger
	Scheme       *kruntime.Scheme
	ChildObjects []dwsv1alpha2.ObjectList
}

DirectiveBreakdownReconciler reconciles a DirectiveBreakdown object

func (*PersistentStorageReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the directiveBreakdown closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.9.2/pkg/reconcile

func (*PersistentStorageReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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