-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CPDEV-50513] Add nf_conntrack_max and NetworkManager config recommen…
…ded for calico (#546) * Add nf_conntrack_max and NetworkManager config recommended for calico * add set_sysctl_variables patch * add set_sysctl_variables patch --------- Co-authored-by: oshift_cluster <[email protected]>
- Loading branch information
Showing
4 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from textwrap import dedent | ||
|
||
from kubemarine.core.action import Action | ||
from kubemarine.core.patch import RegularPatch | ||
from kubemarine.core.resources import DynamicResources | ||
from kubemarine import sysctl | ||
|
||
class TheAction(Action): | ||
def __init__(self) -> None: | ||
super().__init__("Set sysctl variables") | ||
|
||
def run(self, res: DynamicResources) -> None: | ||
cluster = res.cluster() | ||
|
||
node_group = cluster.make_group_from_roles(['all']) | ||
node_group.call(sysctl.configure) | ||
node_group.call(sysctl.reload) | ||
|
||
|
||
class SetSysctlVariables(RegularPatch): | ||
def __init__(self) -> None: | ||
super().__init__("set_sysctl_variables") | ||
|
||
@property | ||
def action(self) -> Action: | ||
return TheAction() | ||
|
||
@property | ||
def description(self) -> str: | ||
return dedent( | ||
f"""\ | ||
This patch sets kernel variables with sysctl at the control-plane, worker nodes according to the new defaults. | ||
""".rstrip() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters