fix: revert pod matching to original logic instanceId.contains(podName)
Build & Test (NowChessSystems) TeamCity build finished
Build & Test (NowChessSystems) TeamCity build finished
Accidentally flipped pod matching direction in previous commits. Changed from correct instanceId.contains(podName) to incorrect podName.contains(instanceId), causing all health checks to fail. Reverted all 3 locations to original working logic. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
+3
-3
@@ -131,7 +131,7 @@ class HealthMonitor:
|
||||
|
||||
pods.exists { pod =>
|
||||
val podName = pod.getMetadata.getName
|
||||
podName.contains(instanceId) && isPodReady(pod)
|
||||
instanceId.contains(podName) && isPodReady(pod)
|
||||
}
|
||||
catch
|
||||
case ex: Exception =>
|
||||
@@ -185,7 +185,7 @@ class HealthMonitor:
|
||||
.getItems
|
||||
.asScala
|
||||
|
||||
pods.find(pod => pod.getMetadata.getName.contains(instanceId)) match
|
||||
pods.find(pod => instanceId.contains(pod.getMetadata.getName)) match
|
||||
case Some(pod) =>
|
||||
val podName = pod.getMetadata.getName
|
||||
kube.pods().inNamespace(config.k8sNamespace).withName(podName).withGracePeriod(0L).delete()
|
||||
@@ -244,4 +244,4 @@ class HealthMonitor:
|
||||
|
||||
private def findRegisteredInstance(pod: Pod): Option[InstanceMetadata] =
|
||||
val podName = pod.getMetadata.getName
|
||||
instanceRegistry.getAllInstances.find(inst => podName.contains(inst.instanceId))
|
||||
instanceRegistry.getAllInstances.find(inst => inst.instanceId.contains(podName))
|
||||
|
||||
Reference in New Issue
Block a user