Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

PollInterval is not considered by controllers #288

Closed
fhopfensperger opened this issue Aug 1, 2022 · 0 comments · Fixed by #289 or crossplane/upjet#112
Closed

PollInterval is not considered by controllers #288

fhopfensperger opened this issue Aug 1, 2022 · 0 comments · Fixed by #289 or crossplane/upjet#112
Labels
bug Something isn't working

Comments

@fhopfensperger
Copy link
Contributor

What happened?

Currently the PollInterval Option is not considered by controllers, instead the default poll interval is used. For example provider-jet-aws defines a poll interval

	o := tjcontroller.Options{
		Options: xpcontroller.Options{
			Logger:                  log,
			GlobalRateLimiter:       ratelimiter.NewGlobal(*maxReconcileRate),
			PollInterval:            1 * time.Minute,
			MaxConcurrentReconciles: 1,
			Features:                &feature.Flags{},
		},
		Provider:       config.GetProvider(),
		WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithProviderRunner(runner)),
		SetupFn:        clients.TerraformSetupBuilder(*terraformVersion, *providerSource, *providerVersion),
	}

but this option is not considered in controller setup functions

	r := managed.NewReconciler(mgr,
		xpresource.ManagedKind(v1alpha2.Attachment_GroupVersionKind),
		managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["aws_autoscaling_attachment"])),
		managed.WithLogger(o.Logger.WithValues("controller", name)),
		managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))),
		managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))),
		managed.WithTimeout(3*time.Minute),
		managed.WithInitializers(initializers),
		managed.WithConnectionPublishers(cps...),
	)

as the Terrajet generator doesn't define this option.

How can we reproduce it?

Run make generate on any jet provider

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
1 participant