fix: report stored node-sysctls images globally
The `--scheduler-k3s-global-node-sysctls-image` and `--scheduler-k3s-global-node-sysctls-pause-image` report flags returned the built-in default when nothing was stored, so an unset image could not be told apart from one set to the default. They now report the stored value like every other global flag, and new `--scheduler-k3s-computed-node-sysctls-image` and `--scheduler-k3s-computed-node-sysctls-pause-image` flags report the image that is actually used.
This commit is contained in:
4 files changed
+105
-83
No files matched your search
@@ -1646,8 +1646,12 @@ func getComputedKustomizeRootPath(appName string) string {
|
||||
return kustomizeRootPath
|
||||
}
|
||||
|
||||
func getGlobalNodeSysctlsImage() string {
|
||||
return common.PropertyGet("scheduler-k3s", "--global", "node-sysctls-image")
|
||||
}
|
||||
|
||||
func getComputedNodeSysctlsImage() string {
|
||||
image := common.PropertyGet("scheduler-k3s", "--global", "node-sysctls-image")
|
||||
image := getGlobalNodeSysctlsImage()
|
||||
if image == "" {
|
||||
image = DefaultNodeSysctlsImage
|
||||
}
|
||||
@@ -1655,8 +1659,12 @@ func getComputedNodeSysctlsImage() string {
|
||||
return image
|
||||
}
|
||||
|
||||
func getGlobalNodeSysctlsPauseImage() string {
|
||||
return common.PropertyGet("scheduler-k3s", "--global", "node-sysctls-pause-image")
|
||||
}
|
||||
|
||||
func getComputedNodeSysctlsPauseImage() string {
|
||||
image := common.PropertyGet("scheduler-k3s", "--global", "node-sysctls-pause-image")
|
||||
image := getGlobalNodeSysctlsPauseImage()
|
||||
if image == "" {
|
||||
image = DefaultNodeSysctlsPauseImage
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user