-
Notifications
You must be signed in to change notification settings - Fork 501
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
Refactor Admission Webhook templates and values #1832
Changes from 4 commits
d7692ed
15e4dd3
f08ae11
7fd2127
1d9f88f
8142828
6c553e4
57d30c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,30 +185,27 @@ admissionWebhook: | |
## if admissionWebhook.create and admissionWebhook.hooksEnabled.pods are both enabled, | ||
## The pre-delete-job would delete the validationWebhookConfiguration using this image | ||
jobImage: "bitnami/kubectl:latest" | ||
hooksEnabled: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hooksEnabled is confusing, remove it and use |
||
## validation webhook would check the given request for the specific resource and operation | ||
validation: | ||
## statefulsets hook would check requests for updating tidbcluster's statefulsets | ||
## If enabled it, the statefulsets of tidbcluseter would update in partition by tidbcluster's annotation | ||
statefulSets: false | ||
## pods hook would check requests for creating and deleting tidbcluster's pods | ||
## if enabled it, the pods of tidbcluster would safely created or deleted by webhook instead of controller | ||
pods: true | ||
## validating hook validates the correctness of the resources under pingcap.com group | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This description needs to change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any advice? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean you change the field name but the name in the description is not changed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good catch, updated. |
||
validating: false | ||
pingcapResources: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we support There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess the resource validating is not verified or ready yet. |
||
## mutation webhook would mutate the given request for the specific resource and operation | ||
mutation: | ||
## defaulting hook set default values for the the resources under pingcap.com group | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
defaulting: true | ||
pingcapResources: true | ||
## failurePolicy are applied to ValidatingWebhookConfiguration which affect tidb-admission-webhook | ||
## refer to https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#failure-policy | ||
failurePolicy: | ||
## deletePod Webhook would check the deleting request of tidbcluster pod and the failurePolicy is recommended as Fail | ||
deletePod: Fail | ||
## createPod Webhook would check the creating request of tidbcluster pod and the failurePolicy is recommended as Ignore | ||
createPod: Ignore | ||
## updateStatefulSet Webhook would check the updating request of tidbcluster statefulset and the failurePolicy is recommended as Ignore | ||
updateStatefulSet: Ignore | ||
## validation hook validates the correctness of the resources under pingcap.com group | ||
validating: Ignore | ||
## defaulting hook set default values for the the resources under pingcap.com group | ||
defaulting: Ignore | ||
## the validation webhook would check the request of the given resources, and the failurePolicy is recommended as Fail | ||
validation: Fail | ||
## the mutation webhook would mutate th erequest of the given resources, and the failurePolicy is recommended as Ignore | ||
Yisaer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
mutation: Ignore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the failurePlicy, I tend to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IF webhook is down, we cannot even create pods? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated @DanielZhangQD |
||
## tidb-admission-webhook deployed as kubernetes apiservice server | ||
## refer to https://github.com/openshift/generic-admission-server | ||
apiservice: | ||
|
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.
As ChaosMesh released, tidbcluster is not the only resources under pingcap group.