Network Create: Add --ignore flag to support idempotent script

Add --ignore flag to the command line
Add a new parameter to the NetworkCreate interface in pkg/domain for CreateOptions
Add a new API Network CreateWithOptions in pkg/bindings
Remote API - Add a query parameter to set the ignore flag
Kube - use the IgnoreIfExists flag when creating the default network instead of handling the failure
Add e2e tests
Update man page for podman-network-create

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
This commit is contained in:
Ygal Blum
2022-12-14 18:26:58 +02:00
parent 7784f1d165
commit bddd3f5b5f
14 changed files with 139 additions and 12 deletions

View File

@ -39,6 +39,10 @@ Define a gateway for the subnet. If you want to provide a gateway address, you m
*subnet* option. Can be specified multiple times.
The argument order of the **--subnet**, **--gateway** and **--ip-range** options must match.
#### **--ignore**
Ignore the create request if a network with the same name already exists instead of failing.
Note, trying to create a network with an existing name and different parameters, will not change the configuration of the existing one
#### **--internal**
Restrict external access of this network. Note when using this option, the dnsname plugin will be