Skip to content

Commit

Permalink
Use config file values in node-args annotation
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
  • Loading branch information
brandond committed May 10, 2021
1 parent e998cd1 commit fc037e8
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit fc037e8

Please sign in to comment.