controllers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeviceFinalizer = "device-finalizer"
)
View Source
const YggdrasilDeviceReferenceFinalizer = "yggdrasil-device-reference-finalizer"

Variables

This section is empty.

Functions

func ExecuteConcurrent

func ExecuteConcurrent(ctx context.Context, concurrency uint, f ConcurrentFunc, edgeDevices []managementv1alpha1.EdgeDevice) []error

func IsPending added in v0.1.0

func IsPending(edsr *v1alpha1.EdgeDeviceSignedRequest) bool

func UpdateSelectorLabels

func UpdateSelectorLabels(edgeWorkloads ...*managementv1alpha1.EdgeWorkload)

Types

type ConcurrentFunc

type ConcurrentFunc func(context.Context, []managementv1alpha1.EdgeDevice) []error

type EdgeDeviceLabelsReconciler

type EdgeDeviceLabelsReconciler struct {
	EdgeDeviceRepository    edgedevice.Repository
	EdgeWorkloadRepository  edgeworkload.Repository
	MaxConcurrentReconciles int
}

EdgeDeviceLabelsReconciler reconciles a EdgeDevice object

func (*EdgeDeviceLabelsReconciler) Reconcile

func (*EdgeDeviceLabelsReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type EdgeDeviceReconciler

type EdgeDeviceReconciler struct {
	client.Client
	Scheme                            *runtime.Scheme
	EdgeDeviceRepository              edgedevice.Repository
	EdgeDeviceSignedRequestRepository edgedevicesignedrequest.Repository
	InitialDeviceNamespace            string
	ObcAutoCreate                     bool
	Claimer                           *storage.Claimer
	Metrics                           metrics.Metrics
	MaxConcurrentReconciles           int
}

EdgeDeviceReconciler reconciles a EdgeDevice object

func (*EdgeDeviceReconciler) Reconcile

func (r *EdgeDeviceReconciler) 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 EdgeDevice 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.8.3/pkg/reconcile

func (*EdgeDeviceReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type EdgeDeviceSignedRequestReconciler added in v0.1.0

type EdgeDeviceSignedRequestReconciler struct {
	client.Client
	Scheme                            *runtime.Scheme
	EdgedeviceSignedRequestRepository edgedevicesignedrequest.Repository
	EdgeDeviceRepository              edgedevice.Repository
	MaxConcurrentReconciles           int
	AutoApproval                      bool
}

func (*EdgeDeviceSignedRequestReconciler) Reconcile added in v0.1.0

Reconcile each edgedevicesignedrequest

func (*EdgeDeviceSignedRequestReconciler) SetupWithManager added in v0.1.0

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

SetupWithManager sets up the controller with the Manager.

type EdgeWorkloadReconciler added in v0.1.0

type EdgeWorkloadReconciler struct {
	client.Client
	Scheme                  *runtime.Scheme
	EdgeWorkloadRepository  edgeworkload.Repository
	EdgeDeviceRepository    edgedevice.Repository
	Concurrency             uint
	ExecuteConcurrent       func(context.Context, uint, ConcurrentFunc, []managementv1alpha1.EdgeDevice) []error
	Metrics                 metrics.Metrics
	MaxConcurrentReconciles int
}

EdgeWorkloadReconciler reconciles a EdgeWorkload object

func (*EdgeWorkloadReconciler) Reconcile added in v0.1.0

func (r *EdgeWorkloadReconciler) 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 EdgeWorkload 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.8.3/pkg/reconcile

func (*EdgeWorkloadReconciler) SetupWithManager added in v0.1.0

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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