Add option and defaults to configure metrics exporting in containerd (#5466)

* Add metrics exporting in containerd config

* Add containerd.yml with containerd configuration example to the sample group_vars
This commit is contained in:
Kubernetes Prow Robot 2020-03-04 14:46:38 -08:00 committed by GitHub
parent 588896712e
commit be12164290
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,15 @@
---
# Please see roles/container-engine/containerd/defaults/main.yml for more configuration options
# containerd_config:
# grpc:
# max_recv_message_size: 16777216
# max_send_message_size: 16777216
# debug:
# level: ""
# registries:
# "docker.io": "https://registry-1.docker.io"
# max_container_log_line_size: -1
# metrics:
# address: ""
# grpc_histogram: false

View file

@ -44,3 +44,9 @@ disabled_plugins = ["restart"]
endpoint = ["{{ addr }}"] endpoint = ["{{ addr }}"]
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if 'metrics' in containerd_config %}
[metrics]
address = "{{ containerd_config.metrics.address | default('') }}"
grpc_histogram = {{ containerd_config.metrics.grpc_histogram | default(false) | lower }}
{% endif %}