Whereabouts configuration from pod
Opened this issue · 2 comments
Is your feature request related to a problem? Please describe.
In a day-to-day basis, it's somewhat annoying to have to configure the network attachment and the deployment (for example) in order to configure the pod. The network attachment should be about provide the building block to multi-homing but the configuration should belong to the deployment/sts/....
Describe the solution you'd like
Through the capabilities options, I'm actually able to configure the IP for a single pod deployment, as long as the mac address (in macvlan), but unable to configure a range, not necessarily from a CIDR, to configure everything I need. For example, let's say I need this:
"ipam": {
"type": "whereabouts",
"range": "192.168.100.0/24",
"range_start": "192.168.100.12",
"range_end": "192.168.100.17",
"routes": []
}
I'd like to be able to configure it from the pod, such as:
annotations:
k8s.v1.cni.cncf.io/networks:
'[{ "name": "macvlan-config", "ips": "......."}]'
Is it at all possible through capabilities, or is this too restrictive to be able to do so?
Christian! Thanks for the feedback on this one. I really like this idea, too.
You can set an IP address statically at runtime using the tuning plugin: k8snetworkplumbingwg/multus-cni#387 (comment)
But!!! You're onto something. If we can pass the range as a CNI ARG to Whereabouts and have it pick it up at runtime... Then I think we could do exactly what you're saying. I'm thinking on it
In fact, that's the mac you'd configure with tuning plugin, from the mac capability. The IP address goes to the macvlan/ipam portion of the network attachment, isn't it ?