mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +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
|
ServiceNodePortRange util.PortRange
|
||||||
EnableLogsSupport bool
|
EnableLogsSupport bool
|
||||||
MasterServiceNamespace string
|
MasterServiceNamespace string
|
||||||
|
MasterCount int
|
||||||
RuntimeConfig util.ConfigurationMap
|
RuntimeConfig util.ConfigurationMap
|
||||||
KubeletConfig kubeletclient.KubeletClientConfig
|
KubeletConfig kubeletclient.KubeletClientConfig
|
||||||
EnableProfiling bool
|
EnableProfiling bool
|
||||||
@ -134,6 +135,7 @@ func NewAPIServer() *APIServer {
|
|||||||
EtcdPathPrefix: genericapiserver.DefaultEtcdPathPrefix,
|
EtcdPathPrefix: genericapiserver.DefaultEtcdPathPrefix,
|
||||||
EnableLogsSupport: true,
|
EnableLogsSupport: true,
|
||||||
MasterServiceNamespace: api.NamespaceDefault,
|
MasterServiceNamespace: api.NamespaceDefault,
|
||||||
|
MasterCount: 1,
|
||||||
CertDirectory: "/var/run/kubernetes",
|
CertDirectory: "/var/run/kubernetes",
|
||||||
StorageVersions: latest.AllPreferredGroupVersions(),
|
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.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.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.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.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/")
|
fs.BoolVar(&s.EnableProfiling, "profiling", true, "Enable profiling via web interface host:port/debug/pprof/")
|
||||||
// TODO: enable cache in integration tests.
|
// TODO: enable cache in integration tests.
|
||||||
@ -561,6 +564,7 @@ func (s *APIServer) Run(_ []string) error {
|
|||||||
AdmissionControl: admissionController,
|
AdmissionControl: admissionController,
|
||||||
APIGroupVersionOverrides: apiGroupVersionOverrides,
|
APIGroupVersionOverrides: apiGroupVersionOverrides,
|
||||||
MasterServiceNamespace: s.MasterServiceNamespace,
|
MasterServiceNamespace: s.MasterServiceNamespace,
|
||||||
|
MasterCount: s.MasterCount,
|
||||||
ExternalHost: s.ExternalHost,
|
ExternalHost: s.ExternalHost,
|
||||||
MinRequestTimeout: s.MinRequestTimeout,
|
MinRequestTimeout: s.MinRequestTimeout,
|
||||||
ProxyDialer: proxyDialerFn,
|
ProxyDialer: proxyDialerFn,
|
||||||
|
@ -54,6 +54,7 @@ kube-apiserver
|
|||||||
--admission-control-config-file="": File with admission control configuration.
|
--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.
|
--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.
|
--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-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.
|
--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.
|
--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
|
--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 -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
|
@ -9,6 +9,7 @@ algorithm-provider
|
|||||||
all-namespaces
|
all-namespaces
|
||||||
allocate-node-cidrs
|
allocate-node-cidrs
|
||||||
allow-privileged
|
allow-privileged
|
||||||
|
apiserver-count
|
||||||
api-server-address
|
api-server-address
|
||||||
api-burst
|
api-burst
|
||||||
api-prefix
|
api-prefix
|
||||||
|
Loading…
Reference in New Issue
Block a user