Skip to content

Commit 95405d8

Browse files
registry/reconciler: allow current pods to be not ready
A good chunk of this logic is fatally flawed - it would be much more simple to manage a Deployment and use server-side apply to ensure that the current server state always matched the desired state, but that would be a large refactor and who knows how many other things are loosely coupled here. This is the smallest change that allows for the current serving pod to not yet have a running catalog server. Signed-off-by: Steve Kuznetsov <[email protected]>
1 parent 2a90171 commit 95405d8

File tree

1 file changed

+5
-1
lines changed
  • pkg/controller/registry/reconciler

1 file changed

+5
-1
lines changed

pkg/controller/registry/reconciler/grpc.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,15 @@ func (c *GrpcRegistryReconciler) createUpdatePod(source grpcCatalogSourceDecorat
437437
func imageChanged(updatePod *corev1.Pod, servingPods []*corev1.Pod) bool {
438438
updatedCatalogSourcePodImageID := imageID(updatePod)
439439
if updatedCatalogSourcePodImageID == "" {
440-
logrus.WithField("CatalogSource", updatePod.GetName()).Warn("pod status unknown, cannot get the pod's imageID")
440+
logrus.WithField("CatalogSource", updatePod.GetName()).Warn("pod status unknown, cannot get the updated pod's imageID")
441441
return false
442442
}
443443
for _, servingPod := range servingPods {
444444
servingCatalogSourcePodImageID := imageID(servingPod)
445+
if servingCatalogSourcePodImageID == "" {
446+
logrus.WithField("CatalogSource", servingPod.GetName()).Warn("pod status unknown, cannot get the current pod's imageID")
447+
return false
448+
}
445449
if updatedCatalogSourcePodImageID != servingCatalogSourcePodImageID {
446450
logrus.WithField("CatalogSource", servingPod.GetName()).Infof("catalog image changed: serving pod %s update pod %s", servingCatalogSourcePodImageID, updatedCatalogSourcePodImageID)
447451
return true

0 commit comments

Comments
 (0)