sshathee 5b258533ed Check namespace label for platform
This commit checks for label "app.starlingx.io/component=platform" in
namespace label. Earlier we were checking in pod labels for platform component
or whether namespace is in a list of hardcoded namespaces.
With this commit, in addition to considering previous checks, we also
check if platform label is present in k8s namespace label, if so it will
be considered as a platform resource in collectd.

It also de-duplicates code by combining common code of cpu and
memory.

Test Plan:
   Pass: Code changes on AIO-SX and collectd was restarted successfully
   Pass: Verify that /var/log/collectd.log contains cpu and memory
   consumption info for platform pods
   Pass: Verify namespace platform label is taken into account by
   collectd

Closes-Bug: #2105964
Change-Id: Ia038d0aa9b59a6904b0dcb756c38dc80693457b1
Signed-off-by: sshathee <shunmugam.shatheesh@windriver.com>
2025-04-22 00:18:59 -04:00
2025-01-21 11:17:26 -05:00
2019-09-09 14:37:23 -05:00
2019-09-09 14:37:23 -05:00
2019-09-09 14:37:23 -05:00
Description
StarlingX system monitoring and repoting tools
3.7 MiB
Languages
Python 83.5%
Perl 15.7%
Makefile 0.7%
Shell 0.1%