sky-uk / kfp-operator

https://sky-uk.github.io/kfp-operator
BSD 3-Clause "New" or "Revised" License
15 stars 2 forks source link

Argo Events Webhook to publish run completion events to eventbus (Step 1) #356

Closed grahamia closed 2 months ago

grahamia commented 2 months ago

Overview

Currently the provider sensor (possibly in a provider namespace) pushes directly to the eventbus with the KFP Operator System namespace. As a step towards securing this activity move to a Argo event webhook eventsource/sensor to push indirectly.

Technical Details

New Argo event source webhook to be deployed to KFP Operator System namespace. New Sensor off the webhook eventsource which has a trigger to push to the NATS eventbus (which already exists) on events topic. Change provider sensor to trigger http call (rather than current NATs trigger) to webhook passing same RunCompletionEvent message body.

Message body contents to be received by the webhook, message out onto the eventbus should match this:

{
    "subject": "events",
    "body": {
        "specversion": "1.0",
        "id": "62666564353437382d396566632d343832642d623235302d353164313130363435333032",
        "source": "vai",
        "type": "org.kubeflow.pipelines.run-completion",
        "datacontenttype": "application/json",
        "data": {
            "pipelineName": "some-pipeline",
            "provider": "vai",
            "runConfigurationName": "some-runconfiguration",
            "runId": "run-31eab1",
            "runName": "some-run-mcsmf",
            "servingModelArtifacts": [
                {
                    "location": "gs://project/my-bucket/some-pipeline/serving/1725274689",
                    "name": "pushed_model"
                }
            ],
            "status": "succeeded"
        }
    }
}

Current Architecture

image

After Architecture

image

No specific testing here as it is all templating within Argo Events, issues should be caught in the current e2e event monitoring.

Acceptance Criteria

Eventing feedback should function as currently with no change