add gateway support to deploy