-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Description
When a data Configmap is removed, pkg.configmap.Sync loops on the keys of the ConfigMap and sends a remove request to OPA (PatchData) once per key. But the path in the request is always the same, so effectively it is trying to remove the same object several times:
kube-mgmt/pkg/configmap/configmap.go
Lines 265 to 274 in 6da0e7e
| path := fmt.Sprintf("%v/%v", cm.Namespace, cm.Name) | |
| for key := range cm.Data { | |
| id := fmt.Sprintf("%v/%v", path, key) | |
| if isPolicy { | |
| if err := s.opa.DeletePolicy(id); err != nil { | |
| logrus.Errorf("Failed to delete policy %v: %v", id, err) | |
| } | |
| } else { | |
| if err := s.opa.PatchData(path, "remove", nil); err != nil { |
Metadata
Metadata
Assignees
Labels
No labels