mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-20 09:33:52 +00:00
Make kube-proxy default to iptables (regression)
This was accidentally introduced as part of the component config changes.
This commit is contained in:
@@ -197,6 +197,10 @@ func (config *KubeProxyTestConfig) hitNodePort(epCount int) {
|
||||
config.dialFromNode("udp", node2_IP, nodeUdpPort, tries, epCount)
|
||||
By("dialing(http) node1 --> node2:nodeHttpPort")
|
||||
config.dialFromNode("http", node2_IP, nodeHttpPort, tries, epCount)
|
||||
|
||||
By("checking kube-proxy URLs")
|
||||
config.getSelfURL("/healthz", "ok")
|
||||
config.getSelfURL("/proxyMode", "iptables") // the default
|
||||
}
|
||||
|
||||
func (config *KubeProxyTestConfig) hitEndpoints() {
|
||||
@@ -252,6 +256,13 @@ func (config *KubeProxyTestConfig) dialFromNode(protocol, targetIP string, targe
|
||||
Expect(strconv.Atoi(strings.TrimSpace(stdout))).To(BeNumerically("==", expectedCount))
|
||||
}
|
||||
|
||||
func (config *KubeProxyTestConfig) getSelfURL(path string, expected string) {
|
||||
cmd := fmt.Sprintf("curl -s --connect-timeout 1 http://localhost:10249%s", path)
|
||||
By(fmt.Sprintf("Getting kube-proxy self URL %s", path))
|
||||
stdout := RunHostCmdOrDie(config.f.Namespace.Name, config.hostTestContainerPod.Name, cmd)
|
||||
Expect(strings.Contains(stdout, expected)).To(BeTrue())
|
||||
}
|
||||
|
||||
func (config *KubeProxyTestConfig) createNetShellPodSpec(podName string, node string) *api.Pod {
|
||||
pod := &api.Pod{
|
||||
TypeMeta: unversioned.TypeMeta{
|
||||
|
Reference in New Issue
Block a user