Ensure podAnnotations are removed from pods if reset in the config (#2826)

This commit is contained in:
Polina Bungina
2025-01-24 16:53:14 +01:00
committed by GitHub
parent b0cfeb30ea
commit f49b4f1e97
9 changed files with 312 additions and 59 deletions
+1 -1
View File
@@ -329,7 +329,7 @@ func (c *Cluster) updateService(role PostgresRole, oldService *v1.Service, newSe
}
}
if changed, _ := c.compareAnnotations(oldService.Annotations, newService.Annotations); changed {
if changed, _ := c.compareAnnotations(oldService.Annotations, newService.Annotations, nil); changed {
patchData, err := metaAnnotationsPatch(newService.Annotations)
if err != nil {
return nil, fmt.Errorf("could not form patch for service %q annotations: %v", oldService.Name, err)