Skip to content

Conversation

@shmuelk
Copy link
Contributor

@shmuelk shmuelk commented Nov 30, 2025

What type of PR is this?
/kind feature

What this PR does / why we need it:
This PR removes the need to configure the new V2 DataLayer from code. It extends the existing textual configuration enabling the configuration of DataSources and their respective Extractors.

Does this PR introduce a user-facing change?:

- The Datalayer is now configured via the standard EPP text based configuration.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. labels Nov 30, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shmuelk
Once this PR has been reviewed and has the lgtm label, please assign danehans for approval. For more information see the 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

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 30, 2025
@netlify
Copy link

netlify bot commented Nov 30, 2025

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit 78d915c
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/6931b3ef5886f70008a1a278
😎 Deploy Preview https://deploy-preview-1914--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 30, 2025
@shmuelk shmuelk changed the title WIP: Extent textual configuration support with the Datalayer's configuration Extend textual configuration support with the Datalayer's configuration Dec 1, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 1, 2025
func (cfg EndpointPickerConfig) String() string {
return fmt.Sprintf(
"{Plugins: %v, SchedulingProfiles: %v, FeatureGates: %v, SaturationDetector: %v}",
"{Plugins: %v, SchedulingProfiles: %v, Data: %v, FeatureGates: %v, SaturationDetector: %v}",
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: put feature gates first?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

The saturationDetector section configures the saturation detector, which is used to determine if special
action needs to eb taken due to the system being overloaded or saturated. This section is described in more detail in the section [Saturation Detector configuration](#saturation-detector-configuration)
The data section configures the data layer, which is used to gather metrics and other data used in making scheduling decisions.
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
The data section configures the data layer, which is used to gather metrics and other data used in making scheduling decisions.
The `data` section configures the data layer, which is used to gather information (such as metrics) used in making scheduling decisions.

Copy link
Contributor

Choose a reason for hiding this comment

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

In general, may want to use backticks to mark section names explicitly (i.e., data and not data)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

## Data Layer configuration

The Data Layer collects metrics and other data used in scheduling decisions made by the various configured
filters and plugins. The exact data collected varies by the DataSource and Extractors configured. The basic ones
Copy link
Contributor

Choose a reason for hiding this comment

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

filters is specific to scheduling but plugins is generic. Maybe use scheduling plugins as the term?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment on lines 341 to 342
filters and plugins. The exact data collected varies by the DataSource and Extractors configured. The basic ones
collect Prometheus metrics from the Model Servers in the InferencePool.
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
filters and plugins. The exact data collected varies by the DataSource and Extractors configured. The basic ones
collect Prometheus metrics from the Model Servers in the InferencePool.
filters and plugins. The exact data collected varies by the DataSource and Extractors configured. The baseline
provided in GAIE collect Prometheus metrics from the Model Servers in the InferencePool.

nit: do we want to reference MSP doc here? Not required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so. If at all it should be mentioned in more detailed Datalayer documentation

filters and plugins. The exact data collected varies by the DataSource and Extractors configured. The basic ones
collect Prometheus metrics from the Model Servers in the InferencePool.

The Data Layer is configured via the data section of the overall configuration. It has the following form:
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
The Data Layer is configured via the data section of the overall configuration. It has the following form:
The Data Layer is configured via the `data` section of the overall configuration. It has the following form:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Each entry in the sources list has the following fields:

- *pluginRef* is a reference to the name of the plugin instance to be used.
- *extractors* specifies the list of the extractor plugin instances, by name, to be used with this DataSource.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:
I find having a required pluginRef to name the data source but no pluginRef for extractors somewhat inconsistent. If we can name extractors directly, can't we do the same for datasource... Logically map[string][]string

@elevran
Copy link
Contributor

elevran commented Dec 2, 2025

/lgtm
left some questions/style suggestions that you may wish to address (or not), so unhold at your discretion

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 2, 2025
@elevran
Copy link
Contributor

elevran commented Dec 2, 2025

/hold

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Dec 2, 2025
@shmuelk
Copy link
Contributor Author

shmuelk commented Dec 2, 2025

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 2, 2025
@elevran
Copy link
Contributor

elevran commented Dec 2, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 2, 2025
return "{" + result + "}"
}

// DataLayerConfig contains the configuration of the V2 DataLayer feature
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not this PR, but we need to figure out what we want to do with this config API. It's essentially a full fledged API, but not a CRD, and so is never 'applied' to k8s, and the control plane has no knowledge of it.

We essentially treat this just like a normal config file, but the yaml, and the way its structured in the code base makes it look like a CRD. I feel that if I was a newcomer, I would expect this file to be updatable and a part of the k8s ecosystem, which it is not.

Not a burning need, and again, not this PR. Just something to think about.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Originally the configuration wasn't a pseudo CRD. @ahg-g requested that I use the K8S machinery to parse the YAML text.

This can be backed off if desired. We simply need to come to a decision.

return "{" + result + "}"
}

// DataLayerConfig contains the configuration of the V2 DataLayer feature
Copy link
Collaborator

Choose a reason for hiding this comment

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

super nit: remove v2, I dont think we have any configuration of the v1 data layer, so once v1 is finished implementation, its the only data layer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


func loadDataLayerConfig(rawDataConfig *configapi.DataLayerConfig, rawFeatureGates configapi.FeatureGates, handle plugins.Handle) (*datalayer.Config, error) {
featureGates := loadFeatureConfig(rawFeatureGates)
if !featureGates[datalayer.FeatureGate] {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we return an error if the datalayer (or any feature) is configured with plugins but the feature gate is closed? A user may want to know about that early on.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a check and an error.

@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 4, 2025
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants