Matthias Andreas Benkard | 832a54e | 2019-01-29 09:27:38 +0100 | [diff] [blame^] | 1 | /* |
| 2 | Copyright The Kubernetes Authors. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | |
| 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! |
| 19 | |
| 20 | syntax = 'proto2'; |
| 21 | |
| 22 | package k8s.io.api.admission.v1beta1; |
| 23 | |
| 24 | import "k8s.io/api/authentication/v1/generated.proto"; |
| 25 | import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; |
| 26 | import "k8s.io/apimachinery/pkg/runtime/generated.proto"; |
| 27 | import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; |
| 28 | import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; |
| 29 | |
| 30 | // Package-wide variables from generator "generated". |
| 31 | option go_package = "v1beta1"; |
| 32 | |
| 33 | // AdmissionRequest describes the admission.Attributes for the admission request. |
| 34 | message AdmissionRequest { |
| 35 | // UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are |
| 36 | // otherwise identical (parallel requests, requests when earlier requests did not modify etc) |
| 37 | // The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request. |
| 38 | // It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging. |
| 39 | optional string uid = 1; |
| 40 | |
| 41 | // Kind is the type of object being manipulated. For example: Pod |
| 42 | optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind kind = 2; |
| 43 | |
| 44 | // Resource is the name of the resource being requested. This is not the kind. For example: pods |
| 45 | optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource resource = 3; |
| 46 | |
| 47 | // SubResource is the name of the subresource being requested. This is a different resource, scoped to the parent |
| 48 | // resource, but it may have a different kind. For instance, /pods has the resource "pods" and the kind "Pod", while |
| 49 | // /pods/foo/status has the resource "pods", the sub resource "status", and the kind "Pod" (because status operates on |
| 50 | // pods). The binding resource for a pod though may be /pods/foo/binding, which has resource "pods", subresource |
| 51 | // "binding", and kind "Binding". |
| 52 | // +optional |
| 53 | optional string subResource = 4; |
| 54 | |
| 55 | // Name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and |
| 56 | // rely on the server to generate the name. If that is the case, this method will return the empty string. |
| 57 | // +optional |
| 58 | optional string name = 5; |
| 59 | |
| 60 | // Namespace is the namespace associated with the request (if any). |
| 61 | // +optional |
| 62 | optional string namespace = 6; |
| 63 | |
| 64 | // Operation is the operation being performed |
| 65 | optional string operation = 7; |
| 66 | |
| 67 | // UserInfo is information about the requesting user |
| 68 | optional k8s.io.api.authentication.v1.UserInfo userInfo = 8; |
| 69 | |
| 70 | // Object is the object from the incoming request prior to default values being applied |
| 71 | // +optional |
| 72 | optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 9; |
| 73 | |
| 74 | // OldObject is the existing object. Only populated for UPDATE requests. |
| 75 | // +optional |
| 76 | optional k8s.io.apimachinery.pkg.runtime.RawExtension oldObject = 10; |
| 77 | } |
| 78 | |
| 79 | // AdmissionResponse describes an admission response. |
| 80 | message AdmissionResponse { |
| 81 | // UID is an identifier for the individual request/response. |
| 82 | // This should be copied over from the corresponding AdmissionRequest. |
| 83 | optional string uid = 1; |
| 84 | |
| 85 | // Allowed indicates whether or not the admission request was permitted. |
| 86 | optional bool allowed = 2; |
| 87 | |
| 88 | // Result contains extra details into why an admission request was denied. |
| 89 | // This field IS NOT consulted in any way if "Allowed" is "true". |
| 90 | // +optional |
| 91 | optional k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 3; |
| 92 | |
| 93 | // The patch body. Currently we only support "JSONPatch" which implements RFC 6902. |
| 94 | // +optional |
| 95 | optional bytes patch = 4; |
| 96 | |
| 97 | // The type of Patch. Currently we only allow "JSONPatch". |
| 98 | // +optional |
| 99 | optional string patchType = 5; |
| 100 | } |
| 101 | |
| 102 | // AdmissionReview describes an admission review request/response. |
| 103 | message AdmissionReview { |
| 104 | // Request describes the attributes for the admission request. |
| 105 | // +optional |
| 106 | optional AdmissionRequest request = 1; |
| 107 | |
| 108 | // Response describes the attributes for the admission response. |
| 109 | // +optional |
| 110 | optional AdmissionResponse response = 2; |
| 111 | } |
| 112 | |