Skip to content

Commit

Permalink
✨ Fix vendoring and lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wikoion committed Jun 13, 2024
1 parent ff0507e commit 27ea695
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 8 deletions.
3 changes: 1 addition & 2 deletions cmd/clusterctl/client/alpha/controlplane.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func resourceHasRolloutAfter(proxy cluster.Proxy, ref corev1.ObjectReference) (b
return false, err
}

//Fetch the OpenAPI schema
// Fetch the OpenAPI schema
openAPISchema, err := discoveryClient.OpenAPISchema()
if err != nil {
return false, err
Expand All @@ -174,7 +174,6 @@ func resourceHasRolloutAfter(proxy cluster.Proxy, ref corev1.ObjectReference) (b
if findSpecPropertyForResource(definition, resourceDefName, "rolloutAfter") {
return true, nil
}

}

return false, fmt.Errorf("resource definition for %s.%s.%s not found", "io.x-k8s.cluster.controlplane", ref.APIVersion, ref.Kind)
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/client/alpha/rollout.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
MachineDeployment = "machinedeployment"
// KubeadmControlPlane is a resource type.
KubeadmControlPlane = "kubeadmcontrolplane"
// DefaultAPIVersion is what clusterctl will assume if none is provided
// DefaultAPIVersion is what clusterctl will assume if none is provided.
DefaultAPIVersion = "v1beta1"
)

Expand Down
3 changes: 0 additions & 3 deletions cmd/clusterctl/client/alpha/rollout_restarter.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ func (r *rollout) ObjectRestarter(ctx context.Context, proxy cluster.Proxy, ref
}

if err := checkControlPlaneRolloutAfter(obj); err != nil {
// if _, ok := err.(*errRolloutAfterNotFound); ok {
// return errors.Errorf("Invalid resource type %v. Resource must implement rolloutAfter in it's spec", ref.Kind)
// }
return errors.Errorf("err: %s, can't update ControlPlane (remove 'spec.rolloutAfter' first): %v/%v", err.Error(), ref.Kind, ref.Name)
}

Expand Down
1 change: 0 additions & 1 deletion cmd/clusterctl/cmd/rollout/restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ type restartOptions struct {
kubeconfigContext string
resources []string
namespace string
apiVersion string
}

var restartOpt = &restartOptions{}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ require (
github.com/flatcar/ignition v0.36.2
github.com/go-logr/logr v1.4.1
github.com/gobuffalo/flect v1.0.2
github.com/google/gnostic-models v0.6.8
github.com/google/go-cmp v0.6.0
github.com/google/go-github/v53 v53.2.0
github.com/google/gofuzz v1.2.0
Expand Down Expand Up @@ -89,7 +90,6 @@ require (
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/cel-go v0.17.8 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
Expand Down

0 comments on commit 27ea695

Please sign in to comment.