Skip to content

Commit

Permalink
test: Do not set devices in DatapathConfiguration BPF masq tests
Browse files Browse the repository at this point in the history
As we enabled the BPF masq by default, the correct devices (default and
private) are already set by DeployCilium().

Signed-off-by: Martynas Pumputis <m@lambda.lt>
  • Loading branch information
brb committed May 12, 2020
1 parent de340f5 commit 4a384a1
Showing 1 changed file with 10 additions and 25 deletions.
35 changes: 10 additions & 25 deletions test/k8sT/DatapathConfiguration.go
Expand Up @@ -34,20 +34,13 @@ import (
var _ = Describe("K8sDatapathConfig", func() {

var (
kubectl *helpers.Kubectl
monitorLog = "monitor-aggregation.log"
privateIface string
defaultIface string
err error
kubectl *helpers.Kubectl
monitorLog = "monitor-aggregation.log"
)

BeforeAll(func() {
kubectl = helpers.CreateKubectl(helpers.K8s1VMName(), logger)
deploymentManager.SetKubectl(kubectl)
privateIface, err = kubectl.GetPrivateIface()
Expect(err).Should(BeNil(), "Cannot determine private iface")
defaultIface, err = kubectl.GetDefaultIface()
Expect(err).Should(BeNil(), "Cannot determine default iface")
})

BeforeEach(func() {
Expand Down Expand Up @@ -272,9 +265,8 @@ var _ = Describe("K8sDatapathConfig", func() {

SkipItIf(helpers.DoesNotRunOnNetNextOr419Kernel, "Check BPF masquerading", func() {
deploymentManager.DeployCilium(map[string]string{
"global.bpfMasquerade": "true",
"global.nodePort.device": fmt.Sprintf(`'{%s,%s}'`, privateIface, defaultIface),
"global.tunnel": "vxlan",
"global.tunnel": "vxlan",
"global.bpfMasquerade": "true",
}, DeployCiliumOptionsAndDNS)

Expect(testPodConnectivityAcrossNodes(kubectl)).Should(BeTrue(), "Connectivity test between nodes failed")
Expand Down Expand Up @@ -329,10 +321,9 @@ var _ = Describe("K8sDatapathConfig", func() {

SkipItIf(helpers.DoesNotRunOnNetNextOr419Kernel, "Check BPF masquerading", func() {
deploymentManager.DeployCilium(map[string]string{
"global.bpfMasquerade": "true",
"global.nodePort.device": fmt.Sprintf(`'{%s,%s}'`, privateIface, defaultIface),
"global.tunnel": "disabled",
"global.autoDirectNodeRoutes": "true",
"global.bpfMasquerade": "true",
}, DeployCiliumOptionsAndDNS)

Expect(testPodConnectivityAcrossNodes(kubectl)).Should(BeTrue(), "Connectivity test between nodes failed")
Expand Down Expand Up @@ -454,24 +445,18 @@ var _ = Describe("K8sDatapathConfig", func() {

It("DirectRouting", func() {
deploymentManager.DeployCilium(map[string]string{
"global.nodePort.device": fmt.Sprintf(`'{%s,%s}'`, privateIface, defaultIface),
"global.bpfMasquerade": "true",
"global.ipMasqAgent.enabled": "true",
"global.ipMasqAgent.syncPeriod": "1s",
"global.tunnel": "disabled",
"global.autoDirectNodeRoutes": "true",
"global.ipMasqAgent.enabled": "true",
"global.tunnel": "disabled",
"global.autoDirectNodeRoutes": "true",
}, DeployCiliumOptionsAndDNS)

testIPMasqAgent()
})

It("VXLAN", func() {
deploymentManager.DeployCilium(map[string]string{
"global.nodePort.device": fmt.Sprintf(`'{%s,%s}'`, privateIface, defaultIface),
"global.bpfMasquerade": "true",
"global.ipMasqAgent.enabled": "true",
"global.ipMasqAgent.syncPeriod": "1s",
"global.tunnel": "vxlan",
"global.ipMasqAgent.enabled": "true",
"global.tunnel": "vxlan",
}, DeployCiliumOptionsAndDNS)

testIPMasqAgent()
Expand Down

0 comments on commit 4a384a1

Please sign in to comment.