Commit 7ad03ad8 authored by Vladimir Zorin's avatar Vladimir Zorin

Add cluster-dns server arg support

parent b8c3ff1d
......@@ -9,6 +9,7 @@ type Server struct {
ClusterCIDR string
ClusterSecret string
ServiceCIDR string
ClusterDNS string
HTTPSPort int
HTTPPort int
DataDir string
......@@ -71,6 +72,12 @@ func NewServerCommand(action func(*cli.Context) error) cli.Command {
Destination: &ServerConfig.ServiceCIDR,
Value: "10.43.0.0/16",
},
cli.StringFlag{
Name: "cluster-dns",
Usage: "Cluster IP for coredns service. Should be in your service-cidr range",
Destination: &ServerConfig.ClusterDNS,
Value: "10.43.0.10",
},
cli.StringSliceFlag{
Name: "no-deploy",
Usage: "Do not deploy packaged components (valid items: coredns, servicelb, traefik)",
......
......@@ -86,7 +86,7 @@ func run(app *cli.Context, cfg *cmds.Server) error {
if err != nil {
return errors.Wrapf(err, "Invalid CIDR %s: %v", cfg.ServiceCIDR, err)
}
serverConfig.ControlConfig.ClusterDNS = net2.ParseIP(cfg.ClusterDNS)
// 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