adds conditional replicaset and sharing configuration