diff options
| author | Chao Xu <xuchao@google.com> | 2017-05-16 16:26:53 -0700 |
|---|---|---|
| committer | Chao Xu <xuchao@google.com> | 2017-05-16 16:28:35 -0700 |
| commit | 9e0ca10908d9d28e8405e77ff57f36e85e753fb8 (patch) | |
| tree | bca8be733abdca605f9fdd15180ca1d72593d91b | |
| parent | 0ef9901f1510b8230aa2b6817f5dc04948804f97 (diff) | |
t paddress comments
| -rw-r--r-- | contributors/design-proposals/dynamic-admission-control-configuration.md | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/contributors/design-proposals/dynamic-admission-control-configuration.md b/contributors/design-proposals/dynamic-admission-control-configuration.md index e0e19556..37af05ab 100644 --- a/contributors/design-proposals/dynamic-admission-control-configuration.md +++ b/contributors/design-proposals/dynamic-admission-control-configuration.md @@ -96,36 +96,38 @@ type ExternalAdmissionHook struct { // Operations describes what operations on what resources/subresources the webhook cares about. // The webhook cares about an operation if it matches any Operaiton. - Operations []Operation + Operations []OperationsPerResource // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - // allowed values are Ignore, Fail. Default value is Fail FailurePolicy FailurePolicyType } -type Operation struct { - // Operations is the list of operations this hook will be invoked on - Create, Update, or * - // for all operations. Defaults to '*'. - type OperationType - - // Resource describes the group, resource and subresources. Defaults to all groups, resources, subresources. +type OperationsPerResource struct { + // Resource describes the group, resource and subresource. Defaults to all groups, resources, subresources. Resouce Resource + + // Verbs is the list of verbs this hook will be invoked on - POST, PUT, or * + // for all operations. Defaults to '*'. + Verbs []OperationType } type OperationType string const ( All OperationType = "*" - Create OperationType= "Create" - Update OperationType= "Update" + Create OperationType= "POST" + Update OperationType= "PUT" ) type Resource struct { // Group is the API group the resource belongs to. '*' is all groups. Group string + // Version is the API version of the resource. '*' is all versions. + Version string // Resource is the name of the resource. '*' is all resoures. Resource string - // Subresources is a list of subresources. '*' is all subresources. + // Subresource is the name of the subresource. '*' is all subresources. Empty string means no subresource. Subresource string } |
