defaultnet

package
v0.39.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(name, subnet, configDir, existsDir string, isMachine bool) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL