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

Add support for configurable MM_Payload_Processor environment variable #339

Merged
merged 5 commits into from
Mar 16, 2023

Conversation

RobGeada
Copy link
Contributor

@RobGeada RobGeada commented Mar 6, 2023

Motivation

In order to integrate with the upcoming ModelMesh payload processing feature, the MM_PAYLOAD_PROCESSOR environment variable within the ModelMesh image needs to point at the endpoint of the payload processing service within the cluster. By setting this as a variable set in the config.yaml, it allows for a variety of payload processing or logging services to be plugged in via the deployment manifest.

Modifications

  • Added PayloadProcessor field to the controllers/mmesh/modelmesh.go Deployment struct
  • Added PayloadProcessor field to the pkg/config/config.go Config struct
  • Added default setting of this field to an empty string within pkg/config/config.go
  • Added functions in controllers/suite_text.go to load a config file that specifies the Payload processor
    • these tests ensure the default value of MM_PAYLOAD_PROCESSOR is empty, while it receives the correct value if such a field is present in the config yaml file

Result

  • Ability to set MM_PAYLOAD_PROCESSOR env variable via config.yaml
  • If no such variable is set, the only effect is the ModelMesh image receives an empty env var

Resolves #284

@kserve-oss-bot kserve-oss-bot requested review from pvaneck and Tomcli March 6, 2023 13:31
@RobGeada RobGeada force-pushed the PayloadProcessorEndpointConfig branch from 07c0184 to ccac775 Compare March 6, 2023 13:34
Signed-off-by: robgeada <rob@geada.net>
Signed-off-by: robgeada <rob@geada.net>
@RobGeada RobGeada force-pushed the PayloadProcessorEndpointConfig branch from 1741855 to ab45d5c Compare March 9, 2023 14:40
@ckadner ckadner requested review from njhill, ckadner and rafvasq and removed request for pvaneck and Tomcli March 11, 2023 01:31
Copy link
Member

@njhill njhill left a comment

Choose a reason for hiding this comment

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

Thanks @RobGeada, just a couple of comments

config/internal/base/deployment.yaml.tmpl Outdated Show resolved Hide resolved
config/internal/base/deployment.yaml.tmpl Outdated Show resolved Hide resolved
controllers/modelmesh/modelmesh.go Show resolved Hide resolved
@RobGeada
Copy link
Contributor Author

@njhill, comments addressed!

Copy link
Member

@njhill njhill left a comment

Choose a reason for hiding this comment

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

Thanks @RobGeada, see inline comment, and also you need to add Signed-off-by to your latest commit so that the DCO check passes.

config/internal/base/deployment.yaml.tmpl Outdated Show resolved Hide resolved
Signed-off-by: robgeada <rob@geada.net>
@RobGeada RobGeada force-pushed the PayloadProcessorEndpointConfig branch from 929d822 to 5e529ad Compare March 15, 2023 15:12
Signed-off-by: robgeada <rob@geada.net>
Copy link
Member

@njhill njhill left a comment

Choose a reason for hiding this comment

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

Thanks @RobGeada, LGTM!

@kserve-oss-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: njhill, RobGeada

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@njhill
Copy link
Member

njhill commented Mar 16, 2023

/lgtm

@kserve-oss-bot kserve-oss-bot merged commit c666dfb into kserve:main Mar 16, 2023
ckadner added a commit to ckadner/modelmesh-serving that referenced this pull request Mar 16, 2023
Signed-off-by: Christian Kadner <ckadner@us.ibm.com>
VedantMahabaleshwarkar pushed a commit to VedantMahabaleshwarkar/modelmesh-serving that referenced this pull request Mar 20, 2023
kserve#339)

#### Motivation
In order to integrate with the upcoming [ModelMesh payload processing feature](kserve/modelmesh#84 (comment)), the MM_PAYLOAD_PROCESSOR environment variable within the ModelMesh image needs to point at the endpoint of the payload processing service within the cluster. By setting this as a variable set in the config.yaml, it allows for a variety of payload processing or logging services to be plugged in via the deployment manifest.

#### Modifications

- Added PayloadProcessor field to the `controllers/mmesh/modelmesh.go` Deployment struct
- Added PayloadProcessor field to the `pkg/config/config.go` Config struct
- Added default setting of this field to an empty string within `pkg/config/config.go` 
- Added functions in `controllers/suite_text.go` to load a config file that specifies the Payload processor
    - these tests ensure the default value of `MM_PAYLOAD_PROCESSOR` is empty, while it receives the correct value if such a field is present in the config yaml file 

#### Result
- Ability to set MM_PAYLOAD_PROCESSOR env variable via config.yaml
- If no such variable is set, the only effect is the ModelMesh image receives an empty env var

Signed-off-by: robgeada <rob@geada.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved enhancement New feature or request lgtm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Payload logging/events
4 participants