gardener / etcd-druid

An etcd operator to configure, provision, reconcile and monitor etcd clusters.
Apache License 2.0
70 stars 49 forks source link

Rename/Cleanup CLI Flags #872

Open unmarshall opened 4 weeks ago

unmarshall commented 4 weeks ago

How to categorize this issue?

/area open-source /area quality /area usability /kind enhancement

What would you like to be added:

  1. leader-election-resource-lock is marked as deprecated but its value is honoured. Ideally we should ignore the value that is set via this flag. in v0.23.0 this was marked as deprecated and it should be removed in v0.27.0
  2. disable-lease-cache we currently do not know why this flag is required. This is not configured/set in g/g use case.
  3. We should revisit the reasons to have etcd-member-notready-threshold and etcd-member-unknown-threshold. Currently it is not very clear on the need for it and even if these flags are set what are the magical values that one can set is also not very clear.
  4. etcd-events-threshold is meant for compaction controller but its name is too generic. This flag should be renamed as from its name its purpose is not clear at all. Similarly there are other CLI flags which have the same problem: active-deadline-duration, metrics-scrape-wait-duration
  5. Flag reconciler-service-account is very generic but only applies to the etcd controller.
  6. Flag disable-etcd-serviceaccount-automount should be marked deprecated and removed later. Since k8s 1.24, projected service account token is the default. What we therefore need is only for the user to specify a different expirationSeconds.

NOTE: Care should be taken to not leak implementation details via CLI Flags.

Why is this needed: Many of the etcd-druid CLI args are badly named and they do not clearly indicate what their purpose is. Some of these flags are questionable and should be considered to be marked as deprecated and in future removed. Not having well-defined CLI flags make it not-so-easy to consume druid and only adds cognitive overhead to first understand each of the flags and keep that mapping fresh in your mind as well as their name do not suggest what they really do.