diff --git a/cmd/kube-apiserver/app/server.go b/cmd/kube-apiserver/app/server.go index d9633a6ec1c..7b13b02c21d 100644 --- a/cmd/kube-apiserver/app/server.go +++ b/cmd/kube-apiserver/app/server.go @@ -106,6 +106,7 @@ type APIServer struct { ServiceNodePortRange util.PortRange EnableLogsSupport bool MasterServiceNamespace string + MasterCount int RuntimeConfig util.ConfigurationMap KubeletConfig kubeletclient.KubeletClientConfig EnableProfiling bool @@ -134,6 +135,7 @@ func NewAPIServer() *APIServer { EtcdPathPrefix: genericapiserver.DefaultEtcdPathPrefix, EnableLogsSupport: true, MasterServiceNamespace: api.NamespaceDefault, + MasterCount: 1, CertDirectory: "/var/run/kubernetes", StorageVersions: latest.AllPreferredGroupVersions(), @@ -241,6 +243,7 @@ func (s *APIServer) AddFlags(fs *pflag.FlagSet) { fs.Var(&s.ServiceNodePortRange, "service-node-ports", "Deprecated: see --service-node-port-range instead.") fs.MarkDeprecated("service-node-ports", "see --service-node-port-range instead.") fs.StringVar(&s.MasterServiceNamespace, "master-service-namespace", s.MasterServiceNamespace, "The namespace from which the kubernetes master services should be injected into pods") + fs.IntVar(&s.MasterCount, "apiserver-count", s.MasterCount, "The number of apiservers running in the cluster") fs.Var(&s.RuntimeConfig, "runtime-config", "A set of key=value pairs that describe runtime configuration that may be passed to apiserver. apis/ key can be used to turn on/off specific api versions. apis// can be used to turn on/off specific resources. api/all and api/legacy are special keys to control all and legacy api versions respectively.") fs.BoolVar(&s.EnableProfiling, "profiling", true, "Enable profiling via web interface host:port/debug/pprof/") // TODO: enable cache in integration tests. @@ -561,6 +564,7 @@ func (s *APIServer) Run(_ []string) error { AdmissionControl: admissionController, APIGroupVersionOverrides: apiGroupVersionOverrides, MasterServiceNamespace: s.MasterServiceNamespace, + MasterCount: s.MasterCount, ExternalHost: s.ExternalHost, MinRequestTimeout: s.MinRequestTimeout, ProxyDialer: proxyDialerFn, diff --git a/docs/admin/kube-apiserver.md b/docs/admin/kube-apiserver.md index 2d5b996a332..1d627e1a0c8 100644 --- a/docs/admin/kube-apiserver.md +++ b/docs/admin/kube-apiserver.md @@ -54,6 +54,7 @@ kube-apiserver --admission-control-config-file="": File with admission control configuration. --advertise-address=: The IP address on which to advertise the apiserver to members of the cluster. This address must be reachable by the rest of the cluster. If blank, the --bind-address will be used. If --bind-address is unspecified, the host's default interface will be used. --allow-privileged[=false]: If true, allow privileged containers. + --apiserver-count=1: The number of apiservers running in the cluster --authorization-mode="AlwaysAllow": Ordered list of plug-ins to do authorization on secure port. Comma-delimited list of: AlwaysAllow,AlwaysDeny,ABAC --authorization-policy-file="": File with authorization policy in csv format, used with --authorization-mode=ABAC, on the secure port. --basic-auth-file="": If set, the file that will be used to admit requests to the secure port of the API server via http basic authentication. @@ -105,7 +106,7 @@ kube-apiserver --watch-cache[=true]: Enable watch caching in the apiserver ``` -###### Auto generated by spf13/cobra on 15-Dec-2015 +###### Auto generated by spf13/cobra on 18-Dec-2015 diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index 45809340583..d559da2762c 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -9,6 +9,7 @@ algorithm-provider all-namespaces allocate-node-cidrs allow-privileged +apiserver-count api-server-address api-burst api-prefix