Skip to content

apis: add WebHook action and job lifecycle events#183

Open
chuqing1997 wants to merge 1 commit intovolcano-sh:masterfrom
chuqing1997:feat/job-complete-hook
Open

apis: add WebHook action and job lifecycle events#183
chuqing1997 wants to merge 1 commit intovolcano-sh:masterfrom
chuqing1997:feat/job-complete-hook

Conversation

@chuqing1997
Copy link
Copy Markdown

@chuqing1997 chuqing1997 commented Jun 21, 2025

Add support for WebHook action in LifecyclePolicy to enable HTTP callbacks when job state changes. This includes:

  • New Events: JobTerminated, JobCompleted, JobAborted, JobFailed
  • New Action: WebHook with configurable URL, method, headers, body, timeout and retries
  • WebHookConfig struct for webhook configuration
  • Update generated code (deepcopy, clients, etc.)
  • Fix build constraint syntax in hack/tools.go for Go compatibility

This enables users to configure webhook notifications for job completion states through the existing Policies mechanism.

@volcano-sh-bot
Copy link
Copy Markdown
Collaborator

Welcome @chuqing1997!

It looks like this is your first PR to volcano-sh/apis.

Thank you, and welcome to Volcano. 😃

@volcano-sh-bot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign william-wang
You can assign the PR to them by writing /assign @william-wang in a comment when ready.

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

Details 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

@chuqing1997
Copy link
Copy Markdown
Author

/assign @william-wang

@chuqing1997
Copy link
Copy Markdown
Author

chuqing1997 commented Jun 21, 2025

I want to implement the functionality mentioned in the issue of volcano sh/volcano # 4342. Because the Volcano repository relies on the apis repository, I made modifications to the apis first. This is my PR. Please review it.

@chuqing1997 chuqing1997 force-pushed the feat/job-complete-hook branch from 5d87302 to f129152 Compare June 23, 2025 03:06
Add support for WebHook action in LifecyclePolicy to enable HTTP callbacks
when job state changes. This includes:
- New Events: JobTerminated, JobCompleted, JobAborted, JobFailed
- New Action: WebHook with configurable URL, method, headers, body and timeout
- WebHookConfig struct for webhook configuration
- Fix build constraint syntax in hack/tools.go for Go compatibility

This enables users to configure webhook notifications for job completion
states through the existing Policies mechanism.

Signed-off-by: chuqing1997 <[email protected]>
@chuqing1997 chuqing1997 force-pushed the feat/job-complete-hook branch from f129152 to 4513285 Compare June 23, 2025 07:24
@JesseStutler
Copy link
Copy Markdown
Member

JesseStutler commented Jun 23, 2025

I want to implement the functionality mentioned in the issue of volcano sh/volcano # 4342. Because the Volcano repository relies on the apis repository, I made modifications to the apis first. This is my PR. Please review it.

You can replace your go.mod like
volcano-sh/apis => github.com/chuqing1997/apis [your commit id] and then execute go mod tidy first to test in main repo, so it will not block you to test. We will check this PR later

@volcano-sh-bot
Copy link
Copy Markdown
Collaborator

@chuqing1997: PR needs rebase.

Details

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants