Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller periodically runs gatherers, records their results to the recorder and flushes the recorder to create archives
func New ¶
func New( configAggregator configobserver.Interface, rec recorder.FlushInterface, listGatherers []gatherers.Interface, anonymizer *anonymization.Anonymizer, insightsOperatorCLI operatorv1client.InsightsOperatorInterface, kubeClient *kubernetes.Clientset, ) *Controller
New creates a new instance of Controller which periodically invokes the gatherers and flushes the recorder to create archives.
func NewWithTechPreview ¶
func NewWithTechPreview( reportRetriever *insightsreport.Controller, configAggregator configobserver.Interface, apiConfigurator configobserver.InsightsDataGatherObserver, listGatherers []gatherers.Interface, kubeClient kubernetes.Interface, dataGatherClient insightsv1alpha1cli.InsightsV1alpha1Interface, insightsOperatorCli operatorv1client.InsightsOperatorInterface, openshiftConfCli configv1client.ConfigV1Interface, dgInf DataGatherInformer, ) *Controller
func (*Controller) Gather ¶
func (c *Controller) Gather()
Gather Runs the gatherers one after the other.
func (*Controller) GatherJob ¶
func (c *Controller) GatherJob()
func (*Controller) PeriodicPrune ¶
func (c *Controller) PeriodicPrune(ctx context.Context)
PeriodicPrune runs periodically and deletes jobs (including the related pods) and "datagather.insights.openshift.io" resources older than 24 hours
func (*Controller) Run ¶
func (c *Controller) Run(stopCh <-chan struct{}, initialDelay time.Duration)
func (*Controller) Sources ¶
func (c *Controller) Sources() []controllerstatus.StatusController
type DataGatherInformer ¶
type DataGatherInformer interface { factory.Controller DataGatherCreated() <-chan string }
DataGatherInformer is an interface providing information about newly create DataGather resources
func NewDataGatherInformer ¶
func NewDataGatherInformer(eventRecorder events.Recorder, insightsInf insightsInformers.SharedInformerFactory) (DataGatherInformer, error)
NewDataGatherInformer creates a new instance of the DataGatherInformer interface
type JobController ¶
type JobController struct {
// contains filtered or unexported fields
}
JobController type responsible for creating a new gathering jobs
func NewJobController ¶
func NewJobController(kubeClient kubernetes.Interface) *JobController
func (*JobController) CreateGathererJob ¶
func (j *JobController) CreateGathererJob(ctx context.Context, dataGatherName, image, archiveVolumeMountPath string) (*batchv1.Job, error)
CreateGathererJob creates a new Kubernetes Job with provided image, volume mount path used for storing data archives and name derived from the provided data gather name
func (*JobController) WaitForJobCompletion ¶
WaitForJobCompletion listen the Kubernetes events to check if job finished.