Documentation ¶
Index ¶
- Variables
- type KubeSerialReconciler
- type ManagerScheduleRequestReconciler
- func (r *ManagerScheduleRequestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ManagerScheduleRequestReconciler) ReconcileManager(ctx context.Context, instance *kubeserialv1alpha1.ManagerScheduleRequest, ...) error
- func (r *ManagerScheduleRequestReconciler) SetupWithManager(mgr ctrl.Manager) error
- type SerialDeviceReconciler
- func (r *SerialDeviceReconciler) EnsureConditions(ctx context.Context, device *kubeserialv1alpha1.SerialDevice) error
- func (r *SerialDeviceReconciler) EnsureNoGatewayRunning(ctx context.Context, device *kubeserialv1alpha1.SerialDevice) error
- func (r *SerialDeviceReconciler) EnsureNoManagerRequested(ctx context.Context, device *kubeserialv1alpha1.SerialDevice) error
- func (r *SerialDeviceReconciler) HandleDeviceAvailable(ctx context.Context, device *kubeserialv1alpha1.SerialDevice, _ logr.Logger) (reconcile.Result, error)
- func (r *SerialDeviceReconciler) HandleDeviceUnavailable(ctx context.Context, device *kubeserialv1alpha1.SerialDevice, _ logr.Logger) (reconcile.Result, error)
- func (r *SerialDeviceReconciler) ManagerIsAvailable(ctx context.Context, device *kubeserialv1alpha1.SerialDevice, req ctrl.Request) bool
- func (r *SerialDeviceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *SerialDeviceReconciler) RequestGateway(ctx context.Context, device *kubeserialv1alpha1.SerialDevice) error
- func (r *SerialDeviceReconciler) RequestManager(ctx context.Context, device *kubeserialv1alpha1.SerialDevice) error
- func (r *SerialDeviceReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *SerialDeviceReconciler) ValidateDeviceManager(ctx context.Context, device *kubeserialv1alpha1.SerialDevice, ...) (bool, error)
- func (r *SerialDeviceReconciler) ValidateDeviceReady(ctx context.Context, device *kubeserialv1alpha1.SerialDevice, ...) error
Constants ¶
This section is empty.
Variables ¶
var ( Devices = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "devices", Help: "Total number of devices", }) AvailableDevices = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "devices_available", Help: "Total number of devices", }) ReadyDevices = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "devices_ready", Help: "Total number of devices", }) )
Functions ¶
This section is empty.
Types ¶
type KubeSerialReconciler ¶
type KubeSerialReconciler struct { client.Client Scheme *runtime.Scheme DeviceMonitorVersion string FS utils.FileSystem APIClient api.API }
KubeSerialReconciler reconciles a KubeSerial object.
func (*KubeSerialReconciler) Reconcile ¶
func (r *KubeSerialReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
+kubebuilder:rbac:groups=app.kubeserial.com,resources=kubeserials,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=app.kubeserial.com,resources=kubeserials/status,verbs=get;update;patch +kubebuilder:rbac:groups=app.kubeserial.com,resources=kubeserials/finalizers,verbs=update
func (*KubeSerialReconciler) ReconcileMonitor ¶
func (r *KubeSerialReconciler) ReconcileMonitor(ctx context.Context, cr *appv1alpha1.KubeSerial, _ string) error
func (*KubeSerialReconciler) SetupWithManager ¶
func (r *KubeSerialReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ManagerScheduleRequestReconciler ¶
type ManagerScheduleRequestReconciler struct { client.Client Scheme *runtime.Scheme Namespace string FS utils.FileSystem APIClient api.API }
ManagerScheduleRequestReconciler reconciles a ManagerScheduleRequest object.
func (*ManagerScheduleRequestReconciler) Reconcile ¶
func (r *ManagerScheduleRequestReconciler) 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.
func (*ManagerScheduleRequestReconciler) ReconcileManager ¶
func (r *ManagerScheduleRequestReconciler) ReconcileManager( ctx context.Context, instance *kubeserialv1alpha1.ManagerScheduleRequest, mgr *kubeserialv1alpha1.Manager, _ ctrl.Request, ) error
ReconcileManager.
func (*ManagerScheduleRequestReconciler) SetupWithManager ¶
func (r *ManagerScheduleRequestReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type SerialDeviceReconciler ¶
type SerialDeviceReconciler struct { client.Client Scheme *runtime.Scheme APIClient api.API Namespace string FS utils.FileSystem }
SerialDeviceReconciler reconciles a SerialDevice object.
func (*SerialDeviceReconciler) EnsureConditions ¶
func (r *SerialDeviceReconciler) EnsureConditions(ctx context.Context, device *kubeserialv1alpha1.SerialDevice) error
EnsureConditions makes sure all conditions are available in resource.
func (*SerialDeviceReconciler) EnsureNoGatewayRunning ¶
func (r *SerialDeviceReconciler) EnsureNoGatewayRunning(ctx context.Context, device *kubeserialv1alpha1.SerialDevice) error
func (*SerialDeviceReconciler) EnsureNoManagerRequested ¶
func (r *SerialDeviceReconciler) EnsureNoManagerRequested(ctx context.Context, device *kubeserialv1alpha1.SerialDevice) error
EnsureNoManagerRequested makes sure there is no ManagerScheduleRequest for device.
func (*SerialDeviceReconciler) HandleDeviceAvailable ¶
func (r *SerialDeviceReconciler) HandleDeviceAvailable( ctx context.Context, device *kubeserialv1alpha1.SerialDevice, _ logr.Logger, ) (reconcile.Result, error)
func (*SerialDeviceReconciler) HandleDeviceUnavailable ¶
func (r *SerialDeviceReconciler) HandleDeviceUnavailable( ctx context.Context, device *kubeserialv1alpha1.SerialDevice, _ logr.Logger, ) (reconcile.Result, error)
func (*SerialDeviceReconciler) ManagerIsAvailable ¶
func (r *SerialDeviceReconciler) ManagerIsAvailable( ctx context.Context, device *kubeserialv1alpha1.SerialDevice, req ctrl.Request, ) bool
ManagerIsAvailable checks if Manager object referenced by SerialDevice is available in the cluster.
func (*SerialDeviceReconciler) Reconcile ¶
func (r *SerialDeviceReconciler) 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.
func (*SerialDeviceReconciler) RequestGateway ¶
func (r *SerialDeviceReconciler) RequestGateway(ctx context.Context, device *kubeserialv1alpha1.SerialDevice) error
func (*SerialDeviceReconciler) RequestManager ¶
func (r *SerialDeviceReconciler) RequestManager(ctx context.Context, device *kubeserialv1alpha1.SerialDevice) error
RequestManager create ManagerScheduleRequest for device.
func (*SerialDeviceReconciler) SetupWithManager ¶
func (r *SerialDeviceReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*SerialDeviceReconciler) ValidateDeviceManager ¶
func (r *SerialDeviceReconciler) ValidateDeviceManager( ctx context.Context, device *kubeserialv1alpha1.SerialDevice, req reconcile.Request, ) (bool, error)
ValidateDeviceManager validates if device manaager config is valid and upadates device state in case it's not.
func (*SerialDeviceReconciler) ValidateDeviceReady ¶
func (r *SerialDeviceReconciler) ValidateDeviceReady( ctx context.Context, device *kubeserialv1alpha1.SerialDevice, req reconcile.Request, ) error
ValidateDeviceReady validates if device config is ready to be used.