Begin to check the size of each bundle file into bundle size checker to ensure that all are not bigger than ~1MB
Bundles have a size limitation because their manifests are used to create a configMap, and the Kubernetes API does not allow configMaps larger than ~1MB. However, from OCP version 4.9, these values were increased to ~4MB because we are compressing them. (More info[0]).
The change to allow bigger bundles from OCP 4.9 only impacts the full bundle size amount. Any single manifest within the bundle such as the CRD will still make the bundle uninstallable if it exceeds the default file size limit on clusters (~1MB).
Currently, we check the total size compressed of the bundle: https://github.com/operator-framework/api/blob/master/pkg/manifests/bundleloader.go#L50-L77 and https://github.com/operator-framework/api/blob/master/pkg/validation/internal/bundle.go#L129-L151
This task is for us to improve the check to ensure that we will also raise an error for all files that has a size bigger than ~1MB.
c/c @ryantking