Hadron / carthage

Carthage is an Infrastructure as Code (IAC) framework
Other
8 stars 4 forks source link

container vs host NetworkConfig #70

Open hartmans opened 4 months ago

hartmans commented 4 months ago

Consider the following modeling:

class host(MachineModel):
    class container_1(MachineModel): pass
    class container_2(MachineModel): pass

We almost certainly want different networking for host than for the two containers. We presumably need to override a few other things including machine_implementation_key.

For PodmanContainer, PodmanPod and PodmanPodModel, we can introduce a different injection key that preferentially sets the NetworkConfig. But that isn't as useful as it might appear because most netowrk_links are set on MachineModel not on the underlying machine. Currently there is not a good way to handle this at the MachineModel level.