mirror of
https://github.com/stakater/Reloader.git
synced 2026-08-20 20:46:30 +00:00
Add to update method
This commit is contained in:
@@ -73,10 +73,12 @@ func (c *Controller) resourceInIgnoredNamespace(raw interface{}) bool {
|
||||
|
||||
// Update function to add an old object and a new object to the queue in case of updating a resource
|
||||
func (c *Controller) Update(old interface{}, new interface{}) {
|
||||
c.queue.Add(handler.ResourceUpdatedHandler{
|
||||
Resource: new,
|
||||
OldResource: old,
|
||||
})
|
||||
if !c.resourceInIgnoredNamespace(new) {
|
||||
c.queue.Add(handler.ResourceUpdatedHandler{
|
||||
Resource: new,
|
||||
OldResource: old,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Delete function to add an object to the queue in case of deleting a resource
|
||||
|
||||
Reference in New Issue
Block a user