mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-03 03:38:15 +00:00
Remove proxy-mode annotation from kube-proxy
This removes the net.experimental.kubernetes.io/proxy-mode and net.beta.kubernetes.io/proxy-mode annotations from kube-proxy.
This commit is contained in:
@@ -120,140 +120,6 @@ func Test_getProxyMode(t *testing.T) {
|
||||
kernelCompat: true,
|
||||
expected: proxyModeIPTables,
|
||||
},
|
||||
{ // annotation says userspace
|
||||
flag: "",
|
||||
annotationKey: "net.experimental.kubernetes.io/proxy-mode",
|
||||
annotationVal: "userspace",
|
||||
expected: proxyModeUserspace,
|
||||
},
|
||||
{ // annotation says iptables, error detecting
|
||||
flag: "",
|
||||
annotationKey: "net.experimental.kubernetes.io/proxy-mode",
|
||||
annotationVal: "iptables",
|
||||
iptablesError: fmt.Errorf("oops!"),
|
||||
expected: proxyModeUserspace,
|
||||
},
|
||||
{ // annotation says iptables, version too low
|
||||
flag: "",
|
||||
annotationKey: "net.experimental.kubernetes.io/proxy-mode",
|
||||
annotationVal: "iptables",
|
||||
iptablesVersion: "0.0.0",
|
||||
expected: proxyModeUserspace,
|
||||
},
|
||||
{ // annotation says iptables, version ok, kernel not compatible
|
||||
flag: "",
|
||||
annotationKey: "net.experimental.kubernetes.io/proxy-mode",
|
||||
annotationVal: "iptables",
|
||||
iptablesVersion: iptables.MinCheckVersion,
|
||||
kernelCompat: false,
|
||||
expected: proxyModeUserspace,
|
||||
},
|
||||
{ // annotation says iptables, version ok, kernel is compatible
|
||||
flag: "",
|
||||
annotationKey: "net.experimental.kubernetes.io/proxy-mode",
|
||||
annotationVal: "iptables",
|
||||
iptablesVersion: iptables.MinCheckVersion,
|
||||
kernelCompat: true,
|
||||
expected: proxyModeIPTables,
|
||||
},
|
||||
{ // annotation says something else, version ok
|
||||
flag: "",
|
||||
annotationKey: "net.experimental.kubernetes.io/proxy-mode",
|
||||
annotationVal: "other",
|
||||
iptablesVersion: iptables.MinCheckVersion,
|
||||
kernelCompat: true,
|
||||
expected: proxyModeIPTables,
|
||||
},
|
||||
{ // annotation says nothing, version ok
|
||||
flag: "",
|
||||
annotationKey: "net.experimental.kubernetes.io/proxy-mode",
|
||||
annotationVal: "",
|
||||
iptablesVersion: iptables.MinCheckVersion,
|
||||
kernelCompat: true,
|
||||
expected: proxyModeIPTables,
|
||||
},
|
||||
{ // annotation says userspace
|
||||
flag: "",
|
||||
annotationKey: "net.beta.kubernetes.io/proxy-mode",
|
||||
annotationVal: "userspace",
|
||||
expected: proxyModeUserspace,
|
||||
},
|
||||
{ // annotation says iptables, error detecting
|
||||
flag: "",
|
||||
annotationKey: "net.beta.kubernetes.io/proxy-mode",
|
||||
annotationVal: "iptables",
|
||||
iptablesError: fmt.Errorf("oops!"),
|
||||
expected: proxyModeUserspace,
|
||||
},
|
||||
{ // annotation says iptables, version too low
|
||||
flag: "",
|
||||
annotationKey: "net.beta.kubernetes.io/proxy-mode",
|
||||
annotationVal: "iptables",
|
||||
iptablesVersion: "0.0.0",
|
||||
expected: proxyModeUserspace,
|
||||
},
|
||||
{ // annotation says iptables, version ok, kernel not compatible
|
||||
flag: "",
|
||||
annotationKey: "net.beta.kubernetes.io/proxy-mode",
|
||||
annotationVal: "iptables",
|
||||
iptablesVersion: iptables.MinCheckVersion,
|
||||
kernelCompat: false,
|
||||
expected: proxyModeUserspace,
|
||||
},
|
||||
{ // annotation says iptables, version ok, kernel is compatible
|
||||
flag: "",
|
||||
annotationKey: "net.beta.kubernetes.io/proxy-mode",
|
||||
annotationVal: "iptables",
|
||||
iptablesVersion: iptables.MinCheckVersion,
|
||||
kernelCompat: true,
|
||||
expected: proxyModeIPTables,
|
||||
},
|
||||
{ // annotation says something else, version ok
|
||||
flag: "",
|
||||
annotationKey: "net.beta.kubernetes.io/proxy-mode",
|
||||
annotationVal: "other",
|
||||
iptablesVersion: iptables.MinCheckVersion,
|
||||
kernelCompat: true,
|
||||
expected: proxyModeIPTables,
|
||||
},
|
||||
{ // annotation says nothing, version ok
|
||||
flag: "",
|
||||
annotationKey: "net.beta.kubernetes.io/proxy-mode",
|
||||
annotationVal: "",
|
||||
iptablesVersion: iptables.MinCheckVersion,
|
||||
kernelCompat: true,
|
||||
expected: proxyModeIPTables,
|
||||
},
|
||||
{ // flag says userspace, annotation disagrees
|
||||
flag: "userspace",
|
||||
annotationKey: "net.experimental.kubernetes.io/proxy-mode",
|
||||
annotationVal: "iptables",
|
||||
iptablesVersion: iptables.MinCheckVersion,
|
||||
expected: proxyModeUserspace,
|
||||
},
|
||||
{ // flag says iptables, annotation disagrees
|
||||
flag: "iptables",
|
||||
annotationKey: "net.experimental.kubernetes.io/proxy-mode",
|
||||
annotationVal: "userspace",
|
||||
iptablesVersion: iptables.MinCheckVersion,
|
||||
kernelCompat: true,
|
||||
expected: proxyModeIPTables,
|
||||
},
|
||||
{ // flag says userspace, annotation disagrees
|
||||
flag: "userspace",
|
||||
annotationKey: "net.beta.kubernetes.io/proxy-mode",
|
||||
annotationVal: "iptables",
|
||||
iptablesVersion: iptables.MinCheckVersion,
|
||||
expected: proxyModeUserspace,
|
||||
},
|
||||
{ // flag says iptables, annotation disagrees
|
||||
flag: "iptables",
|
||||
annotationKey: "net.beta.kubernetes.io/proxy-mode",
|
||||
annotationVal: "userspace",
|
||||
iptablesVersion: iptables.MinCheckVersion,
|
||||
kernelCompat: true,
|
||||
expected: proxyModeIPTables,
|
||||
},
|
||||
}
|
||||
for i, c := range cases {
|
||||
getter := &fakeNodeInterface{}
|
||||
|
||||
Reference in New Issue
Block a user