Skip to content
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

introduce service configuration at configmap level #3672

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

spolti
Copy link
Contributor

@spolti spolti commented May 7, 2024

chore: This PR introduces a new configuration in the inferenceservice-config
configMap to enable user to set the service ClusterIP to None to rely on
headless services.
With this configuration, users are enabled to rely on third party balancers
having total control over it.
The reasoning behind opening a new configuration support is to allow it easier
to customize any other important flag at the service creation in the future

What this PR does / why we need it:

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 #

Type of changes
Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Feature/Issue validation/testing:

Please describe the tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.

  • Test A

  • Test B

  • Logs

Special notes for your reviewer:

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Checklist:

  • Have you added unit/e2e tests that prove your fix is effective or that this feature works?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

Release note:


Re-running failed tests

  • /rerun-all - rerun all failed workflows.
  • /rerun-workflow <workflow name> - rerun a specific failed workflow. Only one workflow name can be specified. Multiple /rerun-workflow commands are allowed per comment.

Copy link

oss-prow-bot bot commented May 7, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: spolti
Once this PR has been reviewed and has the lgtm label, please assign yuzisun for approval by writing /assign @yuzisun in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@spolti spolti removed the request for review from ckadner May 7, 2024 18:43
@spolti spolti marked this pull request as draft May 7, 2024 18:43
Comment on lines 88 to 93
type ServiceConfig struct {
// ServiceClusterIPNone is a flag to indicate if the service should have a clusterIP set to None.
// If the DeploymentMode is Raw, the default value for ServiceClusterIPNone is true when the value is absent.
ServiceClusterIPNone *bool `json:"serviceClusterIPNone,omitempty"`
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yuzisun @sivanantha321 any thoughts on this?

@spolti spolti force-pushed the CipNone branch 5 times, most recently from 07d380b to 1d8c407 Compare May 7, 2024 20:50
@spolti
Copy link
Contributor Author

spolti commented May 13, 2024

/rerun-all

@spolti spolti marked this pull request as ready for review May 13, 2024 19:38
@spolti
Copy link
Contributor Author

spolti commented May 13, 2024

/hold

@terrytangyuan
Copy link
Member

test-graph is failing. Maybe push empty commits to see if it's flaky.

chore:	This PR introduces a new configuration in the inferenceservice-config
	configMap to enable user to set the service `ClusterIP` to `None` to rely on
	headless services.
	With this configuration, users are enabled to rely on third party balancers
	having total control over it.
	The reasoning behind opening a new configuration support is to allow it easier
	to customize any other important flag at the service creation in the future

Signed-off-by: Spolti <fspolti@redhat.com>
@spolti
Copy link
Contributor Author

spolti commented May 21, 2024

/unhold


# ====================================== SERVICE CONFIGURATION ======================================
# Example
service: |-
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it isn't better to reuse the deploy key, rather than creating a new one just for the Service?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had defined a new option in the config to not mix the configuration purpose, this affects only the service created, for now only Raw.
But in the future, more fields can be easily added here if needed..

service.Spec.ClusterIP = corev1.ClusterIPNone
}
} else if raw {
service.Spec.ClusterIP = corev1.ClusterIPNone
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is a safe default. Clients would need to know how to handle the multiple DNS entries. Also, KServe defaults would diverge from Kubernetes defaults...

Most importantly, I see this as a backwards incompatible change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the default only when raw deployments and the flag is not explicitly set to false. However, it is just a proposal atm, we need to define first the way we will be handling this configuration

@yuzisun @terrytangyuan

Comment on lines +426 to +428
# ServiceClusterIPNone is a flag to indicate if the service should have a clusterIP set to None.
# This is particularly useful for headless services to allow users to use out of the box balancers.
# If the DeploymentMode is Raw, the default value for ServiceClusterIPNone is true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# ServiceClusterIPNone is a flag to indicate if the service should have a clusterIP set to None.
# This is particularly useful for headless services to allow users to use out of the box balancers.
# If the DeploymentMode is Raw, the default value for ServiceClusterIPNone is true
# ServiceClusterIPNone indicates if KServe should create headless services (clusterIP=None).
# If the DeploymentMode is Raw, the default value for ServiceClusterIPNone is true

External LBs is probably just one use case for a headless service. I'd omit such details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants