Thanks Michal, got it, I'll try it, I'd like to upstream it if possible. -----邮件原件----- 发件人: Michał Dulko [mailto:mdulko@redhat.com] 发送时间: 2019年10月22日 20:44 收件人: Luis Tomas Bolivar <ltomasbo@redhat.com>; Yi Yang (杨燚)-云服务集团 <yangyi01@inspur.com> 抄送: openstack-discuss@lists.openstack.org 主题: Re: [kuryr][kuryr-kubernetes] does kuryr-kubernetes support dynamic subnet by pod namespace or annotation? On Tue, 2019-10-22 at 13:20 +0200, Luis Tomas Bolivar wrote:
Hi Yi Yang,
On Tue, Oct 22, 2019 at 4:43 AM Yi Yang (杨燚)-云服务集团 < yangyi01@inspur.com> wrote:
Hi, Folks
We need to create containers on baremetal for different tenants, so pod belongs to tenant VPC or tenant subnet, can we specify subnet by namespace or annotation in pod spec? I don’t mean multiple VIFs by additional subnets, I just need single OVS port for pod.
There is a namespace handler (and namespace_subnet driver) that creates a different subnet/network per K8s namespace, but those networks are created by that handle in the same tenant account (kuryr is single tenant).
Adding to Luis reply: The short answer is no, but we're totally open to such a contribution in this area. We thought about it but it was never a priority, so there have never been enough resources to get it done properly. The long answer is that it should be pretty easy to implement by having your own PodSubnetsDriver, very similar to the default [1], that would do that logic. While we would totally welcome such implementation upstream, you can also easily keep it in another Python package and use entrypoints to configure Kuryr-Kubernetes with it. [1] https://github.com/openstack/kuryr-kubernetes/blob/5fa529efa46695ae2f29a9ad9...