From 724b098855fe805049e3ffe5cef4637784d9ec91 Mon Sep 17 00:00:00 2001 From: nikhiljindal Date: Tue, 8 Dec 2015 13:15:46 -0800 Subject: [PATCH] Deleting unused master.ClusterName param --- .../saltbase/salt/kube-apiserver/kube-apiserver.manifest | 7 +------ cmd/kube-apiserver/app/server.go | 4 ---- docs/admin/kube-apiserver.md | 1 - pkg/master/master.go | 3 --- 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest b/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest index 6bb4588f24..f43deb9f9b 100644 --- a/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest +++ b/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest @@ -35,11 +35,6 @@ {% set address = "--address=127.0.0.1" -%} -{% set cluster_name = "" -%} -{% if pillar['instance_prefix'] is defined -%} - {% set cluster_name = "--cluster-name=" + pillar['instance_prefix'] -%} -{% endif -%} - {% set bind_address = "" -%} {% if grains.publicAddressOverride is defined -%} {% set bind_address = "--bind-address=" + grains.publicAddressOverride -%} @@ -92,7 +87,7 @@ {% endif -%} {% set params = address + " " + etcd_servers + " " + etcd_servers_overrides + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + admission_control + " " + service_cluster_ip_range + " " + client_ca_file + " " + basic_auth_file + " " + min_request_timeout -%} -{% set params = params + " " + cluster_name + " " + cert_file + " " + key_file + " --secure-port=" + secure_port + " " + token_auth_file + " " + bind_address + " " + pillar['log_level'] + " " + advertise_address + " " + proxy_ssh_options -%} +{% set params = params + " " + cert_file + " " + key_file + " --secure-port=" + secure_port + " " + token_auth_file + " " + bind_address + " " + pillar['log_level'] + " " + advertise_address + " " + proxy_ssh_options -%} # test_args has to be kept at the end, so they'll overwrite any prior configuration {% if pillar['apiserver_test_args'] is defined -%} diff --git a/cmd/kube-apiserver/app/server.go b/cmd/kube-apiserver/app/server.go index 26c4ae8880..4999b63fbb 100644 --- a/cmd/kube-apiserver/app/server.go +++ b/cmd/kube-apiserver/app/server.go @@ -106,7 +106,6 @@ type APIServer struct { MasterServiceNamespace string RuntimeConfig util.ConfigurationMap KubeletConfig kubeletclient.KubeletClientConfig - ClusterName string EnableProfiling bool EnableWatchCache bool MaxRequestsInFlight int @@ -133,7 +132,6 @@ func NewAPIServer() *APIServer { EtcdPathPrefix: master.DefaultEtcdPathPrefix, EnableLogsSupport: true, MasterServiceNamespace: api.NamespaceDefault, - ClusterName: "kubernetes", CertDirectory: "/var/run/kubernetes", StorageVersions: latest.AllPreferredGroupVersions(), @@ -242,7 +240,6 @@ func (s *APIServer) AddFlags(fs *pflag.FlagSet) { 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.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.StringVar(&s.ClusterName, "cluster-name", s.ClusterName, "The instance prefix for the cluster") fs.BoolVar(&s.EnableProfiling, "profiling", true, "Enable profiling via web interface host:port/debug/pprof/") // TODO: enable cache in integration tests. fs.BoolVar(&s.EnableWatchCache, "watch-cache", true, "Enable watch caching in the apiserver") @@ -559,7 +556,6 @@ func (s *APIServer) Run(_ []string) error { AdmissionControl: admissionController, APIGroupVersionOverrides: apiGroupVersionOverrides, MasterServiceNamespace: s.MasterServiceNamespace, - ClusterName: s.ClusterName, ExternalHost: s.ExternalHost, MinRequestTimeout: s.MinRequestTimeout, ProxyDialer: proxyDialerFn, diff --git a/docs/admin/kube-apiserver.md b/docs/admin/kube-apiserver.md index cdc4972a56..abc48f8130 100644 --- a/docs/admin/kube-apiserver.md +++ b/docs/admin/kube-apiserver.md @@ -62,7 +62,6 @@ kube-apiserver --client-ca-file="": If set, any request presenting a client certificate signed by one of the authorities in the client-ca-file is authenticated with an identity corresponding to the CommonName of the client certificate. --cloud-config="": The path to the cloud provider configuration file. Empty string for no configuration file. --cloud-provider="": The provider for cloud services. Empty string for no provider. - --cluster-name="kubernetes": The instance prefix for the cluster --cors-allowed-origins=[]: List of allowed origins for CORS, comma separated. An allowed origin can be a regular expression to support subdomain matching. If this list is empty CORS will not be enabled. --etcd-prefix="/registry": The prefix for all resource paths in etcd. --etcd-servers=[]: List of etcd servers to watch (http://ip:port), comma separated. Mutually exclusive with -etcd-config diff --git a/pkg/master/master.go b/pkg/master/master.go index 57c877c553..00d3f28f52 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -232,9 +232,6 @@ type Config struct { // expire. CacheTimeout time.Duration - // The name of the cluster. - ClusterName string - // The range of IPs to be assigned to services with type=ClusterIP or greater ServiceClusterIPRange *net.IPNet