@Override
    public ImageRegistry getImageRegistry(String registry) throws HyscaleException {
        if (!SetupConfig.hasExternalRegistryConf()) {
            return getImageRegistry(dockerConfigBuilder.getDockerConfig(), registry);
        }
        logger.debug("Found External registry Conf");
        buildExternalRegistryConf();
        return getImageRegistry(externalRegistryConf, registry);
    }
returns image registry credentials if found in docker config in the credHelpers,credsStore or Auths else returns null.

@param registry
@return ImageRegistry object if found in credHelpers,credsStore or Auths else returns null.
workflow-controller/controller-service/src/main/java/io/hyscale/controller/manager/impl/LocalRegistryManagerImpl.java