import glob
import os
import sys
import tarfile


with tarfile.open(sys.argv[2], "w:gz") as tar:
    for file in glob.iglob(sys.argv[1] + '/*/*.cfg'):
        tar.add(file, arcname='generated/l7-balancer/' + os.path.basename(file))
