Skip to content

Commit 2c33591

Browse files
grpc: update correctness check
Signed-off-by: Steve Kuznetsov <[email protected]>
1 parent d63949c commit 2c33591

File tree

1 file changed

+6
-0
lines changed
  • pkg/controller/registry/reconciler

1 file changed

+6
-0
lines changed

pkg/controller/registry/reconciler/grpc.go

+6
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@ func (c *GrpcRegistryReconciler) currentPodsWithCorrectImageAndSpec(source grpcC
209209

210210
func correctImages(source grpcCatalogSourceDecorator, pod *corev1.Pod) bool {
211211
if source.CatalogSource.Spec.GrpcPodConfig != nil && source.CatalogSource.Spec.GrpcPodConfig.ExtractContent != nil {
212+
if len(pod.Spec.InitContainers) != 2 {
213+
return false
214+
}
215+
if len(pod.Spec.Containers) != 1 {
216+
return false
217+
}
212218
return pod.Spec.InitContainers[0].Image == source.utilImage &&
213219
pod.Spec.InitContainers[1].Image == source.CatalogSource.Spec.Image &&
214220
pod.Spec.Containers[0].Image == source.opmImage

0 commit comments

Comments
 (0)