Fix containerd tracing with containerd 2.x (#13630)

* fix(containerd): pass tracing settings as OpenTelemetry environment variables

* fix(containerd): address review on tracing

* fix(containerd): drop tracing comments
This commit is contained in:
MohammadReza
2026-10-12 10:11:23 +00:00
committed by GitHub
parent a4ac5d1121
commit 9a067a62b9
5 changed files with 30 additions and 13 deletions
@@ -4,6 +4,7 @@
become: true
vars:
container_manager: containerd
containerd_tracing_enabled: true
roles:
- role: kubespray_defaults
- role: container-engine/containerd
@@ -37,3 +37,24 @@
assert:
that:
- ('Hello from Docker' in nerdctl.results[3].stdout)
- name: Test containerd tracing
hosts: all
gather_facts: false
become: true
tasks:
- name: Get kubespray defaults
import_role:
name: ../../../../../kubespray_defaults
- name: List containerd plugins and deprecations
command: "{{ bin_dir }}/ctr {{ item }}"
loop:
- plugins ls
- deprecations list
register: ctr_tracing
changed_when: false
- name: Check the OTLP exporter is loaded and no tracing config is deprecated
assert:
that:
- ctr_tracing.results[0].stdout_lines | select('search', '^io\.containerd\.tracing\.processor\.v1\s+otlp\s.*\sok\s*$') | list | length == 1
- ('tracing' not in ctr_tracing.results[1].stdout)