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

Use debian-iptables for k8s-dns-node-cache, bump debian-base version #367

Merged
merged 1 commit into from
Oct 29, 2020

Conversation

champtar
Copy link
Contributor

@champtar champtar commented Apr 10, 2020

debian-iptables container transparently select iptables-legacy or iptables-nft since v12.0.0:
kubernetes/kubernetes#82966
This fixes #338

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 10, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @champtar. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 10, 2020
@k8s-ci-robot k8s-ci-robot requested review from bowei and MrHohn April 10, 2020 03:11
@champtar
Copy link
Contributor Author

$ kubectl logs nodelocaldns-6xmhm -n kube-system 
...
2020/04/10 03:15:39 [INFO] Added back nodelocaldns rule - {raw PREROUTING [-p tcp -d 169.254.25.10 --dport 53 -j NOTRACK]}
2020/04/10 03:15:39 [INFO] Added back nodelocaldns rule - {raw PREROUTING [-p udp -d 169.254.25.10 --dport 53 -j NOTRACK]}
...

rules.mk Show resolved Hide resolved
@prameshj
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 10, 2020
@champtar
Copy link
Contributor Author

iptables-legacy is working as expected with this patch, but when using iptables-nft it's adding the 'raw' rules in loop

@champtar
Copy link
Contributor Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 10, 2020
@champtar
Copy link
Contributor Author

@prameshj
Copy link
Contributor

https://bugs.centos.org/view.php?id=17239

Thanks for filing this.. I see you also noted that the issue is happening with debian-buster. So does that mean we cannot use the updated v2.0.0 debian base image either?

@champtar
Copy link
Contributor Author

@prameshj we can update, but iptables-nft will be broken, so I prefer to wait to reintroduce the change. iptables-legacy seems fine.

@prameshj
Copy link
Contributor

@prameshj we can update, but iptables-nft will be broken, so I prefer to wait to reintroduce the change. iptables-legacy seems fine.

ok. Would you mind submitting another PR to upgrade base image to 2.0.0 and no other change? There are some vulnerability fixes that went into the latest base image which would be good to pick up. I can submit one too if needed.

@champtar
Copy link
Contributor Author

In that case we can merge this code explicitly stating that nft support is broken ? (I'll change the commit message). So everything will be tested and the only missing piece will be a version bump for iptables image

@champtar
Copy link
Contributor Author

BTW the iptables bug report: https://bugzilla.netfilter.org/show_bug.cgi?id=1422

@prameshj
Copy link
Contributor

@champtar can you send out another PR, which will use the debian base for node-cache as well? We can merge that PR right away since it is valuable to go to the latest debian base.
The only change left would be to use ARG_FROM_IPT in node-cache Dockerfile. And that can be covered in this PR.

@champtar
Copy link
Contributor Author

@prameshj ok will do that likely today

@champtar
Copy link
Contributor Author

to be rebased on top of #370 when merged

@champtar champtar changed the title Use debian-iptables-$(ARCH):v12.0.1 and debian-base-$(ARCH):v2.0.0 (v2) Use debian-iptables-$(ARCH):v12.0.1 Apr 15, 2020
@champtar
Copy link
Contributor Author

@prameshj I don't think Travis is going to work :(

@luigibk
Copy link
Contributor

luigibk commented Oct 29, 2020

@prameshj @champtar yes

@luigibk can you check that the ebtables change here is sufficient?

Change looks good to me.

@prameshj yes it looks good and works for me

@luigibk
Copy link
Contributor

luigibk commented Oct 29, 2020

@luigibk when deploying node-local-dns you need to change the CNI config to point to the dns to the local IP 169.254.20.10, so why not also add a route ip r add 169.254.25.10 via <nodeip> ?
ebtables definitly works but it's an ugly hack IMO

@champtar No I do NOT need to make any changes to the CNI (Azure in my case) with the ebtables option active. That's all I need and there are for me clear advantages in not having to modify the CNI and being able to control all the setup in a single place.

@luigibk
Copy link
Contributor

luigibk commented Oct 29, 2020

/approve

@champtar
Copy link
Contributor Author

@prameshj Travis is ok now, but it didn't update the PR status

@champtar
Copy link
Contributor Author

@prameshj LGTM ?

@prameshj
Copy link
Contributor

yup.
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 29, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: champtar, luigibk, prameshj

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 4e61de4 into kubernetes:master Oct 29, 2020
@champtar
Copy link
Contributor Author

champtar commented Nov 2, 2020

@prameshj do you already have a date in mind for the next release ?

@champtar champtar deleted the nftables-v2 branch November 2, 2020 18:51
@prameshj
Copy link
Contributor

prameshj commented Nov 4, 2020

I just pushed tag 1.16.0.

@champtar
Copy link
Contributor Author

Hi @prameshj,
Any ETA for the build ?

$ podman pull k8s.gcr.io/dns/k8s-dns-node-cache:1.16.0
Trying to pull k8s.gcr.io/dns/k8s-dns-node-cache:1.16.0...
  manifest unknown: Failed to fetch "1.16.0" from request "/v2/dns/k8s-dns-node-cache/manifests/1.16.0".

@prameshj
Copy link
Contributor

They will be available once kubernetes/k8s.io#1427 merges.

@champtar
Copy link
Contributor Author

Thanks !

champtar added a commit to champtar/kubespray that referenced this pull request Nov 24, 2020
This new version uses the same base image as kube-proxy
(k8s.gcr.io/build-image/debian-iptables)
This allow to automatically pick iptables-legacy or iptables-nft,
and be compatible with RHEL/CentOS 8
kubernetes/dns#367

Signed-off-by: Etienne Champetier <[email protected]>
k8s-ci-robot pushed a commit to kubernetes-sigs/kubespray that referenced this pull request Nov 26, 2020
This new version uses the same base image as kube-proxy
(k8s.gcr.io/build-image/debian-iptables)
This allow to automatically pick iptables-legacy or iptables-nft,
and be compatible with RHEL/CentOS 8
kubernetes/dns#367

Signed-off-by: Etienne Champetier <[email protected]>
champtar added a commit to champtar/kubespray that referenced this pull request Dec 19, 2020
This new version uses the same base image as kube-proxy
(k8s.gcr.io/build-image/debian-iptables)
This allow to automatically pick iptables-legacy or iptables-nft,
and be compatible with RHEL/CentOS 8
kubernetes/dns#367

Signed-off-by: Etienne Champetier <[email protected]>
(cherry picked from commit e909f84)
k8s-ci-robot pushed a commit to kubernetes-sigs/kubespray that referenced this pull request Dec 22, 2020
This new version uses the same base image as kube-proxy
(k8s.gcr.io/build-image/debian-iptables)
This allow to automatically pick iptables-legacy or iptables-nft,
and be compatible with RHEL/CentOS 8
kubernetes/dns#367

Signed-off-by: Etienne Champetier <[email protected]>
(cherry picked from commit e909f84)
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Jan 16, 2021
This new version uses the same base image as kube-proxy
(k8s.gcr.io/build-image/debian-iptables)
This allow to automatically pick iptables-legacy or iptables-nft,
and be compatible with RHEL/CentOS 8
kubernetes/dns#367

Signed-off-by: Etienne Champetier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

k8s-dns-node-cache doesn't support iptables-nft
6 participants