Skip to content

Commit

Permalink
feat: add S390x support in affinity rule (#503)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
modassarrana89 authored May 28, 2024
1 parent 028f646 commit 31ebe73
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 2 additions & 4 deletions controllers/modelmesh/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,17 +341,15 @@ 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{
MatchExpressions: []corev1.NodeSelectorRequirement{
{
Key: "kubernetes.io/arch",
Operator: corev1.NodeSelectorOpIn,
Values: []string{"amd64", "arm64"},
Values: []string{"amd64", "arm64", "s390x"},
},
},
}
Expand Down
8 changes: 8 additions & 0 deletions controllers/testdata/servingruntime_controller.golden
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ spec:
values:
- amd64
- arm64
- s390x
containers:
- command:
- /opt/app/mlserver-adapter
Expand Down Expand Up @@ -292,6 +293,7 @@ spec:
values:
- amd64
- arm64
- s390x
containers:
- command:
- /opt/app/mlserver-adapter
Expand Down Expand Up @@ -542,6 +544,7 @@ spec:
values:
- amd64
- arm64
- s390x
containers:
- env:
- name: REST_PROXY_LISTEN_PORT
Expand Down Expand Up @@ -814,6 +817,7 @@ spec:
values:
- amd64
- arm64
- s390x
containers:
- command:
- /opt/app/mlserver-adapter
Expand Down Expand Up @@ -1061,6 +1065,7 @@ spec:
values:
- amd64
- arm64
- s390x
containers:
- command:
- /opt/app/ovms-adapter
Expand Down Expand Up @@ -1300,6 +1305,7 @@ spec:
values:
- amd64
- arm64
- s390x
containers:
- command:
- /opt/app/torchserve-adapter
Expand Down Expand Up @@ -1542,6 +1548,7 @@ spec:
values:
- amd64
- arm64
- s390x
containers:
- command:
- /opt/app/triton-adapter
Expand Down Expand Up @@ -1799,6 +1806,7 @@ spec:
values:
- amd64
- arm64
- s390x
containers:
- env:
- name: MODEL_DIRECTORY_PATH
Expand Down

0 comments on commit 31ebe73

Please sign in to comment.