Skip to content

Add containerd metrics configurability - #3

Open
bogn83 wants to merge 1 commit into
chr4:mainfrom
bogn83:add_containerd_metrics_configurability
Open

Add containerd metrics configurability#3
bogn83 wants to merge 1 commit into
chr4:mainfrom
bogn83:add_containerd_metrics_configurability

Conversation

@bogn83

@bogn83 bogn83 commented Feb 5, 2020

Copy link
Copy Markdown

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

bogn83 commented Feb 5, 2020

Copy link
Copy Markdown
Author

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

chr4 commented Feb 6, 2020

Copy link
Copy Markdown
Owner

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