Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Create makes the CNI default network, if necessary. Accepts the name and subnet of the network to create (a standard template will be used, with these values plugged in), the configuration directory where CNI configs are stored (to verify if a named configuration already exists), an exists directory (where a sentinel file will be stored, to ensure the network is only made once), and an isMachine bool (to determine whether the machine block will be added to the config). Create first checks if a default network has already been created via the presence of a sentinel file. If it does exist, it returns immediately without error. It next checks if a CNI network with the given name already exists. In that case, it creates the sentinel file and returns without error. If neither of these are true, the default network is created.
Types ¶
This section is empty.