add code to not add NodeLabelKey or NodeLabelValue to object meta labels when creating a new cluster or replica to avoid label value expression checks
@@ -345,8 +345,12 @@ func getPrimaryLabels(Name string, ClusterName string, replicaFlag bool, userLab
primaryLabels["pg-cluster"] = ClusterName
for key, value := range userLabels {
+ if key == "NodeLabelKey" || key == "NodeLabelValue" {
+ //dont add these since they can break label expression checks
+ } else {
primaryLabels[key] = value
}
+ }
return primaryLabels
}
