Added more env variable to get the rest api for leader slection