grafana / crossplane-provider-grafana

Crossplane provider of https://github.com/grafana/terraform-provider-grafana. Generated by https://github.com/upbound/upjet
Apache License 2.0
26 stars 14 forks source link

Super high CPU usage with many resources #34

Closed patst closed 1 year ago

patst commented 1 year ago

We use the provider to create Dashboards, Folders, etc.

What we observe is an incredible high amount of CPU usage. We have around 100 - 400 different resources per cluster and the uses the cpu of a complete 8vCPU core node in our cluster the whole time. Changes to a single dashboard can take a long time until reconciled.

It feels connected to this: https://github.com/upbound/upjet/issues/116

We tried to configure the provider with --sync=24h but that did not change anything.

I would think it is related to the PollIntervall setting ( https://github.com/grafana/crossplane-provider-grafana/blob/4644dab3fdf3554ac31cd9f212c7b8c9d524b60b/cmd/provider/main.go#L80 ).

The AWS provider allows a configuration of the interval (see https://github.com/upbound/provider-aws/pull/140/files ).

I would propose we make the interval configurable for this provider as well and try to provide a patch for that.