Skip to content

Commit 9e033b1

Browse files
committed
fix reload logic
1 parent aeafc3f commit 9e033b1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/KubernetesPfSenseController/Plugin/DNSResourceTrait.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,17 @@ public function shouldTriggerFromWatchUpdate($oldItem, $item)
142142
$this->buildResourceHosts($oldResourceHosts, $oldItem);
143143
$this->buildResourceHosts($newResourceHosts, $item);
144144

145+
foreach ($oldResourceHosts as $host => $value) {
146+
$oldResourceHosts[$host] = ['ip' => $value['ip']];
147+
}
148+
149+
foreach ($newResourceHosts as $host => $value) {
150+
$newResourceHosts[$host] = ['ip' => $value['ip']];
151+
}
152+
145153
if (md5(json_encode($oldResourceHosts)) != md5(json_encode($newResourceHosts))) {
146-
return false;
154+
return true;
147155
}
148-
return true;
156+
return false;
149157
}
150158
}

0 commit comments

Comments
 (0)