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:
parent
588896712e
commit
be12164290
2 changed files with 21 additions and 0 deletions
15
inventory/sample/group_vars/all/containerd.yml
Normal file
15
inventory/sample/group_vars/all/containerd.yml
Normal 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
|
|
@ -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 %}
|
||||||
|
|
Loading…
Reference in a new issue