-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Remove usage of global options from iptables cell #29088
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
Remove usage of global options from iptables cell #29088
Conversation
a8ae5e9
to
aed37fb
Compare
aed37fb
to
52e7575
Compare
/test |
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.
changes look fairly straight-forward, but looks like there's quite a few tests failing
52e7575
to
442d43f
Compare
Missed the copy of the cell config in |
/test |
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.
Re-ran failing clustermesh test
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.
Hey @pippolo84, would you be able to link to some documentation (or code) that indicates that the env var alias would be preserved?
Alternatively, can you provide some interactive output when running the agent which shows that it is used with the new implementation?
Turned out that I was wrong. The alias is there for a reason.
While, moving the option to be part of the iptables cell config, the hive package binds the env var here: Line 136 in 32fbb7f
and it builds the env var name to bind to from the option name, so Anyway, I've discussed it offline with @aanm and setting this option through the fallback env var can be deprecated. I'll add a warning at the start of the cell and a line in the update notes. |
442d43f
to
e312678
Compare
fc27e64
to
b89d746
Compare
/test |
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.
Small nit on the upgrade notes, but otherwise LGTM.
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.
aside from the open conversation, LGTM!
b89d746
to
3150137
Compare
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.
Looks good for docs, thanks!
Sounds good to me, and thanks for the link |
3150137
to
3e25d62
Compare
/test |
@ldelossa gentle ping 🙏 |
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.
Sorry for delay, LGTM :)
3e25d62
to
55e9665
Compare
Copy the cell specific config parameters passed through dependency injection into the manager struct. Fixes: a6a2b73 ("iptables: Add a cell for iptables config manager") Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
Since iptables manager has been modularized, it should not depend directly on the global daemon config. Instead, it should read the configuration from its cell. Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
prepend-iptables-chains is used to enable prepending iptables chains instead of appending, and it is relevant only for the iptables manager. Since the iptables manager has been modularized, let's move this into the cell "private" config. The option used to have an env var alias named `CILIUM_PREPEND_IPTABLES_CHAIN`, for backward compatibility reason. The alias has been deprecated and a warning will be printed in case that env var will be found not empty at iptables cell startup. Besides, the env var deprecation has been described in the v1.15 upgrade notes. Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
iptables manager has been modularized into a cell, so the tests should config it through the fields in the manager struct itself, not through the global config options. Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
55e9665
to
6610b5c
Compare
/test |
Remove usage of
option.Config
in iptables cell. These are just leftover after the cell has been modularized.The option
prepend-iptables-chains
used to have an env var alias namedCILIUM_PREPEND_IPTABLES_CHAIN
. It was there to ensure backward compatibility.But the alias is exactly the same string as the usual name for the option (prefix is "CILIUM_" and option name is "PREPEND_IPTABLES_CHAIN"). In other words, there was actually no alias.Thus it is safe to move the option in the cell.Config(), even if hive package does not support additional aliasies for the same config option.
CILIUM_PREPEND_IPTABLES_CHAIN
alias has been deprecated with a warning and a note in the v1.15 Upgrade Notes. Read this comment for more info.Depends on: #28746