Skip to content

Commit 5296978

Browse files
committed
Provision Scaleway without blocking
The blocking wait could cause issues with the event loop. Events need to complete quickly and reconcile. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent 5381c4d commit 5296978

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ kubectl logs deploy/inlets-operator -n kube-system -f
149149

150150
# Provider Pricing
151151

152-
| Provider | Price per month | Price per hour | OS image | CPU | Memory |
153-
| ------------------------------------------------------------------ | --------------: | -------------: | -----------: | --: | -----: |
154-
| [Packet](https://www.packet.com/cloud/servers/t1-small/) | ~\$51 | \$0.07 | Ubuntu 16.04 | 4 | 8GB |
155-
| [Digital Ocean](https://www.digitalocean.com/pricing/#Compute) | \$5 | ~\$0.0068 | Ubuntu 16.04 | 1 | 512MB |
156-
| [Scaleway](https://www.scaleway.com/en/pricing/#virtual-instances) | 2.99€ | 0.006€ | Ubuntu 18.04 | 2 | 2GB |
152+
| Provider | Price per month | Price per hour | OS image | CPU | Memory | Boot time |
153+
| ------------------------------------------------------------------ | --------------: | -------------: | -----------: | --: | -----: | --------: |
154+
| [Packet](https://www.packet.com/cloud/servers/t1-small/) | ~\$51 | \$0.07 | Ubuntu 16.04 | 4 | 8GB | ~45-60s |
155+
| [Digital Ocean](https://www.digitalocean.com/pricing/#Compute) | \$5 | ~\$0.0068 | Ubuntu 16.04 | 1 | 512MB | ~20-30s |
156+
| [Scaleway](https://www.scaleway.com/en/pricing/#virtual-instances) | 2.99€ | 0.006€ | Ubuntu 18.04 | 2 | 2GB | 3-5m |
157157

158158
## Contributing
159159

pkg/provision/scaleway.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (s *ScalewayProvisioner) Provision(host BasicHost) (*ProvisionedHost, error
7777
return nil, err
7878
}
7979

80-
err = s.instanceAPI.ServerActionAndWait(&instance.ServerActionAndWaitRequest{
80+
_, err = s.instanceAPI.ServerAction(&instance.ServerActionRequest{
8181
ServerID: server.ID,
8282
Action: instance.ServerActionPoweron,
8383
})
@@ -148,9 +148,13 @@ func serverToProvisionedHost(server *instance.Server) *ProvisionedHost {
148148
if server.PublicIP != nil {
149149
ip = server.PublicIP.Address.String()
150150
}
151+
state := server.State.String()
152+
if server.State.String() == "running" {
153+
state = "active"
154+
}
151155
return &ProvisionedHost{
152156
ID: server.ID,
153157
IP: ip,
154-
Status: server.State.String(),
158+
Status: state,
155159
}
156160
}

0 commit comments

Comments
 (0)