-
Notifications
You must be signed in to change notification settings - Fork 500
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 event in webhook #2305
Add event in webhook #2305
Conversation
Co-Authored-By: weekface <weekface@gmail.com>
pkg/webhook/pod/pods.go
Outdated
} | ||
|
||
const ( | ||
stsControllerServiceAccounts = "system:serviceaccount:kube-system:statefulset-controller" | ||
podDeleteMsgPattern = "pod[%s] deleted" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add namespace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the namespace here is not necessary as the event belongs to a certain tidbcluster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then add tc info?
Is the tc info already shown in the event?
Co-Authored-By: DanielZhangQD <36026334+DanielZhangQD@users.noreply.github.com>
Co-Authored-By: DanielZhangQD <36026334+DanielZhangQD@users.noreply.github.com>
…-operator into add_event_in_webhook
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
Your auto merge job has been accepted, waiting for:
|
cherry pick to release-1.1 in PR #2311 |
What problem does this PR solve?
Add event in webhook before the pod is admitted to delete. It would help us know the tidbcluster running process when pod admissionwebhook is enabled.
Related changes
Does this PR introduce a user-facing change?: