--cluster-name flag is ignored
Describe the bug Despite setting --cluster-name flag when launching popeye from a CronJob, the name is not set on any label nor report. Digging into the code looks like after several clean ups, this flag is not used internally any more.
It doesn't show up in normal report, although it's more important on prometheus output as label is not set.
To Reproduce Steps to reproduce the behavior:
- Launch popeye using --cluster-name flag
- Output report has cluster name unchanged.
i.e.
$ ./execs/popeye --cluster-name foobar
[... header with popeye head ...]
GENERAL [DEV-CLUSTER]
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
ยท Connectivity...................................................................................โ
ยท MetricServer...................................................................................โ
Expected behavior
$ ./execs/popeye --cluster-name foobar
[... header with popeye head ...]
GENERAL [FOOBAR]
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
ยท Connectivity...................................................................................โ
ยท MetricServer...................................................................................โ
Versions (please complete the following information):
- Popeye 0.9.0
Is it by design that CronJobs do not use a config file? Wouldn't it be useful to get it working with a config file?
PS: We recently started using Popeye at my workplace using CronJobs. I thought of adding config files in our CronJobs. This is a news for me that we cannot do that.
Well, it's not needed if they run with a serviceAccountName with enough permissions to perform such operations. You can create a specific "read-only" role, assign it to a service account, and run popeye with it. I guess using a kubeconfig file is also an option, but if its cert gets expired, you need to re-new them, etc etc...
For me it's easier the service account.
I can confirm the issue for 0.9.0
@danibaeyens Great catch! let's see if we're happier in v0.9.1...