mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 02:11:09 +00:00
e2e_node: kubelet config: move to file where possible
This commit is contained in:
parent
4097a3d472
commit
6e9e436026
@ -49,7 +49,7 @@ extra_envs=${EXTRA_ENVS:-}
|
|||||||
runtime_config=${RUNTIME_CONFIG:-}
|
runtime_config=${RUNTIME_CONFIG:-}
|
||||||
ssh_user=${SSH_USER:-"${USER}"}
|
ssh_user=${SSH_USER:-"${USER}"}
|
||||||
ssh_key=${SSH_KEY:-}
|
ssh_key=${SSH_KEY:-}
|
||||||
kubelet_config_file=${KUBELET_CONFIG_FILE:-""}
|
kubelet_config_file=${KUBELET_CONFIG_FILE:-"test/e2e_node/jenkins/default-kubelet-config.yaml"}
|
||||||
|
|
||||||
# Parse the flags to pass to ginkgo
|
# Parse the flags to pass to ginkgo
|
||||||
ginkgoflags=""
|
ginkgoflags=""
|
||||||
|
27
test/e2e_node/jenkins/default-kubelet-config.yaml
Normal file
27
test/e2e_node/jenkins/default-kubelet-config.yaml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
apiVersion: kubelet.config.k8s.io/v1beta1
|
||||||
|
kind: KubeletConfiguration
|
||||||
|
cgroupDriver: cgroupfs
|
||||||
|
cgroupRoot: /
|
||||||
|
|
||||||
|
# Assign a fixed CIDR to the node because we do not run a node controller
|
||||||
|
# This MUST be in sync with IPs in:
|
||||||
|
# - cluster/gce/config-test.sh and
|
||||||
|
# - test/e2e_node/conformance/run_test.sh
|
||||||
|
podCIDR: "10.100.0.0/24"
|
||||||
|
|
||||||
|
# Aggregate volumes frequently to reduce test wait times
|
||||||
|
volumeStatsAggPeriod: 10s
|
||||||
|
# Check files frequently to reduce test wait times
|
||||||
|
fileCheckFrequency: 10s
|
||||||
|
|
||||||
|
evictionPressureTransitionPeriod: 30s
|
||||||
|
evictionHard:
|
||||||
|
memory.available: 250Mi
|
||||||
|
nodefs.available: 10%
|
||||||
|
nodefs.inodesFree: 5%
|
||||||
|
evictionMinimumReclaim:
|
||||||
|
nodefs.available: 5%
|
||||||
|
nodefs.inodesFree: 5%
|
||||||
|
|
||||||
|
serializeImagePulls: false
|
||||||
|
|
@ -24,9 +24,7 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
|
||||||
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||||
cliflag "k8s.io/component-base/cli/flag"
|
cliflag "k8s.io/component-base/cli/flag"
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
@ -173,38 +171,9 @@ func (e *E2EServices) startKubelet() (*server, error) {
|
|||||||
// --read-only-port
|
// --read-only-port
|
||||||
kc.ReadOnlyPort = ports.KubeletReadOnlyPort
|
kc.ReadOnlyPort = ports.KubeletReadOnlyPort
|
||||||
|
|
||||||
// Setup general overrides for the kubelet.
|
// Static Pods are in a per-test location, so we override them for tests.
|
||||||
// TODO(endocrimes): Move the following to a `default` configuration file
|
|
||||||
|
|
||||||
kc.CgroupRoot = "/"
|
|
||||||
|
|
||||||
kc.VolumeStatsAggPeriod = metav1.Duration{Duration: 10 * time.Second} // Aggregate volumes frequently so tests don't need to wait as long
|
|
||||||
|
|
||||||
kc.SerializeImagePulls = false
|
|
||||||
|
|
||||||
kc.StaticPodPath = podPath
|
kc.StaticPodPath = podPath
|
||||||
|
|
||||||
kc.FileCheckFrequency = metav1.Duration{Duration: 10 * time.Second} // Check file frequently so tests won't wait too long
|
|
||||||
|
|
||||||
// Assign a fixed CIDR to the node because there is no node controller.
|
|
||||||
// Note: this MUST be in sync with the IP in
|
|
||||||
// - cluster/gce/config-test.sh and
|
|
||||||
// - test/e2e_node/conformance/run_test.sh.
|
|
||||||
kc.PodCIDR = "10.100.0.0/24"
|
|
||||||
|
|
||||||
kc.EvictionPressureTransitionPeriod = metav1.Duration{Duration: 30 * time.Second}
|
|
||||||
|
|
||||||
kc.EvictionHard = map[string]string{
|
|
||||||
"memory.available": "250Mi",
|
|
||||||
"nodefs.available": "10%",
|
|
||||||
"nodefs.inodesFree": "5%",
|
|
||||||
}
|
|
||||||
|
|
||||||
kc.EvictionMinimumReclaim = map[string]string{
|
|
||||||
"nodefs.available": "5%",
|
|
||||||
"nodefs.inodesFree": "5%",
|
|
||||||
}
|
|
||||||
|
|
||||||
var killCommand, restartCommand *exec.Cmd
|
var killCommand, restartCommand *exec.Cmd
|
||||||
var isSystemd bool
|
var isSystemd bool
|
||||||
// Apply default kubelet flags.
|
// Apply default kubelet flags.
|
||||||
|
Loading…
Reference in New Issue
Block a user