Issue #3087941 by Xiaohua Guan, yas: Fix "Warning: Invalid argument supplied for foreach() in s3_to_k8s_import_entities()"