Skip to content

Commit

Permalink
Merge pull request #14572 from smarterclayton/quorum_read
Browse files Browse the repository at this point in the history
Make the default quorum reads
  • Loading branch information
smarterclayton authored Jun 14, 2017
2 parents 653b218 + 8224a33 commit c7a38d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions pkg/cmd/server/kubernetes/master/master_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ func BuildKubeAPIserverOptions(masterConfig configapi.MasterConfig) (*kapiserver
server.Etcd.EnableGarbageCollection = true
server.Etcd.StorageConfig.Type = "etcd2" // TODO(post-1.6.1-rebase): enable etcd3 as upstream
server.Etcd.DefaultStorageMediaType = "application/json" // TODO(post-1.6.1-rebase): enable protobuf with etcd3 as upstream
server.Etcd.StorageConfig.Quorum = true
server.Etcd.StorageConfig.Prefix = masterConfig.EtcdStorageConfig.KubernetesStoragePrefix
server.Etcd.StorageConfig.ServerList = masterConfig.EtcdClientInfo.URLs
server.Etcd.StorageConfig.KeyFile = masterConfig.EtcdClientInfo.ClientCert.KeyFile
Expand Down
4 changes: 2 additions & 2 deletions pkg/util/restoptions/configgetter.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ func (g *configRESTOptionsGetter) GetRESTOptions(resource schema.GroupResource)
}

if *capacity == 0 || !g.cacheEnabled {
glog.V(5).Infof("using uncached watch storage for %s", resource.String())
glog.V(5).Infof("using uncached watch storage for %s (quorum=%t)", resource.String(), storageConfig.Quorum)
return generic.UndecoratedStorage(copier, storageConfig, capacity, objectType, resourcePrefix, keyFunc, newListFn, getAttrsFunc, triggerFn)
}

glog.V(5).Infof("using watch cache storage (capacity=%v) for %s %#v", *capacity, resource.String(), storageConfig)
glog.V(5).Infof("using watch cache storage (capacity=%v, quorum=%t) for %s %#v", *capacity, storageConfig.Quorum, resource.String(), storageConfig)
return storageWithCacher(copier, storageConfig, capacity, objectType, resourcePrefix, keyFunc, newListFn, getAttrsFunc, triggerFn)
}

Expand Down

0 comments on commit c7a38d7

Please sign in to comment.