...

Text file src/k8s.io/api/admission/v1/generated.proto

Documentation: k8s.io/api/admission/v1

     1/*
     2Copyright The Kubernetes Authors.
     3
     4Licensed under the Apache License, Version 2.0 (the "License");
     5you may not use this file except in compliance with the License.
     6You may obtain a copy of the License at
     7
     8    http://www.apache.org/licenses/LICENSE-2.0
     9
    10Unless required by applicable law or agreed to in writing, software
    11distributed under the License is distributed on an "AS IS" BASIS,
    12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13See the License for the specific language governing permissions and
    14limitations under the License.
    15*/
    16
    17
    18// This file was autogenerated by go-to-protobuf. Do not edit it manually!
    19
    20syntax = "proto2";
    21
    22package k8s.io.api.admission.v1;
    23
    24import "k8s.io/api/authentication/v1/generated.proto";
    25import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
    26import "k8s.io/apimachinery/pkg/runtime/generated.proto";
    27import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
    28
    29// Package-wide variables from generator "generated".
    30option go_package = "k8s.io/api/admission/v1";
    31
    32// AdmissionRequest describes the admission.Attributes for the admission request.
    33message AdmissionRequest {
    34  // UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are
    35  // otherwise identical (parallel requests, requests when earlier requests did not modify etc)
    36  // The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.
    37  // It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.
    38  optional string uid = 1;
    39
    40  // Kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)
    41  optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind kind = 2;
    42
    43  // Resource is the fully-qualified resource being requested (for example, v1.pods)
    44  optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource resource = 3;
    45
    46  // SubResource is the subresource being requested, if any (for example, "status" or "scale")
    47  // +optional
    48  optional string subResource = 4;
    49
    50  // RequestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale).
    51  // If this is specified and differs from the value in "kind", an equivalent match and conversion was performed.
    52  //
    53  // For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of
    54  // `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
    55  // an API request to apps/v1beta1 deployments would be converted and sent to the webhook
    56  // with `kind: {group:"apps", version:"v1", kind:"Deployment"}` (matching the rule the webhook registered for),
    57  // and `requestKind: {group:"apps", version:"v1beta1", kind:"Deployment"}` (indicating the kind of the original API request).
    58  //
    59  // See documentation for the "matchPolicy" field in the webhook configuration type for more details.
    60  // +optional
    61  optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind requestKind = 13;
    62
    63  // RequestResource is the fully-qualified resource of the original API request (for example, v1.pods).
    64  // If this is specified and differs from the value in "resource", an equivalent match and conversion was performed.
    65  //
    66  // For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of
    67  // `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
    68  // an API request to apps/v1beta1 deployments would be converted and sent to the webhook
    69  // with `resource: {group:"apps", version:"v1", resource:"deployments"}` (matching the resource the webhook registered for),
    70  // and `requestResource: {group:"apps", version:"v1beta1", resource:"deployments"}` (indicating the resource of the original API request).
    71  //
    72  // See documentation for the "matchPolicy" field in the webhook configuration type.
    73  // +optional
    74  optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource requestResource = 14;
    75
    76  // RequestSubResource is the name of the subresource of the original API request, if any (for example, "status" or "scale")
    77  // If this is specified and differs from the value in "subResource", an equivalent match and conversion was performed.
    78  // See documentation for the "matchPolicy" field in the webhook configuration type.
    79  // +optional
    80  optional string requestSubResource = 15;
    81
    82  // Name is the name of the object as presented in the request.  On a CREATE operation, the client may omit name and
    83  // rely on the server to generate the name.  If that is the case, this field will contain an empty string.
    84  // +optional
    85  optional string name = 5;
    86
    87  // Namespace is the namespace associated with the request (if any).
    88  // +optional
    89  optional string namespace = 6;
    90
    91  // Operation is the operation being performed. This may be different than the operation
    92  // requested. e.g. a patch can result in either a CREATE or UPDATE Operation.
    93  optional string operation = 7;
    94
    95  // UserInfo is information about the requesting user
    96  optional k8s.io.api.authentication.v1.UserInfo userInfo = 8;
    97
    98  // Object is the object from the incoming request.
    99  // +optional
   100  optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 9;
   101
   102  // OldObject is the existing object. Only populated for DELETE and UPDATE requests.
   103  // +optional
   104  optional k8s.io.apimachinery.pkg.runtime.RawExtension oldObject = 10;
   105
   106  // DryRun indicates that modifications will definitely not be persisted for this request.
   107  // Defaults to false.
   108  // +optional
   109  optional bool dryRun = 11;
   110
   111  // Options is the operation option structure of the operation being performed.
   112  // e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be
   113  // different than the options the caller provided. e.g. for a patch request the performed
   114  // Operation might be a CREATE, in which case the Options will a
   115  // `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.
   116  // +optional
   117  optional k8s.io.apimachinery.pkg.runtime.RawExtension options = 12;
   118}
   119
   120// AdmissionResponse describes an admission response.
   121message AdmissionResponse {
   122  // UID is an identifier for the individual request/response.
   123  // This must be copied over from the corresponding AdmissionRequest.
   124  optional string uid = 1;
   125
   126  // Allowed indicates whether or not the admission request was permitted.
   127  optional bool allowed = 2;
   128
   129  // Result contains extra details into why an admission request was denied.
   130  // This field IS NOT consulted in any way if "Allowed" is "true".
   131  // +optional
   132  optional k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 3;
   133
   134  // The patch body. Currently we only support "JSONPatch" which implements RFC 6902.
   135  // +optional
   136  optional bytes patch = 4;
   137
   138  // The type of Patch. Currently we only allow "JSONPatch".
   139  // +optional
   140  optional string patchType = 5;
   141
   142  // AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
   143  // MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with
   144  // admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
   145  // the admission webhook to add additional context to the audit log for this request.
   146  // +optional
   147  map<string, string> auditAnnotations = 6;
   148
   149  // warnings is a list of warning messages to return to the requesting API client.
   150  // Warning messages describe a problem the client making the API request should correct or be aware of.
   151  // Limit warnings to 120 characters if possible.
   152  // Warnings over 256 characters and large numbers of warnings may be truncated.
   153  // +optional
   154  repeated string warnings = 7;
   155}
   156
   157// AdmissionReview describes an admission review request/response.
   158message AdmissionReview {
   159  // Request describes the attributes for the admission request.
   160  // +optional
   161  optional AdmissionRequest request = 1;
   162
   163  // Response describes the attributes for the admission response.
   164  // +optional
   165  optional AdmissionResponse response = 2;
   166}
   167

View as plain text