mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
expose master count configuration in a cli option on apiserver
This commit is contained in:
parent
a45c87864e
commit
a09d85bd83
@ -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/<groupVersion> key can be used to turn on/off specific api versions. apis/<groupVersion>/<resource> 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,
|
||||
|
@ -54,6 +54,7 @@ kube-apiserver
|
||||
--admission-control-config-file="": File with admission control configuration.
|
||||
--advertise-address=<nil>: 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
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
|
@ -9,6 +9,7 @@ algorithm-provider
|
||||
all-namespaces
|
||||
allocate-node-cidrs
|
||||
allow-privileged
|
||||
apiserver-count
|
||||
api-server-address
|
||||
api-burst
|
||||
api-prefix
|
||||
|
Loading…
Reference in New Issue
Block a user