Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
tremes committed Jun 13, 2023
1 parent 5ed30fa commit 3b100a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/config/configobserver/insighgtsdatagather_observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func NewInsightsDataGatherObserver(kubeConfig *rest.Config,
return c, nil
}

func (i *insightsDataGatherController) sync(ctx context.Context, scx factory.SyncContext) error {
func (i *insightsDataGatherController) sync(ctx context.Context, _ factory.SyncContext) error {
insightDataGatherConf, err := i.configV1Alpha1Cli.InsightsDataGathers().Get(ctx, "cluster", metav1.GetOptions{})
if err != nil {
return err
Expand Down
8 changes: 5 additions & 3 deletions pkg/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ func (s *Operator) Run(ctx context.Context, controller *controllercmd.Controller

// the status controller initializes the cluster operator object and retrieves
// the last sync time, if any was set
statusReporter := status.NewController(configClient.ConfigV1(), secretConfigObserver, insightsDataGatherObserver, os.Getenv("POD_NAMESPACE"))
statusReporter := status.NewController(configClient.ConfigV1(), secretConfigObserver,
insightsDataGatherObserver, os.Getenv("POD_NAMESPACE"))

var anonymizer *anonymization.Anonymizer
var recdriver *diskrecorder.DiskRecorder
Expand Down Expand Up @@ -194,7 +195,7 @@ func (s *Operator) Run(ctx context.Context, controller *controllercmd.Controller
} else {
reportRetriever := insightsreport.NewWithTechPreview(insightsClient, secretConfigObserver, operatorClient.InsightsOperators())
periodicGather = periodic.NewWithTechPreview(reportRetriever, secretConfigObserver,
apiConfigObserver, gatherers, kubeClient, insightClient, operatorClient.InsightsOperators())
insightsDataGatherObserver, gatherers, kubeClient, insightClient, operatorClient.InsightsOperators())
go periodicGather.PeriodicPrune(ctx)
}

Expand All @@ -212,7 +213,8 @@ func (s *Operator) Run(ctx context.Context, controller *controllercmd.Controller
if !insightsConfigAPIEnabled {
// upload results to the provided client - if no client is configured reporting
// is permanently disabled, but if a client does exist the server may still disable reporting
uploader := insightsuploader.New(recdriver, insightsClient, secretConfigObserver, apiConfigObserver, statusReporter, initialDelay)
uploader := insightsuploader.New(recdriver, insightsClient, secretConfigObserver,
insightsDataGatherObserver, statusReporter, initialDelay)
statusReporter.AddSources(uploader)

// start uploading status, so that we
Expand Down
3 changes: 1 addition & 2 deletions pkg/controller/periodic/periodic.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type Controller struct {
func NewWithTechPreview(
reportRetriever *insightsreport.Controller,
secretConfigurator configobserver.Configurator,
apiConfigurator configobserver.APIConfigObserver,
apiConfigurator configobserver.InsightsDataGatherObserver,
listGatherers []gatherers.Interface,
kubeClient kubernetes.Interface,
dataGatherClient insightsv1alpha1cli.InsightsV1alpha1Interface,
Expand Down Expand Up @@ -87,7 +87,6 @@ func New(
listGatherers []gatherers.Interface,
anonymizer *anonymization.Anonymizer,
insightsOperatorCLI operatorv1client.InsightsOperatorInterface,
apiConfigurator configobserver.InsightsDataGatherObserver,
kubeClient *kubernetes.Clientset,
) *Controller {
statuses := make(map[string]controllerstatus.StatusController)
Expand Down

0 comments on commit 3b100a3

Please sign in to comment.