Skip to content

Commit

Permalink
Add kubernetes checkpoint flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfonso Acosta committed Apr 28, 2016
1 parent 1545b00 commit 3598532
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions prog/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const (

var pluginAPIVersion = "1"

func check() {
func check(flags map[string]string) {
handleResponse := func(r *checkpoint.CheckResponse, err error) {
if err != nil {
log.Errorf("Error checking version: %v", err)
Expand All @@ -56,6 +56,7 @@ func check() {
params := checkpoint.CheckParams{
Product: "scope-probe",
Version: version,
Flags: flags,
}
resp, err := checkpoint.Check(&params)
handleResponse(resp, err)
Expand Down Expand Up @@ -87,7 +88,11 @@ func probeMain(flags probeFlags) {
)
log.Infof("probe starting, version %s, ID %s", version, probeID)
log.Infof("command line: %v", os.Args)
go check()
checkpointFlags := map[string]string{}
if flags.kubernetesEnabled {
checkpointFlags["kubernetes_enabled"] = "true"
}
go check(checkpointFlags)

var targets = []string{fmt.Sprintf("localhost:%d", xfer.AppPort)}
if len(flag.Args()) > 0 {
Expand Down

0 comments on commit 3598532

Please sign in to comment.