Skip to content

Commit

Permalink
chore(containerd): add some config debug options
Browse files Browse the repository at this point in the history
  • Loading branch information
spnngl committed Apr 17, 2024
1 parent 4baa2c8 commit d713abe
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
4 changes: 4 additions & 0 deletions inventory/sample/group_vars/all/containerd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
# containerd_grpc_max_recv_message_size: 16777216
# containerd_grpc_max_send_message_size: 16777216

# containerd_debug_address: "/var/run/containerd/debug.sock"
# containerd_debug_level: "info"
# containerd_debug_format: "text"
# containerd_debug_uid: 0
# containerd_debug_gid: 0

# containerd_metrics_address: ""

Expand Down
8 changes: 7 additions & 1 deletion roles/container-engine/containerd/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ containerd_base_runtime_specs:
containerd_grpc_max_recv_message_size: 16777216
containerd_grpc_max_send_message_size: 16777216

containerd_debug_level: "info"
# debug socket location: unix or tcp format
containerd_debug_address: ""
containerd_debug_level: ""
# logs format, supported values: text, json
containerd_debug_format: ""
containerd_debug_uid: 0
containerd_debug_gid: 0

containerd_metrics_address: ""

Expand Down
12 changes: 12 additions & 0 deletions roles/container-engine/containerd/templates/config.toml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,19 @@ oom_score = {{ containerd_oom_score }}
max_send_message_size = {{ containerd_grpc_max_send_message_size }}

[debug]
{% if containerd_debug_address %}
address = "{{ containerd_debug_address }}"
{% endif %}
level = "{{ containerd_debug_level }}"
{% if containerd_debug_format %}
format = "{{ containerd_debug_format }}"
{% endif %}
{% if containerd_debug_uid %}
uid = "{{ containerd_debug_uid }}"
{% endif %}
{% if containerd_debug_gid %}
gid = "{{ containerd_debug_gid }}"
{% endif %}

[metrics]
address = "{{ containerd_metrics_address }}"
Expand Down

0 comments on commit d713abe

Please sign in to comment.