diff --git a/contrib/cmd/aws-actuator-test/main.go b/contrib/cmd/aws-actuator-test/main.go index 7df95fa20..c7cf1db80 100644 --- a/contrib/cmd/aws-actuator-test/main.go +++ b/contrib/cmd/aws-actuator-test/main.go @@ -78,12 +78,12 @@ func deleteClusterMachine(instanceId string) error { } func clusterMachineExists(instanceId string) error { - _, machine := testClusterAPIResources("any") + cluster, machine := testClusterAPIResources("any") machine.Annotations = map[string]string{ instanceIDAnnotation: instanceId, } actuator := aws.NewActuator(nil, nil, log.WithField("example", "delete-machine"), "us-east-1c") - exists, err := actuator.Exists(machine) + exists, err := actuator.Exists(cluster, machine) if err != nil { return err } diff --git a/pkg/clusterapi/aws/actuator.go b/pkg/clusterapi/aws/actuator.go index 57a5b5fdf..0b5775c4c 100644 --- a/pkg/clusterapi/aws/actuator.go +++ b/pkg/clusterapi/aws/actuator.go @@ -332,7 +332,7 @@ func (a *Actuator) CreateMachine(cluster *clusterv1.Cluster, machine *clusterv1. } // Delete deletes a machine and updates its finalizer -func (a *Actuator) Delete(machine *clusterv1.Machine) error { +func (a *Actuator) Delete(cluster *clusterv1.Cluster, machine *clusterv1.Machine) error { mLog := clustoplog.WithMachine(a.logger, machine) mLog.Debugf("Delete %s/%s", machine.Namespace, machine.Name) if err := a.DeleteMachine(machine); err != nil { @@ -396,7 +396,7 @@ func (a *Actuator) Update(c *clusterv1.Cluster, machine *clusterv1.Machine) erro } // Exists determines if the given machine currently exists. -func (a *Actuator) Exists(machine *clusterv1.Machine) (bool, error) { +func (a *Actuator) Exists(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (bool, error) { mLog := clustoplog.WithMachine(a.logger, machine) mLog.Debugf("checking if machine exists")