Skip to content

Commit

Permalink
Adding podaffinity and resourcerequirments to IG Spec (kserve#2711)
Browse files Browse the repository at this point in the history
* Adding podaffinity and resourcerequirments to IG Spec

Signed-off-by: rachitchauhan43 <[email protected]>

* Marking Resources and Affinity as optional

Signed-off-by: rachitchauhan43 <[email protected]>

* Adding first test for ig controller.

Signed-off-by: rachitchauhan43 <[email protected]>

* Adding more tests for ig controller.

Signed-off-by: rachitchauhan43 <[email protected]>

* Adding more tests for ig controller.

Signed-off-by: rachitchauhan43 <[email protected]>

* Adding more tests for ig controller.

Signed-off-by: rachitchauhan43 <[email protected]>

* Addressing review comments

Signed-off-by: rachitchauhan43 <[email protected]>

* Removing commented code

Signed-off-by: rachitchauhan43 <[email protected]>

* addressing review comments

Signed-off-by: rachitchauhan43 <[email protected]>

---------

Signed-off-by: rachitchauhan43 <[email protected]>
  • Loading branch information
rachitchauhan43 authored Mar 4, 2023
1 parent c24ab6d commit aed4d5b
Show file tree
Hide file tree
Showing 8 changed files with 1,369 additions and 11 deletions.
373 changes: 373 additions & 0 deletions config/crd/serving.kserve.io_inferencegraphs.yaml

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions pkg/apis/serving/v1alpha1/inference_graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package v1alpha1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/pkg/apis"
duckv1 "knative.dev/pkg/apis/duck/v1"
Expand Down Expand Up @@ -45,6 +46,10 @@ type InferenceGraphSpec struct {
// Map of InferenceGraph router nodes
// Each node defines the router which can be different routing types
Nodes map[string]InferenceRouter `json:"nodes"`
// +optional
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// +optional
Affinity *corev1.Affinity `json:"affinity,omitempty" protobuf:"bytes,18,opt,name=affinity"`
}

// InferenceRouterType constant for inference routing types
Expand Down
6 changes: 6 additions & 0 deletions pkg/apis/serving/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ var (
// InferenceGraph Constants
const (
RouterHeadersPropagateEnvVar = "PROPAGATE_HEADERS"
InferenceGraphLabel = "serving.kserve.io/inferencegraph"
)

// TrainedModel Constants
Expand Down
Loading

0 comments on commit aed4d5b

Please sign in to comment.