File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
manageiq-operator/api/v1alpha1/miqutils Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -10,23 +10,24 @@ import (
1010func OperatorNodeAffinityArchValues (deployment * appsv1.Deployment , client client.Client ) []string {
1111 podName := os .Getenv ("POD_NAME" )
1212 pod := FindPodByName (client , deployment .ObjectMeta .Namespace , podName )
13+ values := []string {"amd64" }
1314
1415 if pod .Spec .Affinity == nil {
1516 // In case we don't find the operator pod (local testing) or it doesn't have affinities
16- return [] string {}
17+ return values
1718 }
19+
1820 nodeSelectorTerms := pod .Spec .Affinity .NodeAffinity .RequiredDuringSchedulingIgnoredDuringExecution .NodeSelectorTerms
1921
2022 for _ , selector := range nodeSelectorTerms {
2123 for _ , matchExpression := range selector .MatchExpressions {
2224 if matchExpression .Key == "kubernetes.io/arch" {
23- return matchExpression .Values
25+ values = matchExpression .Values
2426 }
2527 }
2628 }
2729
28- // We should never get here, but the compiler requires it
29- return []string {}
30+ return values
3031}
3132
3233func SetDeploymentNodeAffinity (deployment * appsv1.Deployment , client client.Client ) {
You can’t perform that action at this time.
0 commit comments