Skip to content

Commit

Permalink
Merge pull request #1391 from weaveworks/1380-k8s-checkpoint-flag
Browse files Browse the repository at this point in the history
Add kubernetes checkpoint flag
  • Loading branch information
Alfonso Acosta committed Apr 28, 2016
2 parents 64450a4 + 3598532 commit b8cd9ec
Show file tree
Hide file tree
Showing 9 changed files with 261 additions and 83 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
22 changes: 17 additions & 5 deletions vendor/github.com/weaveworks/go-checkpoint/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 22 additions & 15 deletions vendor/github.com/weaveworks/go-checkpoint/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 58 additions & 15 deletions vendor/github.com/weaveworks/go-checkpoint/checkpoint.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b8cd9ec

Please sign in to comment.