Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fluentd-gcp addon] Fix passing location to event exporter #60503

Merged
merged 1 commit into from
Mar 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cluster/addons/fluentd-gcp/event-exporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
image: k8s.gcr.io/event-exporter:v0.1.8
command:
- /event-exporter
- -sink-opts="-location={{ event_exporter_zone }}"
- -sink-opts=-location={{ event_exporter_zone }}
# BEGIN_PROMETHEUS_TO_SD
- name: prometheus-to-sd-exporter
image: k8s.gcr.io/prometheus-to-sd:v0.2.4
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/instrumentation/logging/stackdrvier/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ var _ = instrumentation.SIGDescribe("Cluster level logging implemented by Stackd
}()

ginkgo.By("Waiting for events to ingest")
c := utils.NewLogChecker(p, utils.UntilFirstEntry, utils.JustTimeout, "")
zone := framework.TestContext.CloudConfig.Zone
c := utils.NewLogChecker(p, utils.UntilFirstEntryFromZone(zone), utils.JustTimeout, "")
err := utils.WaitForLogs(c, ingestionInterval, ingestionTimeout)
framework.ExpectNoError(err)
})
Expand Down
13 changes: 13 additions & 0 deletions test/e2e/instrumentation/logging/utils/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ func UntilFirstEntryFromLog(log string) IngestionPred {
}
}

// UntilFirstEntryFromZone is a IngestionPred that checks that at least one
// entry from the log with a given name was ingested.
func UntilFirstEntryFromZone(zone string) IngestionPred {
return func(_ string, entries []LogEntry) (bool, error) {
for _, e := range entries {
if e.Location == zone {
return true, nil
}
}
return false, nil
}
}

// TimeoutFun is a function that is called when the waiting times out.
type TimeoutFun func([]string, []bool) error

Expand Down