Skip to content

Commit

Permalink
add e2e to verify node can be bootstrapped
Browse files Browse the repository at this point in the history
  • Loading branch information
bravebeaver committed Feb 17, 2025
1 parent 27ca7dc commit ac6356f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions e2e/scenario_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1664,3 +1664,22 @@ func Test_Ubuntu2404ARM(t *testing.T) {
},
})
}

func Test_Ubuntu2204_MetricsFromCRI(t *testing.T) {
RunScenario(t, &Scenario{
Description: "tests that a node on ubuntu 2204 bootstrapped with metrics from CRI enabled will still have kubelet metrics",
Config: Config{
Cluster: ClusterKubenet,
VHD: config.VHDUbuntu2204Gen2Containerd,
BootstrapConfigMutator: func(nbc *datamodel.NodeBootstrappingConfiguration) {
if nbc.KubeletConfig == nil {
nbc.KubeletConfig = map[string]string{}
}
nbc.KubeletConfig["--pod-container-stats-cri"] = "true"
},
Validator: func(ctx context.Context, s *Scenario) {
ValidateFileHasContent(ctx, s, "/etc/default/kubelet", "--feature-gates=PodAndContainerStatsFromCRI=true")
},
},
})
}
1 change: 1 addition & 0 deletions pkg/agent/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ var TranslatedKubeletConfigFlags = map[string]bool{
"--eviction-hard": true,
"--node-status-update-frequency": true,
"--node-status-report-frequency": true,
"--pod-container-stats-cri": true,
"--image-gc-high-threshold": true,
"--image-gc-low-threshold": true,
"--event-qps": true,
Expand Down

0 comments on commit ac6356f

Please sign in to comment.