From 7ec086097807615c2c86ebc6ec59d4ef4af1a13a Mon Sep 17 00:00:00 2001 From: Modassar Rana Date: Tue, 30 Apr 2024 11:37:20 +0530 Subject: [PATCH 1/6] Update runtime.go Added s390x in node affinity Signed-off-by: Modassar Rana --- controllers/modelmesh/runtime.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/controllers/modelmesh/runtime.go b/controllers/modelmesh/runtime.go index 2ea42dd1..70e77a2c 100644 --- a/controllers/modelmesh/runtime.go +++ b/controllers/modelmesh/runtime.go @@ -342,8 +342,7 @@ func (m *Deployment) addPassThroughPodFieldsToDeployment(deployment *appsv1.Depl 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) + // and "s390x" deployment.Spec.Template.Spec.NodeSelector = rts.NodeSelector deployment.Spec.Template.Spec.Tolerations = rts.Tolerations archNodeSelector := corev1.NodeSelectorTerm{ @@ -351,7 +350,7 @@ func (m *Deployment) addPassThroughPodFieldsToDeployment(deployment *appsv1.Depl { Key: "kubernetes.io/arch", Operator: corev1.NodeSelectorOpIn, - Values: []string{"amd64", "arm64"}, + Values: []string{"amd64", "arm64", "s390x"}, }, }, } From 40b250bba25ac17729fd23ba63fd4ec94da571e0 Mon Sep 17 00:00:00 2001 From: Modassar Rana Date: Tue, 30 Apr 2024 11:38:34 +0530 Subject: [PATCH 2/6] Update servingruntime_controller.golden Added s390x for node affinity Signed-off-by: Modassar Rana --- controllers/testdata/servingruntime_controller.golden | 1 + 1 file changed, 1 insertion(+) diff --git a/controllers/testdata/servingruntime_controller.golden b/controllers/testdata/servingruntime_controller.golden index d2e1e2e1..9397e848 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 From c27c0983bb317c7eba23237ef00fede01d1218a2 Mon Sep 17 00:00:00 2001 From: Modassar Rana Date: Tue, 30 Apr 2024 11:46:05 +0530 Subject: [PATCH 3/6] Update servingruntime_controller.golden Signed-off-by: Modassar Rana --- controllers/testdata/servingruntime_controller.golden | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/controllers/testdata/servingruntime_controller.golden b/controllers/testdata/servingruntime_controller.golden index 9397e848..fcef4966 100644 --- a/controllers/testdata/servingruntime_controller.golden +++ b/controllers/testdata/servingruntime_controller.golden @@ -293,6 +293,7 @@ spec: values: - amd64 - arm64 + - s390x containers: - command: - /opt/app/mlserver-adapter @@ -543,6 +544,7 @@ spec: values: - amd64 - arm64 + - s390x containers: - env: - name: REST_PROXY_LISTEN_PORT @@ -815,6 +817,7 @@ spec: values: - amd64 - arm64 + - s390x containers: - command: - /opt/app/mlserver-adapter @@ -1062,6 +1065,7 @@ spec: values: - amd64 - arm64 + - s390x containers: - command: - /opt/app/ovms-adapter @@ -1301,6 +1305,7 @@ spec: values: - amd64 - arm64 + - s390x containers: - command: - /opt/app/torchserve-adapter @@ -1543,6 +1548,7 @@ spec: values: - amd64 - arm64 + - s390x containers: - command: - /opt/app/triton-adapter @@ -1800,6 +1806,7 @@ spec: values: - amd64 - arm64 + - s390x containers: - env: - name: MODEL_DIRECTORY_PATH From 589b58430b64287d1028c558dd4bd75ffbd2fc52 Mon Sep 17 00:00:00 2001 From: Modassar Rana Date: Wed, 15 May 2024 13:04:51 +0530 Subject: [PATCH 4/6] Update runtime.go Updated comments Signed-off-by: Modassar Rana --- controllers/modelmesh/runtime.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/modelmesh/runtime.go b/controllers/modelmesh/runtime.go index 70e77a2c..c5525f74 100644 --- a/controllers/modelmesh/runtime.go +++ b/controllers/modelmesh/runtime.go @@ -341,8 +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" + // supported architectures are "amd64", "arm64", "s390x" deployment.Spec.Template.Spec.NodeSelector = rts.NodeSelector deployment.Spec.Template.Spec.Tolerations = rts.Tolerations archNodeSelector := corev1.NodeSelectorTerm{ From 40d06891ef6edf20444f2e08b86413708b37ff44 Mon Sep 17 00:00:00 2001 From: Modassar Rana Date: Wed, 15 May 2024 13:07:09 +0530 Subject: [PATCH 5/6] Update runtime.go Signed-off-by: Modassar Rana --- controllers/modelmesh/runtime.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/modelmesh/runtime.go b/controllers/modelmesh/runtime.go index c5525f74..60bfd72d 100644 --- a/controllers/modelmesh/runtime.go +++ b/controllers/modelmesh/runtime.go @@ -341,7 +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", "arm64", "s390x" + // supported architectures are "amd64", "arm64" and "s390x" deployment.Spec.Template.Spec.NodeSelector = rts.NodeSelector deployment.Spec.Template.Spec.Tolerations = rts.Tolerations archNodeSelector := corev1.NodeSelectorTerm{ From 1c1f18819f4bee2669a38f9e08fe3a9a9526a324 Mon Sep 17 00:00:00 2001 From: Christian Kadner Date: Mon, 27 May 2024 16:14:19 -0700 Subject: [PATCH 6/6] lint runtime.go Signed-off-by: Christian Kadner --- controllers/modelmesh/runtime.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/modelmesh/runtime.go b/controllers/modelmesh/runtime.go index 60bfd72d..e7932baa 100644 --- a/controllers/modelmesh/runtime.go +++ b/controllers/modelmesh/runtime.go @@ -341,7 +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", "arm64" and "s390x" + // supported architectures are "amd64", "arm64" and "s390x" deployment.Spec.Template.Spec.NodeSelector = rts.NodeSelector deployment.Spec.Template.Spec.Tolerations = rts.Tolerations archNodeSelector := corev1.NodeSelectorTerm{