-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Check for running firewall and warn in installer #12847
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
base: master
Are you sure you want to change the base?
Check for running firewall and warn in installer #12847
Conversation
Signed-off-by: Will Stephenson <[email protected]>
CI is breaking on the installer checksum check; I haven't found where I can update that checksum. |
Thanks, was overthinking it that the checksums would have to be stored externally to the repo somewhere. |
Signed-off-by: Will Stephenson <[email protected]>
bc57847
to
fa315a1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #12847 +/- ##
===========================================
- Coverage 40.57% 20.44% -20.14%
===========================================
Files 185 182 -3
Lines 18931 18863 -68
===========================================
- Hits 7681 3856 -3825
- Misses 10069 14571 +4502
+ Partials 1181 436 -745
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Failed in "startup tests when a server with kine-tls is created [It] has the default pods deployed" connecting to the cluster. Is this test flickering? Can I re-trigger it? It doesn't look related to my changes. |
Proposed Changes
What
Warn user during install if a running firewall is detected.
Why
K3s changes iptables rules itself, so it's not desirable to have a firewall managing them at the same time. If a firewall is running, additional rules are necessary so that K3s internal routing works.
This is documented at https://docs.k3s.io/installation/requirements, but if a firewall is active these rules are not added, routing between pods and services will fail in an opaque way.
This change adds a check at install time for enabled
firewalld
andufw
, and warns with a link to the above docs, so that users who (like me) fail to read the docs or are only following the Quickstart guide are not confounded.Types of Changes
Verification
sudo systemctl enable firewalld
and run installer, check for new warningsudo ufw enable
and run installer, check for new warningTesting
Tested manually on both openSUSE and Ubuntu 24.04. I looked into adding tests to the Vagrant based automated tests, but these currently lack infrastructure for testing the behaviour of the installer script.
Linked Issues
User-Facing Change
Further Comments