Merge pull request #46 from andyz-dev/volume
[Enhancement] Allow the volume argument to be specified multiple times
This commit is contained in:
commit
dbc93f6818
@ -117,7 +117,7 @@ func CreateCluster(c *cli.Context) error {
|
|||||||
k3sServerArgs,
|
k3sServerArgs,
|
||||||
env,
|
env,
|
||||||
c.String("name"),
|
c.String("name"),
|
||||||
strings.Split(c.String("volume"), ","),
|
c.StringSlice("volume"),
|
||||||
portmap,
|
portmap,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -184,7 +184,7 @@ func CreateCluster(c *cli.Context) error {
|
|||||||
k3sWorkerArgs,
|
k3sWorkerArgs,
|
||||||
env,
|
env,
|
||||||
c.String("name"),
|
c.String("name"),
|
||||||
strings.Split(c.String("volume"), ","),
|
c.StringSlice("volume"),
|
||||||
i,
|
i,
|
||||||
c.String("api-port"),
|
c.String("api-port"),
|
||||||
portmap,
|
portmap,
|
||||||
|
4
main.go
4
main.go
@ -56,9 +56,9 @@ func main() {
|
|||||||
Value: defaultK3sClusterName,
|
Value: defaultK3sClusterName,
|
||||||
Usage: "Set a name for the cluster",
|
Usage: "Set a name for the cluster",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringSliceFlag{
|
||||||
Name: "volume, v",
|
Name: "volume, v",
|
||||||
Usage: "Mount one or more volumes into every node of the cluster (Docker notation: `source:destination[,source:destination]`)",
|
Usage: "Mount one or more volumes into every node of the cluster (Docker notation: `source:destination`)",
|
||||||
},
|
},
|
||||||
cli.StringSliceFlag{
|
cli.StringSliceFlag{
|
||||||
Name: "publish, add-port",
|
Name: "publish, add-port",
|
||||||
|
Loading…
Reference in New Issue
Block a user