-
Notifications
You must be signed in to change notification settings - Fork 981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ingress class name configuration #2049
Conversation
Hi @pradithya. Thanks for your PR. I'm waiting for a kserve member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: Pradithya Aria <pradithya.pura@go-jek.com>
e56675d
to
64b7cf0
Compare
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pradithya for the contribution!
@@ -190,7 +190,8 @@ func createRawIngress(scheme *runtime.Scheme, isvc *v1beta1api.InferenceService, | |||
Annotations: isvc.Annotations, | |||
}, | |||
Spec: netv1.IngressSpec{ | |||
Rules: rules, | |||
IngressClassName: ingressConfig.IngressClassName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens when IngressClassName
is nil?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's nil
all IngressClassName will be empty and will use default ingress in the cluster (https://kubernetes.io/docs/concepts/services-networking/ingress/#default-ingress-class) . In GKE case it will use create Google Ingress. But essentially it will behave the same as existing behaviour.
If inference service owner want to use specific ingress then they'll have to add ingress class annotation (kubernetes.io/ingress.class)
LocalGateway string `json:"localGateway,omitempty"` | ||
LocalGatewayServiceName string `json:"localGatewayService,omitempty"` | ||
IngressDomain string `json:"ingressDomain,omitempty"` | ||
IngressClassName *string `json:"ingressClassName,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can default the IngressClassName
to istio
and add a comment that only for RawDeployment
we allow other ingress option currently.
Let's set the default to the config and the test config, add a test case without using the ingress class annotation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated istio
as default ingress class name. We'll need to add the istio ingressClass
creation (https://istio.io/latest/docs/tasks/traffic-management/ingress/kubernetes-ingress/#specifying-ingressclass) in the documentation since it's not created by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the test too
Signed-off-by: Pradithya Aria <pradithya.pura@go-jek.com>
Signed-off-by: Pradithya Aria <pradithya.pura@go-jek.com>
PR for doc update kserve/website#113 |
Signed-off-by: Pradithya Aria <pradithya.pura@go-jek.com>
Signed-off-by: Pradithya Aria <pradithya.pura@go-jek.com>
Signed-off-by: Pradithya Aria <pradithya.pura@go-jek.com>
Signed-off-by: Pradithya Aria <pradithya.pura@go-jek.com>
The last e2e fails are unrelated to the PR
|
/retest |
@yuzisun Ready to be reviewed again |
@@ -35,7 +35,6 @@ def test_raw_deployment_kserve(): | |||
service_name = "raw-sklearn" | |||
annotations = dict() | |||
annotations['serving.kserve.io/deploymentMode'] = 'RawDeployment' | |||
annotations['kubernetes.io/ingress.class'] = 'istio' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this annotation from test as it causes some errors:
annotations.kubernetes.io/ingress.class: Invalid value: \"istio\": can not be set when the class field is also set
Somehow the cluster or istio rejects when both ingressClassName
and annotations.kubernetes.io/ingress.class
are being set.
Thanks @pradithya ! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pradithya, yuzisun The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
To allow selecting specific ingress controller when using RawDeployment
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #2048
Type of changes
Please delete options that are not relevant.
Feature/Issue validation/testing:
Run the controller with and without ingress class name in cluster and create inference service
Logs
Ingress generated when ingress class name is set to "istio"
Checklist:
Release note: