Documentation ¶
Index ¶
- func Setup(mgr ctrl.Manager, l logging.Logger, namespace string) error
- type APIEstablisher
- type Credentials
- type Establisher
- 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 Reconciler
- type ReconcilerOption
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIEstablisher ¶
type APIEstablisher struct {
// contains filtered or unexported fields
}
APIEstablisher establishes control or ownership of resources in the API server for a parent.
func NewAPIEstablisher ¶
func NewAPIEstablisher(client resource.ClientApplicator, log logging.Logger, namespace string) *APIEstablisher
NewAPIEstablisher creates a new APIEstablisher.
func (*APIEstablisher) Create ¶
func (e *APIEstablisher) Create(ctx context.Context, name string, port int, c *corev1.Container) error
Create creates a set of resources
type Credentials ¶
Credentials holds the information for authenticating with the Server.
type Establisher ¶
type Establisher interface { // Create brings up resources Create(ctx context.Context, name string, port int, c *corev1.Container) error // Update brings up resources Update(ctx context.Context, name string, port int, c *corev1.Container) error // Delete brings down resources Delete(ctx context.Context, name string) error }
An Establisher brings up or down a set of resources in the API server
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 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.
func (*Reconciler) DeviceDriverMapFunc ¶
func (r *Reconciler) DeviceDriverMapFunc(o client.Object) []ctrl.Request
DeviceDriverMapFunc is a handler.ToRequestsFunc to be used to enqeue request for reconciliation of NetworkNode when the device driver object changes
type ReconcilerOption ¶
type ReconcilerOption func(*Reconciler)
ReconcilerOption is used to configure the Reconciler.
func WithEstablisher ¶
func WithEstablisher(er *APIEstablisher) ReconcilerOption
WithEstablisher specifies how the reconciler should create/delete/update resources through the k8s api
func WithLogger ¶
func WithLogger(log logging.Logger) ReconcilerOption
WithLogger specifies how the Reconciler should log messages.
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.