Skip to content

Commit 70cad9d

Browse files
committed
default to amd64 only
1 parent 7d0c8f1 commit 70cad9d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

manageiq-operator/api/v1alpha1/miqutils/node_affinity.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,24 @@ import (
1010
func 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

3233
func SetDeploymentNodeAffinity(deployment *appsv1.Deployment, client client.Client) {

0 commit comments

Comments
 (0)