mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Merge pull request #601 from erikwilson/watch-cache-etcd3
Use watch-cache for etcd3 backend
This commit is contained in:
commit
979a8ff671
|
@ -150,12 +150,13 @@ func apiServer(ctx context.Context, cfg *config.Control, runtime *config.Control
|
|||
if len(cfg.StorageEndpoint) > 0 {
|
||||
argsMap["etcd-servers"] = cfg.StorageEndpoint
|
||||
}
|
||||
if cfg.StorageBackend != "etcd3" {
|
||||
argsMap["watch-cache"] = "false"
|
||||
}
|
||||
|
||||
certDir := filepath.Join(cfg.DataDir, "tls/temporary-certs")
|
||||
os.MkdirAll(certDir, 0700)
|
||||
|
||||
// TODO: sqlite doesn't need the watch cache, but etcd does, so make this dynamic
|
||||
argsMap["watch-cache"] = "false"
|
||||
argsMap["cert-dir"] = certDir
|
||||
argsMap["allow-privileged"] = "true"
|
||||
argsMap["authorization-mode"] = strings.Join([]string{modes.ModeNode, modes.ModeRBAC}, ",")
|
||||
|
|
Loading…
Reference in New Issue
Block a user