mirror of https://github.com/kubernetes/kops.git
Add auto compaction to new cilium etcd clusters and to docs
This commit is contained in:
parent
97a41c66f4
commit
a536929fec
|
|
@ -44,6 +44,7 @@ kops create cluster \
|
|||
|
||||
For existing clusters, add the following to `spec.etcdClusters`:
|
||||
Make sure `instanceGroup` match the other etcd clusters.
|
||||
You should also enable auto compaction.
|
||||
|
||||
```yaml
|
||||
- etcdMembers:
|
||||
|
|
@ -53,6 +54,12 @@ Make sure `instanceGroup` match the other etcd clusters.
|
|||
name: b
|
||||
- instanceGroup: master-az-1c
|
||||
name: c
|
||||
manager:
|
||||
env:
|
||||
- name: ETCD_AUTO_COMPACTION_MODE
|
||||
value: revision
|
||||
- name: ETCD_AUTO_COMPACTION_RETENTION
|
||||
value: "2500"
|
||||
name: cilium
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1173,6 +1173,19 @@ func createEtcdCluster(etcdCluster string, masters []*api.InstanceGroup, encrypt
|
|||
m.InstanceGroup = fi.String(ig.ObjectMeta.Name)
|
||||
etcd.Members = append(etcd.Members, m)
|
||||
}
|
||||
|
||||
// Cilium etcd server is not compacted by the k8s API server.
|
||||
if etcd.Name == "cilium" {
|
||||
if etcd.Manager == nil {
|
||||
etcd.Manager = &api.EtcdManagerSpec{
|
||||
Env: []api.EnvVar{
|
||||
{Name: "ETCD_AUTO_COMPACTION_MODE", Value: "revision"},
|
||||
{Name: "ETCD_AUTO_COMPACTION_RETENTION", Value: "2500"},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return etcd
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue