k3s-io / kine

Run Kubernetes on MySQL, Postgres, sqlite, dqlite, not etcd.
Apache License 2.0
1.56k stars 233 forks source link

Question: what would it take to shim etcd with redis #130

Open ecyrbe opened 2 years ago

ecyrbe commented 2 years ago

Hello there,

Could i use kine to shim etcd for k8s with redis as the database, or does the driver model only support SQL as a driver?

brandond commented 2 years ago

As the project readme states, kine currently only supports dqlite, sqlite, Postgres, MySQL and NATS JetStream. dqlite support is deprecated.

Porting it to redis would be difficult, as redis does not currently support key versioning.

ecyrbe commented 2 years ago

But technically speaking, if i where to create a redis driver for kine, doing some jutsu with key convention suffix and scanning to emulate versionning, could it be done with current driver model or i'm going on a dead end path?

brandond commented 2 years ago

I think it wouldn't perform very well if you could get it working at all, but I certainly encourage you to give it a try. I think redis only supports watching keys, not key prefixes, so that might be another challenge.