Skip to content

Commit ac6356f

Browse files
committed
add e2e to verify node can be bootstrapped
1 parent 27ca7dc commit ac6356f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

e2e/scenario_test.go

+19
Original file line numberDiff line numberDiff line change
@@ -1664,3 +1664,22 @@ func Test_Ubuntu2404ARM(t *testing.T) {
16641664
},
16651665
})
16661666
}
1667+
1668+
func Test_Ubuntu2204_MetricsFromCRI(t *testing.T) {
1669+
RunScenario(t, &Scenario{
1670+
Description: "tests that a node on ubuntu 2204 bootstrapped with metrics from CRI enabled will still have kubelet metrics",
1671+
Config: Config{
1672+
Cluster: ClusterKubenet,
1673+
VHD: config.VHDUbuntu2204Gen2Containerd,
1674+
BootstrapConfigMutator: func(nbc *datamodel.NodeBootstrappingConfiguration) {
1675+
if nbc.KubeletConfig == nil {
1676+
nbc.KubeletConfig = map[string]string{}
1677+
}
1678+
nbc.KubeletConfig["--pod-container-stats-cri"] = "true"
1679+
},
1680+
Validator: func(ctx context.Context, s *Scenario) {
1681+
ValidateFileHasContent(ctx, s, "/etc/default/kubelet", "--feature-gates=PodAndContainerStatsFromCRI=true")
1682+
},
1683+
},
1684+
})
1685+
}

pkg/agent/utils.go

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ var TranslatedKubeletConfigFlags = map[string]bool{
4545
"--eviction-hard": true,
4646
"--node-status-update-frequency": true,
4747
"--node-status-report-frequency": true,
48+
"--pod-container-stats-cri": true,
4849
"--image-gc-high-threshold": true,
4950
"--image-gc-low-threshold": true,
5051
"--event-qps": true,

0 commit comments

Comments
 (0)