Sync clusters states

* move statefulset creation from cluster spec to the separate function
* sync cluster state with desired state;
* move out from arrays for cluster resources;
* recreate pods instead of deleting them in case of statefulset change
* check for master while creating cluster/updating pods
* simplify retryutil
* list pvc while listing resources
* name kubernetes resources with capital letter
* do rolling update in case of env variables change
This commit is contained in:
Murat Kabilov
2017-05-12 11:41:27 +02:00
parent 1377724b2e
commit 6f7399b36f
13 changed files with 334 additions and 88 deletions
+4
View File
@@ -45,6 +45,10 @@ func PodClusterName(pod *v1.Pod) spec.ClusterName {
return spec.ClusterName{}
}
func PodSpiloRole(pod *v1.Pod) string {
return pod.Labels["spilo-role"]
}
func ClusterDNSName(clusterName, teamName, hostedZone string) string {
return fmt.Sprintf("%s.%s.%s", clusterName, teamName, hostedZone)
}