Remove Patroni leftover objects on cluster deletion. (#244)

* Remove all endpoints and configmaps from Patroni when Patroni is running with Kubernetes support on cluster deletion.
This commit is contained in:
Oleksii Kliukin
2018-02-23 09:52:22 +01:00
committed by GitHub
parent 6a29bbbcfa
commit c4aab502b3
3 changed files with 83 additions and 4 deletions
+4
View File
@@ -414,3 +414,7 @@ func (c *Cluster) GetSpec() (*spec.Postgresql, error) {
defer c.specMu.RUnlock()
return cloneSpec(&c.Postgresql)
}
func (c *Cluster) patroniUsesKubernetes() bool {
return c.OpConfig.EtcdHost == ""
}