Documentation
¶
Index ¶
- Constants
- func BuildCollector(params manifests.Params) ([]client.Object, error)
- func GetOwnedResourceTypes() []client.Object
- type Adapter
- type CMOption
- type Controller
- type HubAdapter
- type MdaiCollectorAdapter
- type MdaiCollectorReconciler
- type MdaiHubReconciler
- type MdaiIngressReconciler
- type MdaiObserverReconciler
- type ObjectState
- type ObserverAdapter
- type OperationResult
- func ContinueOperationResult() OperationResult
- func ContinueProcessing() (OperationResult, error)
- func ContinueWithError(errIn error) (OperationResult, error)
- func Requeue() (OperationResult, error)
- func RequeueAfter(delay time.Duration, errIn error) (OperationResult, error)
- func RequeueOnErrorOrContinue(errIn error) (OperationResult, error)
- func RequeueOnErrorOrStop(errIn error) (OperationResult, error)
- func RequeueWithError(errIn error) (OperationResult, error)
- func StopOperationResult() OperationResult
- func StopProcessing() (OperationResult, error)
- type ReconcileOperation
Constants ¶
const ( ObjectModified ObjectState = true ObjectUnchanged ObjectState = false LabelManagedByMdaiKey = "app.kubernetes.io/managed-by" LabelManagedByMdaiValue = "mdai-operator" )
const ( MdaiCollectorHubComponent = "mdai-collector" S3PartitionFormat = "%Y/%m/%d/%H" )
const ( LabelMdaiHubName = "mydecisive.ai/hub-name" // Replace with your actual label key VariableKeyPrefix = "variable/" DefaultValkeyAuditStreamExpiry = 30 * 24 * time.Hour )
const (
HubComponentLabel = "mydecisive.ai/hub-component"
)
Variables ¶
This section is empty.
Functions ¶
func BuildCollector ¶ added in v0.2.2
BuildCollector returns the generation and collected errors of all manifests for a given instance.
func GetOwnedResourceTypes ¶ added in v0.2.2
GetOwnedResourceTypes returns all the resource types the controller can own. Even though this method returns an array of client.Object, these are (empty) example structs rather than actual resources.
Types ¶
type Adapter ¶ added in v0.1.23
type Adapter interface {
// contains filtered or unexported methods
}
type Controller ¶ added in v0.1.23
type HubAdapter ¶
type HubAdapter struct {
// contains filtered or unexported fields
}
type MdaiCollectorAdapter ¶
type MdaiCollectorAdapter struct {
// contains filtered or unexported fields
}
func NewMdaiCollectorAdapter ¶
func NewMdaiCollectorAdapter( cr *mdaiv1.MdaiCollector, log logr.Logger, k8sClient client.Client, recorder record.EventRecorder, scheme *runtime.Scheme, ) *MdaiCollectorAdapter
type MdaiCollectorReconciler ¶
type MdaiCollectorReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
MdaiCollectorReconciler reconciles a MdaiCollector object
func (*MdaiCollectorReconciler) Reconcile ¶
func (r *MdaiCollectorReconciler) 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 MdaiCollector 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.20.4/pkg/reconcile
func (*MdaiCollectorReconciler) ReconcileHandler ¶ added in v0.1.23
func (*MdaiCollectorReconciler) SetupWithManager ¶
func (r *MdaiCollectorReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type MdaiHubReconciler ¶
type MdaiHubReconciler struct { client.Client ZapLogger *zap.Logger Scheme *runtime.Scheme Recorder record.EventRecorder ValKeyClient valkey.Client ValkeyEvents chan event.GenericEvent ValkeyExpiry time.Duration }
MdaiHubReconciler reconciles a MdaiHub object
func (*MdaiHubReconciler) Reconcile ¶
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.19.1/pkg/reconcile
func (*MdaiHubReconciler) ReconcileHandler ¶
func (*MdaiHubReconciler) SetupWithManager ¶
func (r *MdaiHubReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type MdaiIngressReconciler ¶ added in v0.2.2
type MdaiIngressReconciler struct { client.Client Scheme *runtime.Scheme Cache cache.Cache Logger *zap.Logger }
MdaiIngressReconciler reconciles a MdaiIngress object
func (*MdaiIngressReconciler) GetParams ¶ added in v0.2.2
func (r *MdaiIngressReconciler) GetParams(otelMdaiComb hubv1.OtelMdaiIngressComb) manifests.Params
func (*MdaiIngressReconciler) SetupWithManager ¶ added in v0.2.2
func (r *MdaiIngressReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type MdaiObserverReconciler ¶ added in v0.1.21
type MdaiObserverReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
MdaiObserverReconciler reconciles a MdaiObserver object
func (*MdaiObserverReconciler) Reconcile ¶ added in v0.1.21
func (r *MdaiObserverReconciler) 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.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.20.2/pkg/reconcile
func (*MdaiObserverReconciler) ReconcileHandler ¶ added in v0.1.21
func (*MdaiObserverReconciler) ReconcileHandler(ctx context.Context, adapter Adapter) (ctrl.Result, error)
ReconcileHandler processes the MdaiObserver CR and performs the necessary operations.
func (*MdaiObserverReconciler) SetupWithManager ¶ added in v0.1.21
func (r *MdaiObserverReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ObjectState ¶
type ObjectState bool
type ObserverAdapter ¶ added in v0.1.21
type ObserverAdapter struct {
// contains filtered or unexported fields
}
func NewObserverAdapter ¶ added in v0.1.21
func NewObserverAdapter( cr *mdaiv1.MdaiObserver, log logr.Logger, k8sClient client.Client, recorder record.EventRecorder, scheme *runtime.Scheme, ) *ObserverAdapter
type OperationResult ¶
func ContinueOperationResult ¶
func ContinueOperationResult() OperationResult
func ContinueProcessing ¶
func ContinueProcessing() (OperationResult, error)
func ContinueWithError ¶ added in v0.1.23
func ContinueWithError(errIn error) (OperationResult, error)
func Requeue ¶
func Requeue() (OperationResult, error)
func RequeueAfter ¶
func RequeueAfter(delay time.Duration, errIn error) (OperationResult, error)
func RequeueOnErrorOrContinue ¶
func RequeueOnErrorOrContinue(errIn error) (OperationResult, error)
func RequeueOnErrorOrStop ¶
func RequeueOnErrorOrStop(errIn error) (OperationResult, error)
func RequeueWithError ¶
func RequeueWithError(errIn error) (OperationResult, error)
func StopOperationResult ¶
func StopOperationResult() OperationResult
func StopProcessing ¶
func StopProcessing() (OperationResult, error)
func (OperationResult) RequeueOrCancel ¶
func (r OperationResult) RequeueOrCancel() bool
type ReconcileOperation ¶
type ReconcileOperation func(context.Context) (OperationResult, error)