mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
last-applied-config annotation no longer mirrored to endpoint slices
Handles incorrect mirroring of endpoint annotations to created endpoint slices, specifically the last-applied-config. Also updates tests and adds test cases for the same
This commit is contained in:
@@ -87,9 +87,9 @@ func newEndpointSlice(endpoints *corev1.Endpoints, ports []discovery.EndpointPor
|
||||
epSlice.Labels[discovery.LabelServiceName] = endpoints.Name
|
||||
epSlice.Labels[discovery.LabelManagedBy] = controllerName
|
||||
|
||||
// clone all annotations but EndpointsLastChangeTriggerTime
|
||||
// clone all annotations but EndpointsLastChangeTriggerTime and LastAppliedConfigAnnotation
|
||||
for annotation, val := range endpoints.Annotations {
|
||||
if annotation == corev1.EndpointsLastChangeTriggerTime {
|
||||
if annotation == corev1.EndpointsLastChangeTriggerTime || annotation == corev1.LastAppliedConfigAnnotation {
|
||||
continue
|
||||
}
|
||||
epSlice.Annotations[annotation] = val
|
||||
|
||||
Reference in New Issue
Block a user