Skip to content

Commit

Permalink
gh/workflows: Enable v6 masquerading with KPR=off in ci-dp
Browse files Browse the repository at this point in the history
More test coverage.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
  • Loading branch information
brb authored and pchaigno committed Apr 28, 2023
1 parent 8014d8b commit 6f2a05b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/conformance-datapath.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,7 @@ jobs:
--rollback=false \
--config monitor-aggregation=none \
--nodes-without-cilium=kind-worker3 \
--helm-set-string=kubeProxyReplacement=${{ matrix.kpr }} \
--helm-set=bpf.masquerade=true \
--helm-set=enableIPv6Masquerade=false"
--helm-set-string=kubeProxyReplacement=${{ matrix.kpr }}"
TUNNEL="--helm-set-string=tunnelProtocol=${{ matrix.tunnel }}"
if [ "${{ matrix.tunnel }}" == "disabled" ]; then
TUNNEL="--helm-set-string=routingMode=native --helm-set-string=autoDirectNodeRoutes=true --helm-set-string=ipv4NativeRoutingCIDR=10.244.0.0/16"
Expand All @@ -362,6 +360,12 @@ jobs:
if [ "${{ matrix.ipv6 }}" != "false" ]; then
IPV6="--helm-set=ipv6.enabled=true"
fi
MASQ=""
if [ "${{ matrix.kpr }}" == "strict" ]; then
# BPF-masq requires KPR=strict.
# Disable IPv6 until https://github.com/cilium/cilium/issues/14350 has been resolved
MASQ="--helm-set=bpf.masquerade=true --helm-set=enableIPv6Masquerade=false"
fi
EGRESS_GATEWAY=""
if [ "${{ matrix.egress-gateway }}" == "true" ]; then
EGRESS_GATEWAY="--helm-set=egressGateway.enabled=true"
Expand All @@ -384,7 +388,7 @@ jobs:
HOST_FW="--helm-set=hostFirewall.enabled=true"
fi
CONFIG="${CILIUM_INSTALL_DEFAULTS} ${TUNNEL} ${LB_MODE} ${ENDPOINT_ROUTES} ${IPV6} ${EGRESS_GATEWAY} ${ENCRYPT} ${HOST_FW} ${LB_ACCELERATION}"
CONFIG="${CILIUM_INSTALL_DEFAULTS} ${TUNNEL} ${LB_MODE} ${ENDPOINT_ROUTES} ${IPV6} ${MASQ} ${EGRESS_GATEWAY} ${ENCRYPT} ${HOST_FW} ${LB_ACCELERATION}"
echo "cilium_install_defaults=${CONFIG}" >> $GITHUB_OUTPUT
- name: Checkout pull request for Helm chart
Expand Down
17 changes: 0 additions & 17 deletions test/k8s/datapath_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,23 +168,6 @@ var _ = Describe("K8sDatapathConfig", func() {
Expect(testPodHTTPToOutside(kubectl, "http://google.com", false, false, true)).
Should(BeTrue(), "IPv6 connectivity test to http://google.com failed")
})

// TODO(brb) Enable IPv6 masq in ci-datapath, and then drop this test case
It("Check iptables masquerading without random-fully", func() {
options := map[string]string{
"bpf.masquerade": "false",
"enableIPv6Masquerade": "true",
}
enableVXLANTunneling(options)
deploymentManager.DeployCilium(options, DeployCiliumOptionsAndDNS)
Expect(testPodConnectivityAcrossNodes(kubectl)).Should(BeTrue(), "Connectivity test between nodes failed")

By("Test iptables masquerading")
Expect(testPodHTTPToOutside(kubectl, "http://google.com", false, false, false)).
Should(BeTrue(), "IPv4 connectivity test to http://google.com failed")
Expect(testPodHTTPToOutside(kubectl, "http://google.com", false, false, true)).
Should(BeTrue(), "IPv6 connectivity test to http://google.com failed")
})
})

SkipContextIf(func() bool {
Expand Down

0 comments on commit 6f2a05b

Please sign in to comment.