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

Add configurability to Netavark firewall driver #1750

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

cgiradkar
Copy link
Contributor

closes #1338

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also have to add this new field to docs/containers.conf.5.md to documented it in the man page.

pkg/config/default.go Outdated Show resolved Hide resolved
libnetwork/netavark/network.go Outdated Show resolved Hide resolved
libnetwork/netavark/network.go Outdated Show resolved Hide resolved
pkg/config/config.go Outdated Show resolved Hide resolved
pkg/config/config.go Outdated Show resolved Hide resolved
@cgiradkar cgiradkar force-pushed the 1338-Firewall branch 3 times, most recently from b8e08af to 8bceee8 Compare November 27, 2023 13:01
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still have to document the field under docs/containers.conf.5.md

Comment on lines 343 to 344
# The default firewall driver to be used
# firewall_driver = "iptables"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# The default firewall driver to be used
# firewall_driver = "iptables"
# The firewall driver to be used by netavark.
# The default is empty which means netavark will pick one accordingly. Current supported
# drivers are "iptables", "none" (no firewall rules will be created) and "firewalld" (firewalld is
# experimental at the moment and not recommend outside of testing). In the future we are
# planning to add support for a "nftables" driver.
#firewall_driver = ""

As text for the documentation. @mheon WDYT?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should mention that the default is iptables - maybe "Netavark will use the default (iptables)" instead of "netavark will pick one accordingly"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was thinking about it but then I remembered that we do not really control what nv version is on the system and if we decide to flip the default to nftables once it is ready I would assume that we forget to update the page here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. We might also add some sort of autodetection for systems without iptables but with nft at some point as well, which would affect the default.

pkg/config/testdata/containers_default.conf Outdated Show resolved Hide resolved
@rhatdan
Copy link
Member

rhatdan commented Nov 29, 2023

@cgiradkar is this still a draft?

@cgiradkar cgiradkar marked this pull request as ready for review November 29, 2023 11:13
@rhatdan
Copy link
Member

rhatdan commented Nov 29, 2023

@mheon @Luap99 PTAL

@mheon
Copy link
Member

mheon commented Nov 29, 2023

LGTM

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link
Contributor

openshift-ci bot commented Nov 29, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgiradkar, Luap99

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

@openshift-merge-bot openshift-merge-bot bot merged commit 26351c9 into containers:main Nov 29, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: allow forced netavark firewall driver
4 participants