Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
  • Loading branch information
jacobweinstock committed Sep 22, 2023
1 parent d983d3a commit e03b7fa
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 18 deletions.
2 changes: 1 addition & 1 deletion internal/test/envtest/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"strings"
"testing"

rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
eksdv1alpha1 "github.com/aws/eks-distro-build-tooling/release/api/v1alpha1"
etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1"
tinkerbellv1 "github.com/tinkerbell/cluster-api-provider-tinkerbell/api/v1beta1"
Expand All @@ -35,6 +34,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager"

anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
snowv1 "github.com/aws/eks-anywhere/pkg/providers/snow/api/v1beta1"
releasev1 "github.com/aws/eks-anywhere/release/api/v1alpha1"
)
Expand Down
2 changes: 1 addition & 1 deletion manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"flag"
"os"

rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
eksdv1alpha1 "github.com/aws/eks-distro-build-tooling/release/api/v1alpha1"
etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1"
"github.com/go-logr/logr"
Expand Down Expand Up @@ -33,6 +32,7 @@ import (

"github.com/aws/eks-anywhere/controllers"
anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
"github.com/aws/eks-anywhere/pkg/clusterapi"
"github.com/aws/eks-anywhere/pkg/controller/clientutil"
"github.com/aws/eks-anywhere/pkg/features"
Expand Down
16 changes: 12 additions & 4 deletions pkg/api/v1alpha1/thirdparty/tinkerbell/rufio/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@ var (
type PowerState string

const (
On PowerState = "on"
Off PowerState = "off"
// On represents that a Machine is powered on.
On PowerState = "on"
// Off represents that a Machine is powered off.
Off PowerState = "off"
// Unknown represents that a Machine's power state is unknown.
Unknown PowerState = "unknown"
PXE string = "pxe"
// PXE is the boot device name for PXE booting a machine.
PXE string = "pxe"
)

// MachineConditionType represents the condition of the Machine.
Expand All @@ -59,7 +63,9 @@ const (
type ConditionStatus string

const (
ConditionTrue ConditionStatus = "True"
// ConditionTrue represents that a Machine is contactable.
ConditionTrue ConditionStatus = "True"
// ConditionFalse represents that a Machine is not contactable.
ConditionFalse ConditionStatus = "False"
)

Expand All @@ -69,6 +75,7 @@ type MachineSpec struct {
Connection Connection `json:"connection"`
}

// ProviderOptions contains all the provider specific options.
type ProviderOptions struct {
// IntelAMT contains the options to customize the IntelAMT provider.
// +optional
Expand Down Expand Up @@ -140,6 +147,7 @@ type MachineCondition struct {
Message string `json:"message,omitempty"`
}

// MachineSetConditionOption is a function that manipulates a MachineCondition.
// +kubebuilder:object:generate=false
type MachineSetConditionOption func(*MachineCondition)

Expand Down
2 changes: 1 addition & 1 deletion pkg/executables/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
eksdv1alpha1 "github.com/aws/eks-distro-build-tooling/release/api/v1alpha1"
etcdv1 "github.com/aws/etcdadm-controller/api/v1beta1"
"github.com/pkg/errors"
rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
tinkv1alpha1 "github.com/tinkerbell/tink/pkg/apis/core/v1alpha1"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand All @@ -36,6 +35,7 @@ import (

packagesv1 "github.com/aws/eks-anywhere-packages/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
"github.com/aws/eks-anywhere/pkg/clients/kubernetes"
"github.com/aws/eks-anywhere/pkg/constants"
"github.com/aws/eks-anywhere/pkg/filewriter"
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/tinkerbell/hardware/catalogue.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"io"
"os"

rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
tinkv1alpha1 "github.com/tinkerbell/tink/pkg/apis/core/v1alpha1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
yamlutil "k8s.io/apimachinery/pkg/util/yaml"
"sigs.k8s.io/yaml"

eksav1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
"github.com/aws/eks-anywhere/pkg/templater"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/tinkerbell/hardware/catalogue_bmc.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package hardware

import (
v1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"

v1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
"github.com/aws/eks-anywhere/pkg/constants"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/tinkerbell/hardware/catalogue_bmc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"testing"

"github.com/onsi/gomega"
v1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

v1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
"github.com/aws/eks-anywhere/pkg/providers/tinkerbell/hardware"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/tinkerbell/hardware/kubereader.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"context"
"fmt"

rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
tinkv1alpha1 "github.com/tinkerbell/tink/pkg/apis/core/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client"

rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
"github.com/aws/eks-anywhere/pkg/constants"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/tinkerbell/hardware/kubereader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"testing"

. "github.com/onsi/gomega"
rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
tinkv1alpha1 "github.com/tinkerbell/tink/pkg/apis/core/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/controller-runtime/pkg/client/fake"

rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
"github.com/aws/eks-anywhere/pkg/constants"
"github.com/aws/eks-anywhere/pkg/providers/tinkerbell/hardware"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/tinkerbell/hardware/yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"testing"

"github.com/onsi/gomega"
rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
tinkv1alpha1 "github.com/tinkerbell/tink/pkg/apis/core/v1alpha1"
corev1 "k8s.io/api/core/v1"
apimachineryyaml "k8s.io/apimachinery/pkg/util/yaml"
"sigs.k8s.io/yaml"

rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
"github.com/aws/eks-anywhere/pkg/providers/tinkerbell/hardware"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/tinkerbell/reconciler/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import (
"github.com/go-logr/logr"
"github.com/pkg/errors"
tinkerbellv1 "github.com/tinkerbell/cluster-api-provider-tinkerbell/api/v1beta1"
rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/types"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
"sigs.k8s.io/controller-runtime/pkg/client"

anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
c "github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/clusterapi"
"github.com/aws/eks-anywhere/pkg/constants"
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/tinkerbell/reconciler/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"github.com/golang/mock/gomock"
. "github.com/onsi/gomega"
tinkerbellv1 "github.com/tinkerbell/cluster-api-provider-tinkerbell/api/v1beta1"
rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
tinkv1alpha1 "github.com/tinkerbell/tink/pkg/apis/core/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -23,6 +22,7 @@ import (
"github.com/aws/eks-anywhere/internal/test"
"github.com/aws/eks-anywhere/internal/test/envtest"
anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
rufiov1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
clusterspec "github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/clusterapi"
"github.com/aws/eks-anywhere/pkg/constants"
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/tinkerbell/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"fmt"
"reflect"

rufiov1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
tinkv1alpha1 "github.com/tinkerbell/tink/pkg/apis/core/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kerrors "k8s.io/apimachinery/pkg/util/errors"

"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
rufiov1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/collection"
"github.com/aws/eks-anywhere/pkg/constants"
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/tinkerbell/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"testing"

"github.com/golang/mock/gomock"
rufiov1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
tinkv1 "github.com/tinkerbell/tink/pkg/apis/core/v1alpha1"
tinkv1alpha1 "github.com/tinkerbell/tink/pkg/apis/core/v1alpha1"
corev1 "k8s.io/api/core/v1"
Expand All @@ -17,6 +16,7 @@ import (

"github.com/aws/eks-anywhere/internal/test"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
rufiov1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/constants"
"github.com/aws/eks-anywhere/pkg/filewriter"
Expand Down
2 changes: 1 addition & 1 deletion test/framework/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"testing"
"time"

rapi "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
rctrl "github.com/tinkerbell/rufio/controllers"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
Expand All @@ -31,6 +30,7 @@ import (
packagesv1 "github.com/aws/eks-anywhere-packages/api/v1alpha1"
"github.com/aws/eks-anywhere/internal/pkg/api"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
rapi "github.com/aws/eks-anywhere/pkg/api/v1alpha1/thirdparty/tinkerbell/rufio"
"github.com/aws/eks-anywhere/pkg/clients/kubernetes"
"github.com/aws/eks-anywhere/pkg/cluster"
"github.com/aws/eks-anywhere/pkg/constants"
Expand Down

0 comments on commit e03b7fa

Please sign in to comment.