From c91496dda04bdb3d685fffa4747d12a763f3ad37 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 20 May 2021 13:28:22 +0200 Subject: [PATCH] cluster: enable debug handlers on GCE master nodes This is needed for testing metrics support via the secure port of kube-scheduler and kube-controller-manager. To access that port, port-forwarding is used. --- cluster/gce/config-test.sh | 4 ++++ cluster/gce/util.sh | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index 855c1f7b1f6..97eb02c46a1 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -236,6 +236,10 @@ TEST_CLUSTER_RESYNC_PERIOD=${TEST_CLUSTER_RESYNC_PERIOD:---min-resync-period=3m} # ContentType used by all components to communicate with apiserver. TEST_CLUSTER_API_CONTENT_TYPE=${TEST_CLUSTER_API_CONTENT_TYPE:-} +# Enable debug handlers (port forwarding, exec, container logs, etc.). +KUBELET_ENABLE_DEBUGGING_HANDLERS=${KUBELET_ENABLE_DEBUGGING_HANDLERS:-true} +MASTER_KUBELET_ENABLE_DEBUGGING_HANDLERS=${MASTER_KUBELET_ENABLE_DEBUGGING_HANDLERS:-${KUBELET_ENABLE_DEBUGGING_HANDLERS}} + KUBELET_TEST_ARGS="${KUBELET_TEST_ARGS:-} --serialize-image-pulls=false ${TEST_CLUSTER_API_CONTENT_TYPE}" if [[ "${NODE_OS_DISTRIBUTION}" = 'gci' ]] || [[ "${NODE_OS_DISTRIBUTION}" = 'ubuntu' ]] || [[ "${NODE_OS_DISTRIBUTION}" = 'custom' ]]; then NODE_KUBELET_TEST_ARGS="${NODE_KUBELET_TEST_ARGS:-} --kernel-memcg-notification=true" diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 4e2e48cda2f..3da39b90ee5 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -1025,7 +1025,7 @@ EOF # cat the Kubelet config yaml for masters function print-master-kubelet-config { cat <