Skip to content

Commit

Permalink
Merge pull request k8snetworkplumbingwg#297 from rollandf/static_spell
Browse files Browse the repository at this point in the history
Fix mispell and staticchek issues
  • Loading branch information
Eoghan Russell authored May 5, 2022
2 parents 5cbf1af + edac74c commit 0c4fb72
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions pkg/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,7 @@ func (dn *Daemon) pauseMCP() error {
return
}
// Always get the latest object
newMcp := &mcfgv1.MachineConfigPool{}
newMcp, err = dn.mcClient.MachineconfigurationV1().MachineConfigPools().Get(ctx, dn.mcpName, metav1.GetOptions{})
newMcp, err := dn.mcClient.MachineconfigurationV1().MachineConfigPools().Get(ctx, dn.mcpName, metav1.GetOptions{})
if err != nil {
glog.V(2).Infof("pauseMCP(): Failed to get MCP %s: %v", dn.mcpName, err)
return
Expand Down
6 changes: 3 additions & 3 deletions test/conformance/tests/sriov_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ var _ = Describe("[sriov] operator", func() {
return daemonsScheduledOnNodes("node-role.kubernetes.io/worker=")
}, 3*time.Minute, 1*time.Second).Should(Equal(true))

By("Labelling one worker node with the label needed for the daemon")
By("Labeling one worker node with the label needed for the daemon")
allNodes, err := clients.Nodes().List(context.Background(), metav1.ListOptions{
LabelSelector: "node-role.kubernetes.io/worker",
})
Expand Down Expand Up @@ -1810,7 +1810,7 @@ func findMainSriovDevice(executorPod *corev1.Pod, sriovDevices []*sriovv1.Interf

for _, device := range sriovDevices {
if isDefaultRouteInterface(device.Name, routes) {
fmt.Println("Choosen ", device.Name, " as it is the default gw")
fmt.Println("Chosen ", device.Name, " as it is the default gw")
return device
}
stdout, _, err = pod.ExecCommand(clients, executorPod, "ip", "link", "show", device.Name)
Expand All @@ -1820,7 +1820,7 @@ func findMainSriovDevice(executorPod *corev1.Pod, sriovDevices []*sriovv1.Interf
continue // The interface is not active
}
if strings.Contains(stdout, "master ovs-system") {
fmt.Println("Choosen ", device.Name, " as it is used by ovs")
fmt.Println("Chosen ", device.Name, " as it is used by ovs")
return device
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/util/pod/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ func RedefineWithMount(pod *corev1.Pod, volume corev1.Volume, mount corev1.Volum
return pod
}

// RedefineWithCommand updates the pod defintion with a different command
// RedefineWithCommand updates the pod definition with a different command
func RedefineWithCommand(pod *corev1.Pod, command []string, args []string) *corev1.Pod {
pod.Spec.Containers[0].Command = command
pod.Spec.Containers[0].Args = args
return pod
}

// RedefineWithRestartPolicy updates the pod defintion with a restart policy
// RedefineWithRestartPolicy updates the pod definition with a restart policy
func RedefineWithRestartPolicy(pod *corev1.Pod, restartPolicy corev1.RestartPolicy) *corev1.Pod {
pod.Spec.RestartPolicy = restartPolicy
return pod
Expand Down

0 comments on commit 0c4fb72

Please sign in to comment.