This is a simple cronjob checks whether the etcdDatabaseHighFragmentationRatio alert is active for the cluster or not; if it is active, then it runs etcdctl defrag
command for each etcd instances starting from the ones that are not leader.
- Version of
etcdctl
is3.5.3
Prometheus service
and its namespace should be set as an environment variable on the cronjob.yml.- A
secret
object in which theetcd client certs
andCA
should exist. - An
endpoint
object consisting ofetcd endpoints
.