From ff32f9acfc5a28519e8d921957031a3d4ff40b01 Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Wed, 27 Apr 2016 17:27:26 +0000 Subject: [PATCH] Add kubernetes checkpoint flag --- prog/probe.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/prog/probe.go b/prog/probe.go index e572a29755..f18768d55c 100644 --- a/prog/probe.go +++ b/prog/probe.go @@ -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) @@ -56,6 +56,7 @@ func check() { params := checkpoint.CheckParams{ Product: "scope-probe", Version: version, + Flags: flags, } resp, err := checkpoint.Check(¶ms) handleResponse(resp, err) @@ -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 {