Commit b8c3ff1d authored by Vladimir Zorin's avatar Vladimir Zorin

Add --service-cidr server arg support

parent 10be950d
......@@ -65,6 +65,12 @@ func NewServerCommand(action func(*cli.Context) error) cli.Command {
Destination: &ServerConfig.ClusterSecret,
EnvVar: "K3S_CLUSTER_SECRET",
},
cli.StringFlag{
Name: "service-cidr",
Usage: "Network CIDR to use for services IPs",
Destination: &ServerConfig.ServiceCIDR,
Value: "10.43.0.0/16",
},
cli.StringSliceFlag{
Name: "no-deploy",
Usage: "Do not deploy packaged components (valid items: coredns, servicelb, traefik)",
......
......@@ -82,6 +82,10 @@ func run(app *cli.Context, cfg *cmds.Server) error {
if err != nil {
return errors.Wrapf(err, "Invalid CIDR %s: %v", cfg.ClusterCIDR, err)
}
_, serverConfig.ControlConfig.ServiceIPRange, err = net2.ParseCIDR(cfg.ServiceCIDR)
if err != nil {
return errors.Wrapf(err, "Invalid CIDR %s: %v", cfg.ServiceCIDR, err)
}
// TODO: support etcd
serverConfig.ControlConfig.NoLeaderElect = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment