feat: manage node-level kernel sysctls on the k3s scheduler
Sysctls the kernel does not namespace, such as `vm.max_map_count`, cannot be set from a pod spec and previously had no answer beyond editing `/etc/sysctl.d` on each host by hand. `scheduler-k3s:node-sysctls:set` now applies them through a privileged daemonset, which reaches nodes joined later and reapplies after a reboot. Sysctls may be scoped to a node profile, with a profile scope inheriting the global values and overriding them on conflict so that every node is covered by exactly one daemonset. Clearing a sysctl stops dokku managing it but does not restore the previous value, which persists until the node reboots.
This commit is contained in:
12 files changed
+964
-20
No files matched your search
@@ -62,6 +62,8 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
|
||||
"--scheduler-k3s-global-namespace": reportGlobalNamespace,
|
||||
"--scheduler-k3s-computed-network-interface": reportComputedNetworkInterface,
|
||||
"--scheduler-k3s-global-network-interface": reportGlobalNetworkInterface,
|
||||
"--scheduler-k3s-global-node-sysctls-image": reportGlobalNodeSysctlsImage,
|
||||
"--scheduler-k3s-global-node-sysctls-pause-image": reportGlobalNodeSysctlsPauseImage,
|
||||
"--scheduler-k3s-computed-rollback-on-failure": reportComputedRollbackOnFailure,
|
||||
"--scheduler-k3s-global-rollback-on-failure": reportGlobalRollbackOnFailure,
|
||||
"--scheduler-k3s-computed-shm-size": reportComputedShmSize,
|
||||
@@ -99,6 +101,8 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
|
||||
"--scheduler-k3s-global-namespace": reportGlobalNamespace,
|
||||
"--scheduler-k3s-computed-network-interface": reportComputedNetworkInterface,
|
||||
"--scheduler-k3s-global-network-interface": reportGlobalNetworkInterface,
|
||||
"--scheduler-k3s-global-node-sysctls-image": reportGlobalNodeSysctlsImage,
|
||||
"--scheduler-k3s-global-node-sysctls-pause-image": reportGlobalNodeSysctlsPauseImage,
|
||||
"--scheduler-k3s-computed-rollback-on-failure": reportComputedRollbackOnFailure,
|
||||
"--scheduler-k3s-rollback-on-failure": reportRollbackOnFailure,
|
||||
"--scheduler-k3s-global-rollback-on-failure": reportGlobalRollbackOnFailure,
|
||||
@@ -715,6 +719,14 @@ func reportGlobalNetworkInterface(appName string) string {
|
||||
return getGlobalNetworkInterface()
|
||||
}
|
||||
|
||||
func reportGlobalNodeSysctlsImage(appName string) string {
|
||||
return getComputedNodeSysctlsImage()
|
||||
}
|
||||
|
||||
func reportGlobalNodeSysctlsPauseImage(appName string) string {
|
||||
return getComputedNodeSysctlsPauseImage()
|
||||
}
|
||||
|
||||
func reportComputedRollbackOnFailure(appName string) string {
|
||||
return getComputedRollbackOnFailure(appName)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user