-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Compress recurring events in to a single event to optimize etcd storage #4306
Conversation
67dc21e
to
e0a7f61
Compare
Fixed the v1.3 issues. Please take a look. E2E still green: |
// created with the "" namespace. Update also requires the ResourceVersion to be set in the event | ||
// object. | ||
func (e *events) Update(event *api.Event) (*api.Event, error) { | ||
if e.namespace != "" && event.Namespace != e.namespace { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check should be done on the server - there's really no need to do it in the client (it indicates a coding error in most cases).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed check.
e0a7f61
to
033577e
Compare
Thanks Clayton! Feedback addressed. PTAL |
LGTM - do you have a clean e2e run? |
I've rebased and run e2e a few times and I have a couple of tests failing in each run. Most recent run had these failures:
Looks like e2e is unstable at the moment, looking at the most recent jenkin's run (http://kubekins.dls.corp.google.com/job/kubernetes-e2e-gce/2164/testReport/), the same tests are failing for the same reasons. |
Ok, we can keep an eye on it. Rerunning Travis then merging. |
Compress recurring events in to a single event to optimize etcd storage
This implements the first and third items from the design proposal in #4073, compressing duplicate events.
This PR modifies the code that “records/writes” events:
This PR also modifies
kubectl
to output the new timestamps/count fields for events, sorted by the LastSeenTimestamp.Sample
kubectl get events
output:Because we keep track of event history in memory on kubelet, compression is best effort. That means that compression will not occur across kubelet restarts. Also, as noted in the proposal, if, in the future, we decide to age out events from the kubelet events hash table, then events will only be compressed until they age out of the hash table, at which point any new instance of the event will create a new entry in etcd.
E2E is clean and green:
Ran 20 of 20 Specs in 1308.916 seconds
SUCCESS! -- 20 Passed | 0 Failed | 0 Pending | 0 Skipped I0210 15:06:40.338927 21318 driver.go:83] All tests pass