[kuryr][kuryr-kubernetes] does kuryr-kubernetes support dynamic subnet by pod namespace or annotation?

Michał Dulko mdulko at redhat.com
Tue Oct 22 12:43:47 UTC 2019


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 at 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/5fa529efa46695ae2f29a9ad9c35386d952e6a32/kuryr_kubernetes/controller/drivers/default_subnet.py#L23-L37




More information about the openstack-discuss mailing list