add ability to enable kubelet structured logging in CI

This commit is contained in:
Benjamin Elder
2021-03-11 17:09:34 -08:00
parent a4df15b6f7
commit 16d2972dcd

View File

@@ -90,6 +90,8 @@ build() {
# up a cluster with kind
create_cluster() {
# set KUBELET_LOG_FORMAT=structured to enable structured logging in kubelet
KUBELET_LOG_FORMAT="${KUBELET_LOG_FORMAT:-text}"
# JSON map injected into featureGates config
feature_gates="{}"
@@ -165,11 +167,13 @@ kubeadmConfigPatches:
nodeRegistration:
kubeletExtraArgs:
"v": "${KIND_CLUSTER_LOG_LEVEL}"
"logging-format": "${KUBELET_LOG_FORMAT}"
---
kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:
"v": "${KIND_CLUSTER_LOG_LEVEL}"
"logging-format": "${KUBELET_LOG_FORMAT}"
EOF
# NOTE: must match the number of workers above
NUM_NODES=2