Skip to content

Commit

Permalink
do not set healthcheck_code if code is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed Aug 30, 2018
1 parent 0affb88 commit 6bf4355
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cluster/calcium/create_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ func (c *Calcium) makeContainerOptions(index int, quota types.CPUMap, opts *type
containerLabels["healthcheck_tcp"] = strings.Join(entry.HealthCheck.TCPPorts, ",")
containerLabels["healthcheck_http"] = entry.HealthCheck.HTTPPort
containerLabels["healthcheck_url"] = entry.HealthCheck.HTTPURL
containerLabels["healthcheck_code"] = strconv.Itoa(entry.HealthCheck.HTTPCode)
if entry.HealthCheck.HTTPCode > 0 {
containerLabels["healthcheck_code"] = strconv.Itoa(entry.HealthCheck.HTTPCode)
}
}

// 接下来是meta
Expand Down

0 comments on commit 6bf4355

Please sign in to comment.