-
-
Notifications
You must be signed in to change notification settings - Fork 274
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
fix network bridge modules and sysctl #103
Conversation
if this looks good to you I can create another PR with sqashed commits. |
This could also be part of the containerd-role, like it is described here: https://kubernetes.io/docs/setup/production-environment/container-runtimes/#containerd . What do you think? |
@rdxmb @geerlingguy what about this PR tested it on Ubuntu 21.04 Server on a raspberry Pi and can confirm it works |
@@ -8,14 +8,40 @@ | |||
or ansible_distribution_major_version | int < 10 | |||
|
|||
# See: https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#letting-iptables-see-bridged-traffic | |||
- name: Let iptables see bridged traffic. | |||
sysctl: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there some reason the sysctl
module can't be used for these modifications (and lineinfile
used instead)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not remember exactly.
I've just complied with https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#letting-iptables-see-bridged-traffic .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is immediately applied, but will only last 'till the next boot, so it is not a permanent change.
to make sysctl changes permanently write token = value
formatted file into below dirs.
FILES
/run/sysctl.d/*.conf
/etc/sysctl.d/*.conf
/usr/local/lib/sysctl.d/*.conf
/usr/lib/sysctl.d/*.conf
/lib/sysctl.d/*.conf
/etc/sysctl.conf
The paths where sysctl preload files usually exist. See also sysctl option --system.
I apply the patch mannually, works for me. |
This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution! Please read this blog post to see the reasons why I mark pull requests as stale. |
/no-stale-please |
This issue is no longer marked for closure. |
See the original issue or https://stackoverflow.com/a/63692277 where @geerlingguy answered the question already on stackoverflow. Validated today with Ubuntu LTS 20.04 on a RPI 4 Edit the net.ipv4.ip_forward = 1 is still required. So my pre tasks currently look: - name: Ensure br_netfilter is enabled.
modprobe:
name: br_netfilter
state: present
become: true
- name: Let iptables see bridged traffic.
sysctl:
name: net.ipv4.ip_forward
value: '1'
state: present
become: true I would suggest to include these tasks into the module. Whats your opinion on that @geerlingguy @rdxmb |
If this works, this sounds good. This way a later change / cleanup can be done through ansible by deleting this file. |
Sounds valid no objections there. Will you rewrite your PR or should I create a new one! |
feel free to create a new one. Rewrite is bad because of missing squash. Thanks. |
This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution! Please read this blog post to see the reasons why I mark pull requests as stale. |
no-stale @gleichda will you continue with your pr? |
This issue is no longer marked for closure. |
@rdxmb unfortunately not at the moment due to missing time. But as soon as I find some spare time I will. |
This issue is no longer marked for closure. |
This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution! Please read this blog post to see the reasons why I mark pull requests as stale. |
This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details. |
fix #92