News for hackers. Stuff that matters.
Re:Deploying PostgreSQL Clusters Using StatefulSets by crb on Monday February 27, 2017 @05:26AM (#13743217)
You can reimplement that logic in Python. There's nothing magic about it: you can see in https://github.com/kubernetes/kubernetes/blob/master/pkg/cli... that it just uses a Kubernetes annotation.

There's some more information (and a sidecar pod prebaked) at http://blog.kubernetes.io/2016/01/simple-leader-election-wit...

Re:Deploying PostgreSQL Clusters Using StatefulSets by CyberDem0n on Monday February 27, 2017 @08:10AM (#13743893)
Yes, one can reimplement it in Python, but don't forget:

// This implementation does not guarantee that only one client is acting as a // leader (a.k.a. fencing). A client observes timestamps captured locally to // infer the state of the leader election. Thus the implementation is tolerant // to arbitrary clock skew, but is not tolerant to arbitrary clock skew rate.