Skip to content

Commit

Permalink
feat (AwsVpcPeering): SKR delete
Browse files Browse the repository at this point in the history
  • Loading branch information
vandjelk committed Jul 3, 2024
1 parent 3152f2e commit 0f0f2ec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/skr/awsvpcpeering/deleteKcpVpcPeering.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func deleteKcpVpcPeering(ctx context.Context, st composed.State) (error, context
}

if state.KcpVpcPeering == nil {
// SKR AzureVpcPeering is marked for deletion, but none found in KCP, probably already deleted
// SKR AwsVpcPeering is marked for deletion, but none found in KCP, probably already deleted
return nil, nil
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/skr/awsvpcpeering/removeFinalizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ func removeFinalizer(ctx context.Context, st composed.State) (error, context.Con
return nil, nil
}

logger.Info("Removing AzureVpcPeering finalizer")
logger.Info("Removing AwsVpcPeering finalizer")

// KCP VpcPeering does not exist, remove the finalizer so SKR AwsVpcPeering is also deleted
controllerutil.RemoveFinalizer(state.Obj(), cloudresourcesv1beta1.Finalizer)

err := state.UpdateObj(ctx)

if err != nil {
return composed.LogErrorAndReturn(err, "Error saving SKR AzureVpcPeering after finalizer remove", composed.StopWithRequeue, ctx)
return composed.LogErrorAndReturn(err, "Error saving SKR AwsVpcPeering after finalizer remove", composed.StopWithRequeue, ctx)
}

// bye, bye AwsVpcPeering
Expand Down
2 changes: 1 addition & 1 deletion pkg/skr/awsvpcpeering/updateId.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func updateId(ctx context.Context, st composed.State) (error, context.Context) {
return composed.LogErrorAndReturn(err, "Error updating SKR AwsVpcPeering status with ID label", composed.StopWithRequeue, ctx)
}

logger.Info("SKR AzureVpcPeering updated with ID status")
logger.Info("SKR AwsVpcPeering updated with ID status")

return composed.StopWithRequeueDelay(100 * time.Millisecond), nil
}

0 comments on commit 0f0f2ec

Please sign in to comment.