test: Set devices and enable host firewall in kube-proxy CI#11969
test: Set devices and enable host firewall in kube-proxy CI#11969
Conversation
83997e5 to
8f680ac
Compare
|
retest-4.9 https://jenkins.cilium.io/job/Cilium-PR-K8s-newest-kernel-4.9/678/ I also managed to reproduce locally. |
|
I looked a bit into the kube-dns issue. Apparently, in direct routing mode, DNS replies are coming from the wrong address: The query reaches the second node with kube-dns as expected, but then the answer leaves the second node with source IP address |
|
We should either disable masquerading for those tests |
|
One more data point: when we do NOT set |
|
|
5296abc to
5cb4ada
Compare
5cb4ada to
8766e0f
Compare
8766e0f to
05f731a
Compare
1d9bcb4 to
5032bb7
Compare
Previously the devices were only configured when kube-proxy was disabled, for use in BPF-based NodePort. This commit always sets the private and default interfaces, in preparation for the host firewall enablement in kube-proxy CI pipelines. Signed-off-by: Paul Chaignon <paul@cilium.io>
5032bb7 to
284bd18
Compare
|
test-me-please |
There was a problem hiding this comment.
Maybe a small comment explaining why (1) when we run w/ kube-proxy, (2) we disable masquerade for this particular test case.
There was a problem hiding this comment.
@brb TBH, I'm not sure I understand why this change is necessary. It is supposed to work with masquerade enabled, isn't it? Is there an issue opened somewhere to track this?
brb
left a comment
There was a problem hiding this comment.
LGTM, just one suggestion to add a comment.
Otherwise, setting devices results in invalid masquerading rules. Related: #12141 Suggested-by: Martynas Pumputis <m@lambda.lt> Signed-off-by: Paul Chaignon <paul@cilium.io>
For IPSec, we attach bpf_network to the private interface. If we set the devices, we will however attach bpf_host to the private interface. Since we currently cannot have both devices specific and IPSec enabled, unset devices for the IPSec test. Signed-off-by: Paul Chaignon <paul@cilium.io>
Both features cannot be used together currently since they will both try to attach different programs, bpf_host and bpf_network, to the encryption interface. Fixes: f74087e ("daemon: Introduce enable-host-firewall option") Signed-off-by: Paul Chaignon <paul@cilium.io>
The host firewall was previously enabled only in kube-proxy-free CI pipelines. This commit enables it in kube-proxy CI pipelines as well. Signed-off-by: Paul Chaignon <paul@cilium.io>
284bd18 to
c917376
Compare
Without this override we'd get the following in the generated Cilium yaml:
$ diff -C3 good-cilium.yaml cilium-1619730510c46898.yaml
*** good-cilium.yaml 2020-06-17 14:07:44.000000000 -0700
--- cilium-1619730510c46898.yaml 2020-06-17 14:46:51.000000000 -0700
***************
*** 224,229 ****
--- 224,232 ----
install-iptables-rules: "true"
auto-direct-node-routes: "false"
native-routing-cidr: 10.0.0.0/8
+ # List of devices used to attach bpf_host.o (implements BPF NodePort,
+ # host-firewall and BPF masquerading)
+ devices: "eth0 eth0\neth0"
kube-proxy-replacement: "probe"
node-port-mode: "snat"
node-port-bind-protection: "true"
Fixes: #11969
Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
Without this override we'd get the following in the generated Cilium yaml:
$ diff -C3 good-cilium.yaml cilium-1619730510c46898.yaml
*** good-cilium.yaml 2020-06-17 14:07:44.000000000 -0700
--- cilium-1619730510c46898.yaml 2020-06-17 14:46:51.000000000 -0700
***************
*** 224,229 ****
--- 224,232 ----
install-iptables-rules: "true"
auto-direct-node-routes: "false"
native-routing-cidr: 10.0.0.0/8
+ # List of devices used to attach bpf_host.o (implements BPF NodePort,
+ # host-firewall and BPF masquerading)
+ devices: "eth0 eth0\neth0"
kube-proxy-replacement: "probe"
node-port-mode: "snat"
node-port-bind-protection: "true"
Fixes: #11969
Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
Without this override we'd get the following in the generated Cilium yaml:
$ diff -C3 good-cilium.yaml cilium-1619730510c46898.yaml
*** good-cilium.yaml 2020-06-17 14:07:44.000000000 -0700
--- cilium-1619730510c46898.yaml 2020-06-17 14:46:51.000000000 -0700
***************
*** 224,229 ****
--- 224,232 ----
install-iptables-rules: "true"
auto-direct-node-routes: "false"
native-routing-cidr: 10.0.0.0/8
+ # List of devices used to attach bpf_host.o (implements BPF NodePort,
+ # host-firewall and BPF masquerading)
+ devices: "eth0 eth0\neth0"
kube-proxy-replacement: "probe"
node-port-mode: "snat"
node-port-bind-protection: "true"
Fixes: #11969
Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
This pull request sets devices and enables the host firewall in kube-proxy CIs.
See commit messages for details.
Fixes: #11972