Skip to content

Commit

Permalink
Pass Region and Zone to the delete requests
Browse files Browse the repository at this point in the history
This is required for GCE where the region is used to look up
the reserved IP. Zone should also be required here.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed May 3, 2023
1 parent 1062f18 commit c455fd1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,12 @@ func NewController(
klog.Infof("Deleting tunnel server for: %s.%s, HostID: %s, IP: %s",
r.Name, r.Namespace, r.Status.HostID, r.Status.HostIP)

delReq := provision.HostDeleteRequest{ID: r.Status.HostID, IP: r.Status.HostIP}
if err := provisioner.Delete(delReq); err != nil {
if err := provisioner.Delete(provision.HostDeleteRequest{
ID: r.Status.HostID,
IP: r.Status.HostIP,
Region: infra.Region,
Zone: infra.Zone,
}); err != nil {
klog.Infof("Error deleting tunnel server %s", err)
return
}
Expand Down

0 comments on commit c455fd1

Please sign in to comment.