-
Notifications
You must be signed in to change notification settings - Fork 3k
Comparing changes
Open a pull request
base repository: kubernetes/client-go
base: v0.26.7
head repository: kubernetes/client-go
compare: v0.26.8
- 9 commits
- 8 files changed
- 4 contributors
Commits on Sep 8, 2022
-
events: fix EventSeries starting count discrepancy
The kube-apiserver validation expects the Count of an EventSeries to be at least 2, otherwise it rejects the Event. There was is discrepancy between the client and the server since the client was iniatizing an EventSeries to a count of 1. According to the original KEP, the first event emitted should have an EventSeries set to nil and the second isomorphic event should have an EventSeries with a count of 2. Thus, we should matcht the behavior define by the KEP and update the client. Also, as an effort to make the old clients compatible with the servers, we should allow Events with an EventSeries count of 1 to prevent any unexpected rejections. Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com> Kubernetes-commit: 62c9fa8fe6c2e04b1a40970e93055c2e92259b12
Configuration menu - View commit details
-
Copy full SHA for e7876b9 - Browse repository at this point
Copy the full SHA e7876b9View commit details
Commits on Dec 1, 2022
-
tools/events: retry on AlreadyExist for Series
When attempting to record a new Event and a new Serie on the apiserver at the same time, the patch of the Serie might happen before the Event is actually created. In that case, we handle the error and try to create the Event. But the Event might be created during that period of time and it is treated as an error today. So in order to handle that scenario, we need to retry when a Create call for a Serie results in an AlreadyExist error. Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com> Kubernetes-commit: 92c7042e640e148f54aa112591a4550d5450a132
Configuration menu - View commit details
-
Copy full SHA for b1a8353 - Browse repository at this point
Copy the full SHA b1a8353View commit details -
tools/events: fix data race when emitting series
There was a data race in the recordToSink function that caused changes to the events cache to be overriden if events were emitted simultaneously via Eventf calls. The race lies in the fact that when recording an Event, there might be multiple calls updating the cache simultaneously. The lock period is optimized so that after updating the cache with the new Event, the lock is unlocked until the Event is recorded on the apiserver side and then the cache is locked again to be updated with the new value returned by the apiserver. The are a few problem with the approach: 1. If two identical Events are emitted successively the changes of the second Event will override the first one. In code the following happen: 1. Eventf(ev1) 2. Eventf(ev2) 3. Lock cache 4. Set cache[getKey(ev1)] = &ev1 5. Unlock cache 6. Lock cache 7. Update cache[getKey(ev2)] = &ev1 + Series{Count: 1} 8. Unlock cache 9. Start attempting to record the first event &ev1 on the apiserver side. This can be mitigated by recording a copy of the Event stored in cache instead of reusing the pointer from the cache. 2. When the Event has been recorded on the apiserver the cache is updated again with the value of the Event returned by the server. This update will override any changes made to the cache entry when attempting to record the new Event since the cache was unlocked at that time. This might lead to some inconsistencies when dealing with EventSeries since the count may be overriden or the client might even try to record the first isomorphic Event multiple time. This could be mitigated with a lock that has a larger scope, but we shouldn't want to reflect Event returned by the apiserver in the cache in the first place since mutation could mess with the aggregation by either allowing users to manipulate values to update a different cache entry or even having two cache entries for the same Events. Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com> Kubernetes-commit: cfdd40b569d7630b9b31ddbe0557159b1f8b0f9e
Configuration menu - View commit details
-
Copy full SHA for 08d548e - Browse repository at this point
Copy the full SHA 08d548eView commit details
Commits on Jun 28, 2023
-
client-go: allow to set NotBefore in NewSelfSignedCACert()
Signed-off-by: Etienne Champetier <e.champetier@ateme.com> Kubernetes-commit: a85d04f86172369202efabd86d7b815f8b79c3ff
Configuration menu - View commit details
-
Copy full SHA for 5d715fe - Browse repository at this point
Copy the full SHA 5d715feView commit details
Commits on Aug 2, 2023
-
Merge pull request #119114 from champtar/automated-cherry-pick-of-#11…
…8922-upstream-release-1.26 Automated cherry pick of #118922: kubeadm: backdate generated CAs Kubernetes-commit: 4cf40e5617f8f368fef7835f6a41e14aa4f91ea2
Configuration menu - View commit details
-
Copy full SHA for 8429124 - Browse repository at this point
Copy the full SHA 8429124View commit details -
Merge pull request #119375 from dgrisonnet/automated-cherry-pick-of-#…
…114237-#114236-#112334-upstream-release-1.26 Automated cherry pick of #114237: tools/events: retry on AlreadyExist for Series #114236: tools/events: fix data race when emitting series #112334: events: fix EventSeries starting count discrepancy Kubernetes-commit: 694c7d3710afaafae8754356d86b35e93bb87658
Configuration menu - View commit details
-
Copy full SHA for ee23718 - Browse repository at this point
Copy the full SHA ee23718View commit details
Commits on Aug 8, 2023
-
Avoid returning nil responseKind in v1beta1 aggregated discovery
Kubernetes-commit: fc529b6d0c93caa5fb5c94dcab80bc8943216f6b
Configuration menu - View commit details
-
Copy full SHA for 7b6e8d8 - Browse repository at this point
Copy the full SHA 7b6e8d8View commit details
Commits on Aug 10, 2023
-
Merge pull request #119871 from liggitt/automated-cherry-pick-of-#119…
…835-upstream-release-1.26 Automated cherry pick of #119835: Avoid returning nil responseKind in v1beta1 aggregated Kubernetes-commit: 81c519fc099227707ac2eb73df0fa34759e08c5d
Configuration menu - View commit details
-
Copy full SHA for 0d6350f - Browse repository at this point
Copy the full SHA 0d6350fView commit details
Commits on Aug 24, 2023
-
Configuration menu - View commit details
-
Copy full SHA for e7a7956 - Browse repository at this point
Copy the full SHA e7a7956View commit details
There are no files selected for viewing