eventing icon indicating copy to clipboard operation
eventing copied to clipboard

Add env variable to `Job` created by `JobSink` for the file path to the event

Open Cali0707 opened this issue 1 year ago • 5 comments

Problem With the current way that a Job is created in the JobSink, there is some logic that chooses which VolumeMount to use to mount the event. As such, the path that the event is mounted at is not guaranteed to be the same for every Job created by a JobSink.

The JobSink should add an env variable K_EVENT_PATH into the container that points to the mount path of the volume which is chosen, making it easier to consume the event within the code of the job.

Here, we can inject the env variable before creating the job based on where the jobsink-event volume directory points to https://github.com/knative/eventing/blob/f9156c8874e40fdf8f11b53d11de09d2b7e51b0d/cmd/jobsink/main.go#L292-L299

Persona: Which persona is this feature for? Developers

Exit Criteria A measurable (binary) test that would indicate that the problem has been resolved.

Time Estimate (optional): How many developer-days do you think this may take to resolve? 1

Cali0707 avatar Jun 04 '24 17:06 Cali0707

cc @pierDipi - thoughts?

Cali0707 avatar Jun 04 '24 17:06 Cali0707

/good-first-issue

Cali0707 avatar Jun 06 '24 15:06 Cali0707

@Cali0707: This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-good-first-issue command.

In response to this:

/good-first-issue

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-sigs/prow repository.

knative-prow[bot] avatar Jun 06 '24 15:06 knative-prow[bot]

/assign

babugeet avatar Jun 07 '24 10:06 babugeet

@Cali0707 , @pierDipi I would like to work on this issue

babugeet avatar Jun 07 '24 10:06 babugeet

Closing as #7968 is merged

Cali0707 avatar Jul 04 '24 15:07 Cali0707