Skip to content

Commit

Permalink
reset endpoint deployment node selectors and tolerations while creati…
Browse files Browse the repository at this point in the history
…ng manifests (stolostron#1244)

Signed-off-by: Subbarao Meduri <[email protected]>
  • Loading branch information
subbarao-meduri authored Sep 14, 2023
1 parent 1bf8d03 commit 1443931
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ func createManifestWorks(c client.Client, restMapper meta.RESTMapper,
} else if clusterName == localClusterName {
spec.NodeSelector = mco.Spec.NodeSelector
spec.Tolerations = mco.Spec.Tolerations
} else {
// reset NodeSelector and Tolerations
spec.NodeSelector = map[string]string{}
spec.Tolerations = []corev1.Toleration{}
}
for i, container := range spec.Containers {
if container.Name == "endpoint-observability-operator" {
Expand All @@ -326,6 +330,8 @@ func createManifestWorks(c client.Client, restMapper meta.RESTMapper,
}
}
}
log.Info(fmt.Sprintf("Cluster: %+v, Spec.NodeSelector (after): %+v", clusterName, spec.NodeSelector))
log.Info(fmt.Sprintf("Cluster: %+v, Spec.Tolerations (after): %+v", clusterName, spec.Tolerations))
dep.Spec.Template.Spec = spec
manifests = injectIntoWork(manifests, dep)
// replace the pull secret and addon components image
Expand Down

0 comments on commit 1443931

Please sign in to comment.