retina icon indicating copy to clipboard operation
retina copied to clipboard

edge cases for MetricConfiguration CRD

Open vakalapa opened this issue 1 year ago • 5 comments

If enableAnnotations=false, then advanced metrics won't show up unless a MetricConfiguration CRD exists (metric modules are initialized via metricModule's Reconcile()). We should initialize with default context options instead.

Also, should we support MetricConfiguration CRD when enableAnnotations=true? Right now, we do not: https://github.com/microsoft/retina/blob/9248f0d140e5c93da77bdbdf5e43ea3b0029cfd4/controller/main.go#L254-L268

vakalapa avatar Mar 19 '24 16:03 vakalapa

Also, should we support MetricConfiguration CRD when enableAnnotations=true? Right now, we do not:

As a user, it took me a long time to figure out why MetricConfiguration CR seemed to make no effect. 😃 Turned out it was indeed because I had enableAnnotations=true, which to me was not intuitive.

andreev-io avatar Apr 05 '24 14:04 andreev-io

Hi @vakalapa! I have been using Retina for a couple of weeks now and I would like to work on this issue. So the goal is to initialize metricsConfigController even if MetricConfiguration CR doesn't exist. In that case, we need to initialize the controller with default config right? Correct me If I am wrong.

https://github.com/microsoft/retina/blob/9248f0d140e5c93da77bdbdf5e43ea3b0029cfd4/controller/main.go#L221

Also if you provide more info it'll be helpful to move forward.

roopeshsn avatar Apr 17 '24 17:04 roopeshsn

Hi @vakalapa, @rbtr! Your input will help me to move forward.

roopeshsn avatar May 07 '24 03:05 roopeshsn

Hi @vakalapa! I have been using Retina for a couple of weeks now and I would like to work on this issue. So the goal is to initialize metricsConfigController even if MetricConfiguration CR doesn't exist. In that case, we need to initialize the controller with default config right? Correct me If I am wrong.

retina/controller/main.go

Line 221 in 9248f0d

metricsModule := mm.InitModule(ctx, config, pubSub, enrich, fm, controllerCache) Also if you provide more info it'll be helpful to move forward.

@roopeshsn this is correct 🙂

rbtr avatar May 20 '24 19:05 rbtr

Would that gather metrics for all resources in the cluster? We are currently missing that feature (without having to define a MetricConfiguration CR)

cmergenthaler avatar Jul 16 '24 11:07 cmergenthaler