Documentation
¶
Index ¶
- func Setup(mgr ctrl.Manager, l logging.Logger, namespace string) error
- type Credentials
- type DeviceDriverHooks
- type EnqueueRequestForAllDeviceDriversWithRequests
- func (e *EnqueueRequestForAllDeviceDriversWithRequests) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForAllDeviceDriversWithRequests) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForAllDeviceDriversWithRequests) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForAllDeviceDriversWithRequests) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
- type Hooks
- type NnValidator
- func (v *NnValidator) GetSecret(ctx context.Context, namespace, credentialsName string) (credsSecret *corev1.Secret, err error)
- func (v *NnValidator) ValidateCredentials(ctx context.Context, namespace, credentialsName, targetAddress string) (creds *Credentials, err error)
- func (v *NnValidator) ValidateDeviceDriver(ctx context.Context, namespace, name, kind string, port int) (c *corev1.Container, err error)
- type NopHooks
- type Reconciler
- type ReconcilerOption
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Credentials ¶
Credentials holds the information for authenticating with the Server.
type DeviceDriverHooks ¶
type DeviceDriverHooks struct {
// contains filtered or unexported fields
}
DeviceDriverHooks performs operations to deploy the device driver.
func NewDeviceDriverHooks ¶
func NewDeviceDriverHooks(client resource.ClientApplicator, log logging.Logger, namespace string) *DeviceDriverHooks
NewPDeviceDriverHooks creates a new DeviceDriverHooks.
type EnqueueRequestForAllDeviceDriversWithRequests ¶
type EnqueueRequestForAllDeviceDriversWithRequests struct {
// contains filtered or unexported fields
}
func (*EnqueueRequestForAllDeviceDriversWithRequests) Create ¶
func (e *EnqueueRequestForAllDeviceDriversWithRequests) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
Create enqueues a request for all network nodes which pertains to the Device Driver.
func (*EnqueueRequestForAllDeviceDriversWithRequests) Delete ¶
func (e *EnqueueRequestForAllDeviceDriversWithRequests) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
Delete enqueues a request for all network nodes which pertains to the Device Driver.
func (*EnqueueRequestForAllDeviceDriversWithRequests) Generic ¶
func (e *EnqueueRequestForAllDeviceDriversWithRequests) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
Generic enqueues a request for all network nodes which pertains to the Device Driver.
func (*EnqueueRequestForAllDeviceDriversWithRequests) Update ¶
func (e *EnqueueRequestForAllDeviceDriversWithRequests) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
Update enqueues a request for all network nodes which pertains to the Device Driver.
type Hooks ¶
type Hooks interface { // Deploy performs operations to deploy the device driver for the network node Deploy(ctx context.Context, nn ndddvrv1.Nn, c *corev1.Container) error // Destroy performs operations to destroy the device driver for the network node Destroy(ctx context.Context, nn ndddvrv1.Nn, c *corev1.Container) error }
A Hooks performs operations to deploy the device driver for the network node.
type NnValidator ¶
type NnValidator struct {
// contains filtered or unexported fields
}
func NewNnValidator ¶
func NewNnValidator(client resource.ClientApplicator, log logging.Logger) *NnValidator
func (*NnValidator) GetSecret ¶
func (v *NnValidator) GetSecret(ctx context.Context, namespace, credentialsName string) (credsSecret *corev1.Secret, err error)
Retrieve the secret containing the credentials for talking to the Network Node.
func (*NnValidator) ValidateCredentials ¶
func (v *NnValidator) ValidateCredentials(ctx context.Context, namespace, credentialsName, targetAddress string) (creds *Credentials, err error)
func (*NnValidator) ValidateDeviceDriver ¶
type NopHooks ¶
type NopHooks struct{}
NopHooks performs no operations.
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler reconciles packages.
func NewReconciler ¶
func NewReconciler(mgr manager.Manager, opts ...ReconcilerOption) *Reconciler
NewReconciler creates a new package revision reconciler.
type ReconcilerOption ¶
type ReconcilerOption func(*Reconciler)
ReconcilerOption is used to configure the Reconciler.
func WithHooks ¶
func WithHooks(h Hooks) ReconcilerOption
WithHooks specifies how the Reconciler should deploy a device driver
func WithLogger ¶
func WithLogger(log logging.Logger) ReconcilerOption
WithLogger specifies how the Reconciler should log messages.
func WithNewNetworkNodeFn ¶
func WithNewNetworkNodeFn(f func() ndddvrv1.Nn) ReconcilerOption
WithNewNetworkNodeFn determines the type of network node being reconciled.
func WithRecorder ¶
func WithRecorder(er event.Recorder) ReconcilerOption
WithRecorder specifies how the Reconciler should record Kubernetes events.
func WithValidator ¶
func WithValidator(v Validator) ReconcilerOption
WithValidator specifies how the Reconciler should perform object validation.
type Validator ¶
type Validator interface { // Validates the credentials ValidateCredentials(ctx context.Context, namespace, credentialsName, targetAddress string) (*Credentials, error) // Validates the device driver ValidateDeviceDriver(ctx context.Context, namespace, name, kind string, port int) (*corev1.Container, error) }
A Creds validates the validaty of various resources.