Skip to content

Commit 03ed627

Browse files
committed
Make swarmctl able to create ingress network
Signed-off-by: Xinfeng Liu <[email protected]>
1 parent 560f7cc commit 03ed627

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cmd/swarmctl/network/create.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ var (
3030
return err
3131
}
3232

33+
ingress, err := flags.GetBool("ingress")
34+
if err != nil {
35+
return err
36+
}
37+
3338
// Process driver configurations
3439
var driver *api.Driver
3540
if flags.Changed("driver") {
@@ -68,6 +73,7 @@ var (
6873
},
6974
DriverConfig: driver,
7075
IPAM: ipamOpts,
76+
Ingress: ingress,
7177
}
7278

7379
c, err := common.Dial(cmd)
@@ -179,4 +185,5 @@ func init() {
179185
createCmd.Flags().StringSlice("gateway", []string{}, "Gateway IP addresses for network segments")
180186
createCmd.Flags().StringSlice("ip-range", []string{}, "IP ranges to allocate from within the subnets")
181187
createCmd.Flags().StringSlice("opts", []string{}, "Network driver options")
188+
createCmd.Flags().Bool("ingress", false, "Create ingress network")
182189
}

0 commit comments

Comments
 (0)