From 31ebe73d65b8db1f3490e9a824929ed09af15788 Mon Sep 17 00:00:00 2001 From: Modassar Rana Date: Tue, 28 May 2024 21:51:50 +0530 Subject: [PATCH] feat: add S390x support in affinity rule (#503) Added s390x in node affinity rule as already work is going on to support s390x for tensorflow in runtime-adaptor --------- Signed-off-by: Modassar Rana --- controllers/modelmesh/runtime.go | 6 ++---- controllers/testdata/servingruntime_controller.golden | 8 ++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/controllers/modelmesh/runtime.go b/controllers/modelmesh/runtime.go index 2ea42dd1..e7932baa 100644 --- a/controllers/modelmesh/runtime.go +++ b/controllers/modelmesh/runtime.go @@ -341,9 +341,7 @@ func addDomainSocketMount(rts *kserveapi.ServingRuntimeSpec, c *corev1.Container func (m *Deployment) addPassThroughPodFieldsToDeployment(deployment *appsv1.Deployment) error { rts := m.SRSpec // these fields map directly to pod spec fields - // supported architectures are "amd64" and "arm64", "ppc64le" - // and "s390x" are not supported by tensorflow - // (https://github.com/kserve/modelmesh-runtime-adapter/pull/38#discussion_r1156749259) + // supported architectures are "amd64", "arm64" and "s390x" deployment.Spec.Template.Spec.NodeSelector = rts.NodeSelector deployment.Spec.Template.Spec.Tolerations = rts.Tolerations archNodeSelector := corev1.NodeSelectorTerm{ @@ -351,7 +349,7 @@ func (m *Deployment) addPassThroughPodFieldsToDeployment(deployment *appsv1.Depl { Key: "kubernetes.io/arch", Operator: corev1.NodeSelectorOpIn, - Values: []string{"amd64", "arm64"}, + Values: []string{"amd64", "arm64", "s390x"}, }, }, } diff --git a/controllers/testdata/servingruntime_controller.golden b/controllers/testdata/servingruntime_controller.golden index d2e1e2e1..fcef4966 100644 --- a/controllers/testdata/servingruntime_controller.golden +++ b/controllers/testdata/servingruntime_controller.golden @@ -38,6 +38,7 @@ spec: values: - amd64 - arm64 + - s390x containers: - command: - /opt/app/mlserver-adapter @@ -292,6 +293,7 @@ spec: values: - amd64 - arm64 + - s390x containers: - command: - /opt/app/mlserver-adapter @@ -542,6 +544,7 @@ spec: values: - amd64 - arm64 + - s390x containers: - env: - name: REST_PROXY_LISTEN_PORT @@ -814,6 +817,7 @@ spec: values: - amd64 - arm64 + - s390x containers: - command: - /opt/app/mlserver-adapter @@ -1061,6 +1065,7 @@ spec: values: - amd64 - arm64 + - s390x containers: - command: - /opt/app/ovms-adapter @@ -1300,6 +1305,7 @@ spec: values: - amd64 - arm64 + - s390x containers: - command: - /opt/app/torchserve-adapter @@ -1542,6 +1548,7 @@ spec: values: - amd64 - arm64 + - s390x containers: - command: - /opt/app/triton-adapter @@ -1799,6 +1806,7 @@ spec: values: - amd64 - arm64 + - s390x containers: - env: - name: MODEL_DIRECTORY_PATH