Add EnableTagDrift logic to command/agent/local.go
This commit is contained in:
parent
3a740ac07b
commit
854ff1eb41
|
@ -379,7 +379,12 @@ func (l *localState) setSyncState() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If our definition is different, we need to update it
|
// If our definition is different, we need to update it
|
||||||
l.logger.Printf("[ERR] services: %v", service)
|
if existing.EnableTagDrift {
|
||||||
|
l.logger.Printf("[DEBUG] Tag drift enabled.")
|
||||||
|
existing.Tags = service.Tags
|
||||||
|
} else {
|
||||||
|
l.logger.Printf("[DEBUG] Tag drift disabled.")
|
||||||
|
}
|
||||||
equal := reflect.DeepEqual(existing, service)
|
equal := reflect.DeepEqual(existing, service)
|
||||||
l.serviceStatus[id] = syncStatus{inSync: equal}
|
l.serviceStatus[id] = syncStatus{inSync: equal}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue