popeye icon indicating copy to clipboard operation
popeye copied to clipboard

--cluster-name flag is ignored

Open danibaeyens opened this issue 5 years ago โ€ข 4 comments




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:

  1. Launch popeye using --cluster-name flag
  2. 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

danibaeyens avatar Jan 21 '21 13:01 danibaeyens

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.

premkumar-gg avatar Jan 26 '21 08:01 premkumar-gg

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.

danibaeyens avatar Jan 28 '21 13:01 danibaeyens

I can confirm the issue for 0.9.0

marians avatar Feb 15 '21 17:02 marians

@danibaeyens Great catch! let's see if we're happier in v0.9.1...

derailed avatar May 05 '21 13:05 derailed