Skip to content

Commit

Permalink
feat(abe2e): move kubelet node IP validator to common validators (#4936)
Browse files Browse the repository at this point in the history
Co-authored-by: Cameron Meissner <[email protected]>
  • Loading branch information
cameronmeissner and Cameron Meissner authored Sep 13, 2024
1 parent 960d3e4 commit 2a17809
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
12 changes: 0 additions & 12 deletions e2e/scenario_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ func Test_azurelinuxv2(t *testing.T) {
LiveVMValidators: []*LiveVMValidator{
containerdVersionValidator("1.6.26"),
runcVersionValidator("1.1.9"),
kubeletNodeIPValidator(),
},
},
})
Expand Down Expand Up @@ -121,9 +120,6 @@ func Test_azurelinuxv2_azurecni(t *testing.T) {
nbc.ContainerService.Properties.AgentPoolProfiles[0].Distro = "aks-azurelinux-v2-gen2"
nbc.AgentPoolProfile.Distro = "aks-azurelinux-v2-gen2"
},
LiveVMValidators: []*LiveVMValidator{
kubeletNodeIPValidator(),
},
},
})
}
Expand Down Expand Up @@ -371,9 +367,6 @@ func Test_marinerv2_azurecni(t *testing.T) {
nbc.ContainerService.Properties.AgentPoolProfiles[0].Distro = "aks-cblmariner-v2-gen2"
nbc.AgentPoolProfile.Distro = "aks-cblmariner-v2-gen2"
},
LiveVMValidators: []*LiveVMValidator{
kubeletNodeIPValidator(),
},
},
})
}
Expand Down Expand Up @@ -522,7 +515,6 @@ func Test_ubuntu1804(t *testing.T) {
LiveVMValidators: []*LiveVMValidator{
containerdVersionValidator("1.7.1+azure-1"),
runcVersionValidator("1.1.14-1"),
kubeletNodeIPValidator(),
},
},
})
Expand All @@ -538,9 +530,6 @@ func Test_ubuntu1804_azurecni(t *testing.T) {
nbc.ContainerService.Properties.OrchestratorProfile.KubernetesConfig.NetworkPlugin = string(armcontainerservice.NetworkPluginAzure)
nbc.AgentPoolProfile.KubernetesConfig.NetworkPlugin = string(armcontainerservice.NetworkPluginAzure)
},
LiveVMValidators: []*LiveVMValidator{
kubeletNodeIPValidator(),
},
},
})
}
Expand Down Expand Up @@ -634,7 +623,6 @@ func Test_ubuntu2204(t *testing.T) {
LiveVMValidators: []*LiveVMValidator{
containerdVersionValidator("1.7.20-1"),
runcVersionValidator("1.1.14-1"),
kubeletNodeIPValidator(),
},
},
})
Expand Down
7 changes: 7 additions & 0 deletions e2e/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"strings"
"testing"

"github.com/Azure/agentbakere2e/config"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -148,6 +149,12 @@ func commonLiveVMValidators(opts *scenarioRunOpts) []*LiveVMValidator {
},
}
validators = append(validators, leakedSecretsValidators(opts)...)

// kubeletNodeIPValidator cannot be run on older VHDs with kubelet < 1.29
if opts.scenario.VHD.Version != config.VHDUbuntu2204Gen2ContainerdPrivateKubePkg.Version {
validators = append(validators, kubeletNodeIPValidator())
}

return validators
}

Expand Down

0 comments on commit 2a17809

Please sign in to comment.