mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 16:12:07 +02:00
Address code review by @zerg-junior
- new info messages, rename the annotation flag.
This commit is contained in:
@@ -131,8 +131,13 @@ func SameService(cur, new *v1.Service) (match bool, reason string) {
|
||||
oldELBAnnotation := cur.Annotations[constants.ElbTimeoutAnnotationName]
|
||||
newELBAnnotation := new.Annotations[constants.ElbTimeoutAnnotationName]
|
||||
|
||||
if oldDNSAnnotation != newDNSAnnotation || oldELBAnnotation != newELBAnnotation {
|
||||
return false, fmt.Sprintf("new service's %q annotation doesn't match the current one", constants.ZalandoDNSNameAnnotation)
|
||||
if oldDNSAnnotation != newDNSAnnotation {
|
||||
return false, fmt.Sprintf("new service's %q annotation value %q doesn't match the current one %q",
|
||||
constants.ZalandoDNSNameAnnotation, newDNSAnnotation, oldDNSAnnotation)
|
||||
}
|
||||
if oldELBAnnotation != newELBAnnotation {
|
||||
return false, fmt.Sprintf("new service's %q annotation value %q doesn't match the current one %q",
|
||||
constants.ElbTimeoutAnnotationName, oldELBAnnotation, newELBAnnotation)
|
||||
}
|
||||
|
||||
return true, ""
|
||||
|
||||
Reference in New Issue
Block a user