Skip to content

Commit e2b3768

Browse files
controller/registry: deja vu
Signed-off-by: Steve Kuznetsov <[email protected]>
1 parent 98fe8e5 commit e2b3768

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/controller/registry/reconciler/configmap.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,11 @@ func (c *ConfigMapRegistryReconciler) CheckRegistryServer(logger *logrus.Entry,
461461
}
462462

463463
if source.Spec.SourceType == v1alpha1.SourceTypeConfigmap || source.Spec.SourceType == v1alpha1.SourceTypeInternal {
464-
configMap, err := c.Lister.CoreV1().ConfigMapLister().ConfigMaps(source.GetNamespace()).Get(source.Spec.ConfigMap)
464+
// we use the live client here instead of a lister since our listers are scoped to objects with the olm.managed label,
465+
// and this configmap is a user-provided input to the catalog source and will not have that label
466+
configMap, err := c.OpClient.KubernetesInterface().CoreV1().ConfigMaps(source.GetNamespace()).Get(context.TODO(), source.Spec.ConfigMap, metav1.GetOptions{})
465467
if err != nil {
466-
return false, fmt.Errorf("unable to get configmap %s/%s from cache", source.GetNamespace(), source.Spec.ConfigMap)
468+
return false, fmt.Errorf("unable to find configmap %s/%s: %w", source.GetNamespace(), source.Spec.ConfigMap, err)
467469
}
468470

469471
if source.ConfigMapChanges(configMap) {

0 commit comments

Comments
 (0)