Skip to content

Commit

Permalink
more linting
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennenMM7 committed Mar 6, 2024
1 parent 5c74252 commit e702c99
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
1 change: 1 addition & 0 deletions cloud/scope/machinepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package scope

import (
Expand Down
17 changes: 0 additions & 17 deletions exp/controllers/gcpmanagedmachinepool_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,23 +198,6 @@ func getMachinePoolByName(ctx context.Context, c client.Client, namespace, name
return m, nil
}

//// getOwnerMachinePool returns the MachinePool object owning the current resource.
//func getOwnerMachinePool(ctx context.Context, c client.Client, obj metav1.ObjectMeta) (*expclusterv1.MachinePool, error) {
// for _, ref := range obj.OwnerReferences {
// if ref.Kind != "MachinePool" {
// continue
// }
// gv, err := schema.ParseGroupVersion(ref.APIVersion)
// if err != nil {
// return nil, errors.WithStack(err)
// }
// if gv.Group == expclusterv1.GroupVersion.Group {
// return getMachinePoolByName(ctx, c, obj.Namespace, ref.Name)
// }
// }
// return nil, nil
//}

//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=gcpmanagedmachinepools,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=gcpmanagedmachinepools/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=gcpmanagedmachinepools/finalizers,verbs=update
Expand Down
2 changes: 1 addition & 1 deletion exp/controllers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func GetOwnerMachinePool(ctx context.Context, c client.Client, obj metav1.Object
// KubeadmConfigToInfrastructureMapFunc returns a handler.ToRequestsFunc that watches for KubeadmConfig events and returns.
func KubeadmConfigToInfrastructureMapFunc(ctx context.Context, c client.Client, log logr.Logger) handler.MapFunc {

Check warning on line 56 in exp/controllers/helpers.go

View workflow job for this annotation

GitHub Actions / lint

unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
return func(ctx context.Context, o client.Object) []reconcile.Request {
ctx, cancel := context.WithTimeout(ctx, reconciler.DefaultMappingTimeout)
_, cancel := context.WithTimeout(ctx, reconciler.DefaultMappingTimeout)
defer cancel()

kc, ok := o.(*kubeadmv1.KubeadmConfig)
Expand Down

0 comments on commit e702c99

Please sign in to comment.