-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using CRD or annotations to store cluster info in Kubernetes #411
Comments
@k1-hedayati we could use CRD for the cluster data and locking features for sentinel election but we use the store also for discovery of the keepers and proxies and this relies on key ttl expiration. So to move to use only the k8s api server as the store there's the need to rearchitect discovery to work with it. In the past we had (see the git history) k8s based keeper's pod discovery using label selectors and exposing an api on the keeper to fetch it's state but we removed it since it wasn't really helpful due to lack, at that time, of crd. This way of doing discovery could be reintroduced and, if someone wants to propose a design doc on how to do this. I'll happily review and discuss this. |
Unfortunately in my current situation I cannot spend much time on this but I found out that patroni has implemented this functionality, architectures may differ but it could be a good place to start. Also there is Postgres Operator which is using CRD too. I'm aiming for minimum worry and maintenance setup, as you very well know etcd setups are inconsistent and fragile, coreos/etcd-operator#1323 is still WIP too and my knowledge on etcd is very limited so I don't know if it's possible to have resilient setup without etcd opertator. I saw your solution on this, is it reliable for production use or its just for example? Edit: Thanks to your efforts it seems PV support for operator has been merged recently so I guess now it's possible to have a resilient setup. |
@k1-hedayati I got your points but won't try to copy other solutions since they have different features and architectures. I think we should start from my previous comment and provide an initial design doc. This change will require some effort also to improve the test suite to run the tests also on a k8s cluster. I'd be really happy if someone in the community jumps in and help us implementing this or wants to sponsor its development. About the etcd operator vs statefulset let's discuss this in the mailing list to keep this issue clean. |
I did an initial POC. This is how it basically works:
NOTE: it won't use CRD because CRD is for custom resources managed by a controller/operator and doesn't fit well to save the clusterdata. |
For creating right RBAC rules there is audit2rbac which looks at audit logs provided by the api server. |
Created #433 . I'll be really happy if someone could test that PR. |
Implemented in #433 . |
Submission type
Environment
Kubernetes
Stolon version
9fd8393
Enhancement Description
I've been reviewing stolon to set it up in my kubernetes cluster and I happened to see a suggestion in HN:
His comment seems to fair and convincing, I'm not much aware of implementation details of stolon but using kubernetes native features is very neat and avoids worrying about
etcd
management and maintenance which is proved to be troublesome.The text was updated successfully, but these errors were encountered: