Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add containerd metrics configurability #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bogn83
Copy link

@bogn83 bogn83 commented Feb 5, 2020

containerd provides its own metrics server exposing metrics in prometheus format if you configure an address for it in /etc/containerd/config.toml. That file is watched and salt triggers a restart of the containerd systemd unit if it's changed. reload: true is not used on the service because the containerd unit is not reloadable.

@bogn83 bogn83 force-pushed the add_containerd_metrics_configurability branch from a5311bf to 7fc90e6 Compare February 5, 2020 17:12
@bogn83 bogn83 force-pushed the add_containerd_metrics_configurability branch from 7fc90e6 to a4e5e14 Compare February 5, 2020 17:15
@bogn83 bogn83 requested a review from chr4 February 5, 2020 17:23
@bogn83
Copy link
Author

bogn83 commented Feb 5, 2020

Just found out that for user namespace remap scenarios the main difference compared to cadvisor is that instead of a cgroup slice (the case for cadvisor) we get the real container ID but sadly not the container name.

@chr4
Copy link
Owner

chr4 commented Feb 6, 2020

Thanks for the pull request! I'm definitly in favor of adding this to the formula!

I think it makes sense to deploy the complete /etc/containerd/config.toml instead of using file.append. The default file seems to be not very large:

disabled_plugins = ["cri"]

#root = "/var/lib/containerd"
#state = "/run/containerd"
#subreaper = true
#oom_score = 0

#[grpc]
#  address = "/run/containerd/containerd.sock"
#  uid = 0
#  gid = 0

#[debug]
#  address = "/run/containerd/debug.sock"
#  uid = 0
#  gid = 0
#  level = "info"

Maybe we can put the complete content into a YAML pillar parameter, like so (this should be the default):

docker:
  containerd:
    config: |
      disabled_plugins = ["cri"]

That would make all options configurable, while being simple. Furthermore it enables consistent control over the complete file, which can't be guaranteed with file.append.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants