Files
kubernetes/test/e2e/dra/kind.yaml
Patrick Ohly 5d536bfb8e DRA: log more information
For debugging double allocation of the same
device (https://github.com/kubernetes/kubernetes/issues/133602) it is necessary
to have information about pools, devices and in-flight claims. Log calls get
extended and the config for DRA CI jobs updated to enable higher verbosity for
relevant source files.

Log output in such a cluster at verbosity 6 looks like this:

I1215 10:28:54.166872       1 allocator_incubating.go:130] "Gathered pool information" logger="FilterWithNominatedPods.Filter.DynamicResources" pod="dra-8841/tester-3" node="kind-worker2" pools={"count":1,"devices":["dra-8841.k8s.io/kind-worker2/device-00"],"meta":[{"InvalidReason":"","id":"dra-8841.k8s.io/kind-worker2","isIncomplete":false,"isInvalid":false}]}
I1215 10:28:54.166941       1 allocator_incubating.go:254] "Gathered information about devices" logger="FilterWithNominatedPods.Filter.DynamicResources" pod="dra-8841/tester-3" node="kind-worker2" allocatedDevices={"count":2,"devices":["dra-8841.k8s.io/kind-worker/device-00","dra-8841.k8s.io/kind-worker3/device-00"]} minDevicesToBeAllocated=1
2025-12-16 09:58:05 +01:00

81 lines
2.6 KiB
YAML

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches:
# Enable CDI as described in
# https://github.com/container-orchestrated-devices/container-device-interface#containerd-configuration
- |-
[plugins."io.containerd.grpc.v1.cri"]
enable_cdi = true
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker
kubeadmConfigPatches:
# v1beta4 for the future (v1.35.0+ ?)
# https://github.com/kubernetes-sigs/kind/issues/3847
# TODO: drop v1beta3 when kind makes the switch
- |
kind: ClusterConfiguration
apiVersion: kubeadm.k8s.io/v1beta4
scheduler:
extraArgs:
- name: "v"
value: "5"
- name: "vmodule"
value: "allocator*=6,pools*=6,dynamicresources=6,allocateddevices=6,dra_manager=6,extendeddynamicresources=6" # structured/internal/*/allocator*.go, DRA scheduler plugin
controllerManager:
extraArgs:
- name: "v"
value: "5"
- name: "vmodule"
value: "controller=6" # resourceclaim/controller.go - should have renamed it when copying the controller it was based on!
apiServer:
extraArgs:
runtime-config: "resource.k8s.io/v1alpha3=true,resource.k8s.io/v1beta1=true,resource.k8s.io/v1beta2=true"
- |
kind: InitConfiguration
apiVersion: kubeadm.k8s.io/v1beta4
nodeRegistration:
kubeletExtraArgs:
- name: "v"
value: "5"
- |
kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:
- name: "v"
value: "5"
# v1beta3 for v1.23.0 ... ?
- |
kind: ClusterConfiguration
apiVersion: kubeadm.k8s.io/v1beta3
scheduler:
extraArgs:
v: "5"
vmodule: "allocator*=6,pools*=6,dynamicresources=6,allocateddevices=6,dra_manager=6,extendeddynamicresources=6" # structured/internal/*/allocator*.go, DRA scheduler plugin
controllerManager:
extraArgs:
v: "5"
vmodule: "controller=6" # resourceclaim/controller.go - should have renamed it when copying the controller it was based on!
apiServer:
extraArgs:
runtime-config: "resource.k8s.io/v1alpha3=true,resource.k8s.io/v1beta1=true,resource.k8s.io/v1beta2=true"
- |
kind: InitConfiguration
apiVersion: kubeadm.k8s.io/v1beta3
nodeRegistration:
kubeletExtraArgs:
v: "5"
- |
kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:
v: "5"
# Feature gates must be the last entry in this YAML.
# Some Prow jobs add more feature gates with
#
# --config <(cat test/e2e/dra/kind.yaml; echo " <some feature>: true")
featureGates:
DynamicResourceAllocation: true