Closed
Description
ref: #22448
Description
- We want to have a flag in apiserver to switch to different storage backends. The default should remain as "etcd2", and user can choose a different storage backend e.g. etcd3 by setting the flag.
What should the flag look like?We will add a flag "--storage-backend". By default it's "etcd2"; we can set "etcd3" to switch over.
- We need to pass configs specific to etcd3. On top of my head, I think we just need server list (incl. overrides), key prefix. We can reuse existing flags "etcd-servers", "etcd-servers-overrides", and prefix.
One difference to note is that we will use "ip:port" instead of "http://ip:port".
About Config Entry
How could we provide an abstraction to switch between storages?
Currently, user passes config into apiserver via EtcdConfig and set those fields. I'm thinking about to reuse this struct as the entry point -- either add a new field "version" or have different sub-struct like "v2" and "v3". Of course, this is just a shortcut I'm pointing out. I want to collect everyone's thoughts and ideas about how to structure the configuration here better.