Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add HostPort conformance to upstream-k8s #17048

Merged
merged 2 commits into from Aug 4, 2021

Conversation

joestringer
Copy link
Member

@joestringer joestringer commented Aug 4, 2021

Add HostPort Conformance test to the upstream-k8s testing so that we get
coverage for this test in CI.

Related: #14287

@joestringer joestringer requested a review from a team as a code owner August 4, 2021 01:16
@joestringer joestringer added the release-note/misc This PR makes changes that have no direct user impact. label Aug 4, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Aug 4, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Aug 4, 2021
@joestringer joestringer marked this pull request as draft August 4, 2021 01:16
@joestringer
Copy link
Member Author

test-upstream-k8s

@joestringer
Copy link
Member Author

joestringer commented Aug 4, 2021

Seems to be successfully failing 😁

https://jenkins.cilium.io/job/Cilium-PR-K8s-Upstream/3268/execution/node/73/log/

18:32:18  • Failure [37.540 seconds]
18:32:18  [sig-network] HostPort
18:32:18  /home/vagrant/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/network/common/framework.go:23
18:32:18    validates that there is no conflict between pods with same hostPort but different hostIP and protocol [LinuxOnly] [Conformance] [It]
18:32:18    /home/vagrant/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:630
18:32:18  
18:32:18    Aug  4 01:32:17.407: Failed to connect to exposed host ports
18:32:18  
18:32:18    /home/vagrant/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/onsi/ginkgo/internal/leafnodes/runner.go:113

Portmap chaining is how hostport is supported when kubeProxyReplacement
is disabled or not available. Enable this by default to unblock the
conformance tests.

Signed-off-by: Joe Stringer <joe@cilium.io>
Now that we enable portmap chaining by default in the upstream-k8s
conformance testing script, we can enable the hostport tests.

In future we can also support this test with kube-proxy-replacement but
that requires solving a couple of additional bugs first, see issue 14287.

Signed-off-by: Joe Stringer <joe@cilium.io>
@joestringer
Copy link
Member Author

test-upstream-k8s

@christarazi christarazi added area/CI Continuous Integration testing issue or flake area/CI-improvement Topic or proposal to improve the Continuous Integration workflow kind/enhancement This would improve or streamline existing functionality. sig/k8s Impacts the kubernetes API, or kubernetes -> cilium internals translation layers. labels Aug 4, 2021
@joestringer joestringer added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Aug 4, 2021
@joestringer
Copy link
Member Author

This only modifies a script used in the test-upstream-k8s job, which I ran and it passes. Good to merge.

@aanm aanm merged commit 9aad1d5 into cilium:master Aug 4, 2021
@joestringer joestringer deleted the submit/hostport-conformance branch August 9, 2021 20:55
hswong3i added a commit to alvistack/ansible-role-kube_cilium that referenced this pull request Aug 13, 2022
    helm template cilium cilium/cilium \
        --version 1.12.0 \
        --namespace kube-system \
        --set bpf.preallocateMaps=false \
        --set cluster.id=0 \
        --set cluster.name=4e8b0505-4c52-57ab-a7f4-481e7ed3a2e3 \
        --set cni.binPath=/usr/libexec/cni \
        --set cni.chainingMode=portmap \
        --set cni.exclusive=true \
        --set enableIPv4Masquerade=true  \
        --set enableIPv6Masquerade=false \
        --set externalIPs.enabled=true \
        --set hostPort.enabled=true \
        --set hostServices.enabled=true \
        --set hubble.enabled=false \
        --set ipam.mode=cluster-pool \
        --set ipam.operator.clusterPoolIPv4MaskSize=24 \
        --set ipam.operator.clusterPoolIPv4PodCIDRList=10.233.64.0/18 \
        --set ipv4.enabled=true \
        --set ipv6.enabled=false \
        --set kubeProxyReplacement=partial \
        --set nodePort.enabled=true \
        --set nodeinit.enabled=true \
        --set nodeinit.securityContext.privileged=true \
        --set operator.replicas=1 \
        --set operator.securityContext.privileged=true \
        --set securityContext.privileged=true \
        --set sessionAffinity=true \
        --set tunnel=vxlan \
        | yq . > templates/etc/kubernetes/addons/60-cilium.yml.j2

See cncf/k8s-conformance#2093

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake area/CI-improvement Topic or proposal to improve the Continuous Integration workflow kind/enhancement This would improve or streamline existing functionality. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact. sig/k8s Impacts the kubernetes API, or kubernetes -> cilium internals translation layers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants