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