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

Fix whitespace lint #292

Merged
merged 1 commit into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/webhook/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,5 +209,4 @@ func runStartCmd(cmd *cobra.Command, args []string) {
glog.Infof("watcher error: %v", err)
}
}

}
1 change: 0 additions & 1 deletion controllers/sriovnetworknodepolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ func (r *SriovNetworkNodePolicyReconciler) Reconcile(ctx context.Context, req ct
if len(defaultOpConf.Spec.ConfigDaemonNodeSelector) > 0 {
labels := client.MatchingLabels(defaultOpConf.Spec.ConfigDaemonNodeSelector)
lo = &labels

} else {
lo = &client.MatchingLabels{
"node-role.kubernetes.io/worker": "",
Expand Down
2 changes: 0 additions & 2 deletions pkg/apply/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
// This is to be able to do a a meaningful comparison in apply,
// since objects created on runtime do not have these fields populated.
func MergeMetadataForUpdate(current, updated *uns.Unstructured) error {

mergeAnnotations(current, updated)
mergeLabels(current, updated)
updated.SetResourceVersion(current.GetResourceVersion())
Expand Down Expand Up @@ -51,7 +50,6 @@ const (
func MergeDeploymentForUpdate(current, updated *uns.Unstructured) error {
gvk := updated.GroupVersionKind()
if gvk.Group == "apps" && gvk.Kind == "Deployment" {

// Copy over the revision annotation from current up to updated
// otherwise, updated would win, and this annotation is "special" and
// needs to be preserved
Expand Down
1 change: 0 additions & 1 deletion pkg/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,6 @@ func (dn *Daemon) nodeStateSyncHandler(generation int64) error {
done := make(chan bool)
go dn.getDrainLock(ctx, done)
<-done

}

if utils.ClusterType == utils.ClusterTypeOpenshift {
Expand Down
1 change: 0 additions & 1 deletion pkg/plugins/mellanox/mellanox_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ func getOtherPortSpec(pciAddress string) *sriovnetworkv1.Interface {
// handleTotalVfs return required total VFs or max (required VFs for dual port NIC) and needReboot if totalVfs will change
func handleTotalVfs(fwCurrent, fwNext, attrs *mlnxNic, ifaceSpec sriovnetworkv1.Interface, isDualPort bool) (
totalVfs int, needReboot, changeWithoutReboot bool) {

totalVfs = ifaceSpec.NumVfs
// Check if the other port is changing the number of VF
if isDualPort {
Expand Down
1 change: 0 additions & 1 deletion pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ func configSriovDevice(iface *sriovnetworkv1.Interface, ifaceStatus *sriovnetwor
glog.Errorf("configSriovDevice(): VF link is not ready for device %s %q", addr, err)
return err
}

}
if err = setVfAdminMac(addr, pfLink, vfLink); err != nil {
glog.Errorf("configSriovDevice(): fail to configure VF admin mac address for device %s %q", addr, err)
Expand Down
2 changes: 0 additions & 2 deletions pkg/webhook/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,11 @@ func validateSriovNetworkNodePolicy(cr *sriovnetworkv1.SriovNetworkNodePolicy, o
admit, err := staticValidateSriovNetworkNodePolicy(cr)
if err != nil {
return admit, warnings, err

}

admit, err = dynamicValidateSriovNetworkNodePolicy(cr)
if err != nil {
return admit, warnings, err

}

return admit, warnings, nil
Expand Down
1 change: 0 additions & 1 deletion test/conformance/test_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ func TestTest(t *testing.T) {
}
defer f.Close()
rr = append(rr, k8sreporter.New(clients, f))

} else if *dumpOutput {
rr = append(rr, k8sreporter.New(clients, os.Stdout))
}
Expand Down
1 change: 0 additions & 1 deletion test/conformance/tests/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ func init() {
}

clients = testclient.New("")

}
3 changes: 0 additions & 3 deletions test/conformance/tests/sriov_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1787,7 +1787,6 @@ func findSuitableResourceForMain(mainIntf *sriovv1.InterfaceExt, networkState *s
}

return "", false

}

func resourceOnlyForInterface(networkState *sriovv1.SriovNetworkNodeState, resourceName, interfaceName string) bool {
Expand Down Expand Up @@ -1961,7 +1960,6 @@ func daemonsScheduledOnNodes(selector string) bool {
}
}
return true

}

func createSriovPolicy(sriovDevice string, testNode string, numVfs int, resourceName string) {
Expand Down Expand Up @@ -2186,6 +2184,5 @@ func setSriovOperatorSpecFlag(flagName string, flagValue bool) {

return true
}, 1*time.Minute, 10*time.Second).Should(BeTrue())

}
}
1 change: 0 additions & 1 deletion test/util/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ func (n *EnabledNodes) FindOneSriovDevice(node string) (*sriovv1.InterfaceExt, e
}
for _, itf := range s.Status.Interfaces {
if IsPFDriverSupported(itf.Driver) && sriovv1.IsSupportedDevice(itf.DeviceID) {

// Skip mlx interfaces if secure boot is enabled
// TODO: remove this when mlx support secure boot/lockdown mode
if itf.Vendor == mlxVendorID && n.IsSecureBootEnabled[node] {
Expand Down
1 change: 0 additions & 1 deletion test/util/k8sreporter/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func (r *KubernetesReporter) SpecDidComplete(specSummary *types.SpecSummary) {
fmt.Fprintln(r.dumpOutput, "Starting dump for failed spec", specSummary.ComponentTexts)
r.Dump()
fmt.Fprintln(r.dumpOutput, "Finished dump for failed spec")

}

func (r *KubernetesReporter) Dump() {
Expand Down
3 changes: 0 additions & 3 deletions test/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ func WaitForSriovNetworkNodeStateReady(nodeState *sriovnetworkv1.SriovNetworkNod
}

func WaitForDaemonSetReady(ds *appsv1.DaemonSet, client client.Client, namespace, name string, retryInterval, timeout time.Duration) error {

err := wait.PollImmediate(retryInterval, timeout, func() (done bool, err error) {
ctx, cancel := goctx.WithTimeout(goctx.Background(), ApiTimeout)
defer cancel()
Expand All @@ -84,7 +83,6 @@ func WaitForDaemonSetReady(ds *appsv1.DaemonSet, client client.Client, namespace
}

func WaitForNamespacedObject(obj client.Object, client client.Client, namespace, name string, retryInterval, timeout time.Duration) error {

err := wait.PollImmediate(retryInterval, timeout, func() (done bool, err error) {
ctx, cancel := goctx.WithTimeout(goctx.Background(), ApiTimeout)
defer cancel()
Expand All @@ -106,7 +104,6 @@ func WaitForNamespacedObject(obj client.Object, client client.Client, namespace,
}

func WaitForNamespacedObjectDeleted(obj client.Object, client client.Client, namespace, name string, retryInterval, timeout time.Duration) error {

err := wait.PollImmediate(retryInterval, timeout, func() (done bool, err error) {
ctx, cancel := goctx.WithTimeout(goctx.Background(), ApiTimeout)
defer cancel()
Expand Down
1 change: 0 additions & 1 deletion test/validation/test_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ func TestTest(t *testing.T) {
}
defer f.Close()
rr = append(rr, k8sreporter.New(clients, f))

} else if *dumpOutput {
rr = append(rr, k8sreporter.New(clients, os.Stdout))
}
Expand Down