mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
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.
This commit is contained in:
parent
f298a658ae
commit
c91496dda0
@ -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"
|
||||
|
@ -1025,7 +1025,7 @@ EOF
|
||||
# cat the Kubelet config yaml for masters
|
||||
function print-master-kubelet-config {
|
||||
cat <<EOF
|
||||
enableDebuggingHandlers: false
|
||||
enableDebuggingHandlers: ${MASTER_KUBELET_ENABLE_DEBUGGING_HANDLERS:-false}
|
||||
hairpinMode: none
|
||||
staticPodPath: /etc/kubernetes/manifests
|
||||
authentication:
|
||||
@ -1049,7 +1049,7 @@ EOF
|
||||
# cat the Kubelet config yaml in common between linux nodes and windows nodes
|
||||
function print-common-node-kubelet-config {
|
||||
cat <<EOF
|
||||
enableDebuggingHandlers: true
|
||||
enableDebuggingHandlers: ${KUBELET_ENABLE_DEBUGGING_HANDLERS:-true}
|
||||
EOF
|
||||
if [[ "${HAIRPIN_MODE:-}" == "promiscuous-bridge" ]] || \
|
||||
[[ "${HAIRPIN_MODE:-}" == "hairpin-veth" ]] || \
|
||||
|
Loading…
Reference in New Issue
Block a user