diff --git a/test/e2e/data/infrastructure-docker/main/cluster-template-topology-dualstack-ipv4-primary/cluster.yaml b/test/e2e/data/infrastructure-docker/main/cluster-template-topology-dualstack-ipv4-primary/cluster.yaml index 8193123cde52..1f9e0e39671e 100644 --- a/test/e2e/data/infrastructure-docker/main/cluster-template-topology-dualstack-ipv4-primary/cluster.yaml +++ b/test/e2e/data/infrastructure-docker/main/cluster-template-topology-dualstack-ipv4-primary/cluster.yaml @@ -11,6 +11,8 @@ spec: value: false - name: externalCloudProvider value: true + - name: debugLogging + value: true clusterNetwork: services: cidrBlocks: diff --git a/test/e2e/data/infrastructure-docker/main/cluster-template-topology-dualstack-ipv6-primary/cluster.yaml b/test/e2e/data/infrastructure-docker/main/cluster-template-topology-dualstack-ipv6-primary/cluster.yaml index 4ff80d16ccbc..0b11fa6e7a17 100644 --- a/test/e2e/data/infrastructure-docker/main/cluster-template-topology-dualstack-ipv6-primary/cluster.yaml +++ b/test/e2e/data/infrastructure-docker/main/cluster-template-topology-dualstack-ipv6-primary/cluster.yaml @@ -11,6 +11,8 @@ spec: value: true - name: externalCloudProvider value: true + - name: debugLogging + value: true clusterNetwork: services: cidrBlocks: diff --git a/test/e2e/data/infrastructure-docker/main/clusterclass-quick-start.yaml b/test/e2e/data/infrastructure-docker/main/clusterclass-quick-start.yaml index 770fad20c4c3..f110ab82a83f 100644 --- a/test/e2e/data/infrastructure-docker/main/clusterclass-quick-start.yaml +++ b/test/e2e/data/infrastructure-docker/main/clusterclass-quick-start.yaml @@ -130,6 +130,11 @@ spec: openAPIV3Schema: type: boolean default: false + - name: debugLogging + schema: + openAPIV3Schema: + type: boolean + default: false patches: - name: lbImageRepository definitions: @@ -385,6 +390,64 @@ spec: namespaces: [kube-system] path: /etc/kubernetes/kube-apiserver-admission-pss.yaml enabledIf: '{{ semverCompare ">= v1.24" .builtin.controlPlane.version }}' + - name: controlPlaneDebugLogging + enabledIf: "{{ .debugLogging }}" + description: "Configures control plane components and kubelet to log at v=4." + definitions: + - selector: + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + kind: KubeadmControlPlaneTemplate + matchResources: + controlPlane: true + jsonPatches: + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/joinConfiguration/nodeRegistration/kubeletExtraArgs" + value: + v: "4" + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/initConfiguration/nodeRegistration/kubeletExtraArgs" + value: + v: "4" + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraArgs" + value: + v: "4" + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/controllerManager/extraArgs" + value: + v: "4" + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/scheduler/extraArgs" + value: + v: "4" + - name: workerKubeletDebugLogging + enabledIf: "{{ .debugLogging }}" + description: "Configures worker kubelets to log at v=4." + definitions: + - selector: + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + kind: KubeadmConfigTemplate + matchResources: + machineDeploymentClass: + names: + - '*-worker' + jsonPatches: + - op: add + path: "/spec/template/spec/joinConfiguration/nodeRegistration/kubeletExtraArgs" + value: + v: "4" + - selector: + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + kind: KubeadmConfigTemplate + matchResources: + machinePoolClass: + names: + - '*-worker' + jsonPatches: + - op: add + path: "/spec/template/spec/joinConfiguration/nodeRegistration/kubeletExtraArgs" + value: + v: "4" --- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: DockerClusterTemplate