k3s/pkg/kubelet/stats
Filipe Brandenburger b230fb8ac4 Use a []string for CgroupName, which is a more accurate internal representation
The slice of strings more precisely captures the hierarchic nature of
the cgroup paths we use to represent pods and their groupings.

It also ensures we're reducing the chances of passing an incorrect path
format to a cgroup driver that requires a different path naming, since
now explicit conversions are always needed.

The new constructor NewCgroupName starts from an existing CgroupName,
which enforces a hierarchy where a root is always needed. It also
performs checking on the component names to ensure invalid characters
("/" and "_") are not in use.

A RootCgroupName for the top of the cgroup hierarchy tree is introduced.

This refactor results in a net reduction of around 30 lines of code,
mainly with the demise of ConvertCgroupNameToSystemd which had fairly
complicated logic in it and was doing just too many things.

There's a small TODO in a helper updateSystemdCgroupInfo that was
introduced to make this commit possible. That logic really belongs in
libcontainer, I'm planning to send a PR there to include it there.
(The API already takes a field with that information, only that field is
only processed in cgroupfs and not systemd driver, we should fix that.)

Tested by running the e2e-node tests on both Ubuntu 16.04 (with cgroupfs
driver) and CentOS 7 (with systemd driver.)
2018-05-01 08:29:06 -07:00
..
BUILD Update bazel BUILD files 2018-04-11 09:26:02 -07:00
cadvisor_stats_provider.go Use a []string for CgroupName, which is a more accurate internal representation 2018-05-01 08:29:06 -07:00
cadvisor_stats_provider_test.go Fix TestCadvisorListPodStats failure under mac/darwin 2017-12-26 19:59:50 -05:00
cri_stats_provider.go Remove the workaround of heapster panic 2018-04-09 09:43:39 +08:00
cri_stats_provider_test.go Move check and import 2018-04-10 11:55:46 +02:00
helper.go Move the kubelet network package down to dockershim 2018-04-11 09:25:56 -07:00
helper_test.go
log_metrics_provider.go Adding per container stats for CRI runtimes 2018-02-20 19:50:47 -08:00
log_metrics_provider_test.go Test cases to verify container log stats 2018-02-21 13:01:49 -08:00
stats_provider.go Merge pull request #59906 from abhi/log_stats 2018-02-21 19:40:42 -08:00
stats_provider_linux.go Updated PID pressure node condition. 2018-01-14 18:26:00 +08:00
stats_provider_test.go Make eviction manager work with CRI container runtime. 2018-01-30 17:57:46 +00:00
stats_provider_unsupported.go Updated PID pressure node condition. 2018-01-14 18:26:00 +08:00