Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
Clock knows how to get the current time. It can be used to fake out timing for testing.
type CronSearchReconciler ¶
type CronSearchReconciler struct {
client.Client
Scheme *runtime.Scheme
SearchClusterRole string
Clock
}
CronSearchReconciler reconciles a CronSearch object
func (*CronSearchReconciler) Reconcile ¶
func (r *CronSearchReconciler) 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. This function is designed to behave the same as k8s.io/api/batch/v1.CronJob controller, The actual implementation is copied and modified from the kubebuilder tutorial, where a CronJob controller is implemented. https://github.com/kubernetes-sigs/kubebuilder/blob/master/docs/book/src/cronjob-tutorial/testdata/project/internal/controller/cronjob_controller.go why re-invent the wheel?
func (*CronSearchReconciler) SetupWithManager ¶
func (r *CronSearchReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type PipelineReconciler ¶
type PipelineReconciler struct {
client.Client
Scheme *runtime.Scheme
SidecarImage string
SidecarPullPolicy corev1.PullPolicy
}
PipelineReconciler reconciles a Pipeline object
func (*PipelineReconciler) 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. The pipeline reconciler is responsible for creating and managing the scan and upload pods for a given pipeline. It ensures that the pods are created and updated as necessary, and that the status of the pipeline is updated accordingly. Breakdown of the reconciliation steps: 1. Fetch the pipeline instance 2. Handle finalizers 3. If the pipeline has a completion time, check if it needs to be deleted based on TTL 4. Fetch and validate the profile and downloader references 5. Determine if an upload pod is needed based on the profile's artifacts and uploader references 6. If an upload pod is needed, fetch or create the upload pod and service 7. Fetch or create the scan pod 8. Update the pipeline status accordingly based on the state of the pods For more details, check Reconcile and its Result here:
func (*PipelineReconciler) SetupWithManager ¶
func (r *PipelineReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type SearchReconciler ¶
type SearchReconciler struct {
client.Client
Scheme *runtime.Scheme
SearchClusterRole string
SidecarImage string
SidecarPullPolicy corev1.PullPolicy
}
SearchReconciler reconciles a Search object
func (*SearchReconciler) SetupWithManager ¶
func (r *SearchReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.