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

Use config file values in node-args annotation #3290

Merged
merged 1 commit into from May 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/nodeconfig/nodeconfig.go
Expand Up @@ -9,6 +9,7 @@ import (
"strings"

"github.com/pkg/errors"
"github.com/rancher/k3s/pkg/configfilearg"
"github.com/rancher/k3s/pkg/version"
corev1 "k8s.io/api/core/v1"
)
Expand All @@ -25,7 +26,7 @@ const (

func getNodeArgs() (string, error) {
nodeArgsList := []string{}
for _, arg := range os.Args[1:] {
for _, arg := range configfilearg.MustParse(os.Args[1:]) {
if strings.HasPrefix(arg, "--") && strings.Contains(arg, "=") {
parsedArg := strings.SplitN(arg, "=", 2)
nodeArgsList = append(nodeArgsList, parsedArg...)
Expand Down