Skip to content

Commit

Permalink
Merge pull request #154 from k8s-infra-cherrypick-robot/cherry-pick-1…
Browse files Browse the repository at this point in the history
…51-to-release-0.4

[release-0.4] controller: fix nfd-master cmdline args
  • Loading branch information
k8s-ci-robot authored May 9, 2022
2 parents 2dfb1f2 + a0cc27e commit f8bb761
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions controllers/nodefeaturediscovery_controls.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,19 +467,19 @@ func Deployment(n NFD) (ResourceStatus, error) {
// expected that n.ins.Spec.Instance will return ""
// https://kubernetes-sigs.github.io/node-feature-discovery/v0.8/advanced/master-commandline-reference.html#-instance
if n.ins.Spec.Instance != "" {
args = append(args, fmt.Sprintf("--instance=%q", n.ins.Spec.Instance))
args = append(args, fmt.Sprintf("--instance=%s", n.ins.Spec.Instance))
}

if len(n.ins.Spec.ExtraLabelNs) != 0 {
args = append(args, fmt.Sprintf("--extra-label-ns=%q", strings.Join(n.ins.Spec.ExtraLabelNs, ",")))
args = append(args, fmt.Sprintf("--extra-label-ns=%s", strings.Join(n.ins.Spec.ExtraLabelNs, ",")))
}

if len(n.ins.Spec.ResourceLabels) != 0 {
args = append(args, fmt.Sprintf("--resource-labels=%q", strings.Join(n.ins.Spec.ResourceLabels, ",")))
args = append(args, fmt.Sprintf("--resource-labels=%s", strings.Join(n.ins.Spec.ResourceLabels, ",")))
}

if strings.TrimSpace(n.ins.Spec.LabelWhiteList) != "" {
args = append(args, fmt.Sprintf("--label-whitelist=%q", n.ins.Spec.LabelWhiteList))
args = append(args, fmt.Sprintf("--label-whitelist=%s", n.ins.Spec.LabelWhiteList))
}

obj.Spec.Template.Spec.Containers[0].Args = args
Expand Down

0 comments on commit f8bb761

Please sign in to comment.