Skip to content

Commit

Permalink
comments gardener#1
Browse files Browse the repository at this point in the history
  • Loading branch information
kon-angelo committed May 15, 2023
1 parent 1207cf1 commit 812401d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/controller/bastion/actuator_reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,20 +188,15 @@ func ensurePublicIPAddress(opt *Options, log logr.Logger, client openstackclient
return nil, fmt.Errorf("router with ID %s was not found", infraStatus.Networks.Router.ID)
}

var (
subnetID string
)

router := routerList[0]
if len(router.GatewayInfo.ExternalFixedIPs) == 0 {
return nil, errors.New("no external fixed IPs detected on the router")
}

subnetID = router.GatewayInfo.ExternalFixedIPs[0].SubnetID
createOpts := floatingips.CreateOpts{
Description: opt.BastionInstanceName,
FloatingNetworkID: infraStatus.Networks.FloatingPool.ID,
SubnetID: subnetID,
SubnetID: router.GatewayInfo.ExternalFixedIPs[0].SubnetID,
}

fip, err := createFloatingIP(client, createOpts)
Expand Down

0 comments on commit 812401d

Please sign in to comment.