Fix for Docker upstream

This commit is contained in:
Alex Ellis
2017-04-11 21:22:37 +01:00
parent f958e99bdc
commit c62c00e411

View File

@ -53,8 +53,11 @@ func scaleService(req requests.PrometheusAlert, c *client.Client) error {
serviceName := req.Alerts[0].Labels.FunctionName
if len(serviceName) > 0 {
opts := types.ServiceInspectOptions{
InsertDefaults: true,
}
service, _, inspectErr := c.ServiceInspectWithRaw(context.Background(), serviceName)
service, _, inspectErr := c.ServiceInspectWithRaw(context.Background(), serviceName, opts)
if inspectErr == nil {
currentReplicas := *service.Spec.Mode.Replicated.Replicas