mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-08 21:31:24 +02:00
Add version label to the cluster. (#96)
* Add version label to the cluster. According to the STUPS team the daemon that exports logs to scalyr stops the export if the version label is missing. * Move label names to constants. * Run go fmt
This commit is contained in:
committed by
Murat Kabilov
parent
08c0e3b6dd
commit
47e3e29a56
+4
-4
@@ -156,10 +156,10 @@ func (c *Cluster) waitPodLabelsReady() error {
|
||||
LabelSelector: ls.String(),
|
||||
}
|
||||
masterListOption := v1.ListOptions{
|
||||
LabelSelector: labels.Merge(ls, labels.Set{"spilo-role": constants.PodRoleMaster}).String(),
|
||||
LabelSelector: labels.Merge(ls, labels.Set{constants.SpiloRoleLabel: constants.PodRoleMaster}).String(),
|
||||
}
|
||||
replicaListOption := v1.ListOptions{
|
||||
LabelSelector: labels.Merge(ls, labels.Set{"spilo-role": constants.PodRoleReplica}).String(),
|
||||
LabelSelector: labels.Merge(ls, labels.Set{constants.SpiloRoleLabel: constants.PodRoleReplica}).String(),
|
||||
}
|
||||
pods, err := c.KubeClient.Pods(namespace).List(listOptions)
|
||||
if err != nil {
|
||||
@@ -204,8 +204,8 @@ func (c *Cluster) waitStatefulsetPodsReady() error {
|
||||
|
||||
func (c *Cluster) labelsSet() labels.Set {
|
||||
return labels.Set{
|
||||
"application": "spilo",
|
||||
"spilo-cluster": c.Metadata.Name,
|
||||
constants.ApplicationNameLabel: constants.ApplicationNameLabelValue,
|
||||
constants.ClusterNameLabel: c.Metadata.Name,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user