Code refactoring for bpa operator
[icn.git] / cmd / bpa-operator / vendor / k8s.io / apiextensions-apiserver / pkg / apis / apiextensions / v1beta1 / generated.proto
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.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1;
23
24 import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
25 import "k8s.io/apimachinery/pkg/runtime/generated.proto";
26 import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
27
28 // Package-wide variables from generator "generated".
29 option go_package = "v1beta1";
30
31 // ConversionRequest describes the conversion request parameters.
32 message ConversionRequest {
33   // `uid` is an identifier for the individual request/response. It allows us to distinguish instances of requests which are
34   // otherwise identical (parallel requests, requests when earlier requests did not modify etc)
35   // The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.
36   // It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.
37   optional string uid = 1;
38
39   // `desiredAPIVersion` is the version to convert given objects to. e.g. "myapi.example.com/v1"
40   optional string desiredAPIVersion = 2;
41
42   // `objects` is the list of CR objects to be converted.
43   repeated k8s.io.apimachinery.pkg.runtime.RawExtension objects = 3;
44 }
45
46 // ConversionResponse describes a conversion response.
47 message ConversionResponse {
48   // `uid` is an identifier for the individual request/response.
49   // This should be copied over from the corresponding AdmissionRequest.
50   optional string uid = 1;
51
52   // `convertedObjects` is the list of converted version of `request.objects` if the `result` is successful otherwise empty.
53   // The webhook is expected to set apiVersion of these objects to the ConversionRequest.desiredAPIVersion. The list
54   // must also has the same size as input list with the same objects in the same order(i.e. equal UIDs and object meta)
55   repeated k8s.io.apimachinery.pkg.runtime.RawExtension convertedObjects = 2;
56
57   // `result` contains the result of conversion with extra details if the conversion failed. `result.status` determines if
58   // the conversion failed or succeeded. The `result.status` field is required and represent the success or failure of the
59   // conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set
60   // `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message`
61   // will be used to construct an error message for the end user.
62   optional k8s.io.apimachinery.pkg.apis.meta.v1.Status result = 3;
63 }
64
65 // ConversionReview describes a conversion request/response.
66 message ConversionReview {
67   // `request` describes the attributes for the conversion request.
68   // +optional
69   optional ConversionRequest request = 1;
70
71   // `response` describes the attributes for the conversion response.
72   // +optional
73   optional ConversionResponse response = 2;
74 }
75
76 // CustomResourceColumnDefinition specifies a column for server side printing.
77 message CustomResourceColumnDefinition {
78   // name is a human readable name for the column.
79   optional string name = 1;
80
81   // type is an OpenAPI type definition for this column.
82   // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
83   optional string type = 2;
84
85   // format is an optional OpenAPI type definition for this column. The 'name' format is applied
86   // to the primary identifier column to assist in clients identifying column is the resource name.
87   // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
88   // +optional
89   optional string format = 3;
90
91   // description is a human readable description of this column.
92   // +optional
93   optional string description = 4;
94
95   // priority is an integer defining the relative importance of this column compared to others. Lower
96   // numbers are considered higher priority. Columns that may be omitted in limited space scenarios
97   // should be given a higher priority.
98   // +optional
99   optional int32 priority = 5;
100
101   // JSONPath is a simple JSON path, i.e. with array notation.
102   optional string JSONPath = 6;
103 }
104
105 // CustomResourceConversion describes how to convert different versions of a CR.
106 message CustomResourceConversion {
107   // `strategy` specifies the conversion strategy. Allowed values are:
108   // - `None`: The converter only change the apiVersion and would not touch any other field in the CR.
109   // - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information is needed for this option.
110   optional string strategy = 1;
111
112   // `webhookClientConfig` is the instructions for how to call the webhook if strategy is `Webhook`. This field is
113   // alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature.
114   // +optional
115   optional WebhookClientConfig webhookClientConfig = 2;
116 }
117
118 // CustomResourceDefinition represents a resource that should be exposed on the API server.  Its name MUST be in the format
119 // <.spec.name>.<.spec.group>.
120 message CustomResourceDefinition {
121   optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
122
123   // Spec describes how the user wants the resources to appear
124   optional CustomResourceDefinitionSpec spec = 2;
125
126   // Status indicates the actual state of the CustomResourceDefinition
127   // +optional
128   optional CustomResourceDefinitionStatus status = 3;
129 }
130
131 // CustomResourceDefinitionCondition contains details for the current condition of this pod.
132 message CustomResourceDefinitionCondition {
133   // Type is the type of the condition.
134   optional string type = 1;
135
136   // Status is the status of the condition.
137   // Can be True, False, Unknown.
138   optional string status = 2;
139
140   // Last time the condition transitioned from one status to another.
141   // +optional
142   optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
143
144   // Unique, one-word, CamelCase reason for the condition's last transition.
145   // +optional
146   optional string reason = 4;
147
148   // Human-readable message indicating details about last transition.
149   // +optional
150   optional string message = 5;
151 }
152
153 // CustomResourceDefinitionList is a list of CustomResourceDefinition objects.
154 message CustomResourceDefinitionList {
155   optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
156
157   // Items individual CustomResourceDefinitions
158   repeated CustomResourceDefinition items = 2;
159 }
160
161 // CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition
162 message CustomResourceDefinitionNames {
163   // Plural is the plural name of the resource to serve.  It must match the name of the CustomResourceDefinition-registration
164   // too: plural.group and it must be all lowercase.
165   optional string plural = 1;
166
167   // Singular is the singular name of the resource.  It must be all lowercase  Defaults to lowercased <kind>
168   // +optional
169   optional string singular = 2;
170
171   // ShortNames are short names for the resource.  It must be all lowercase.
172   // +optional
173   repeated string shortNames = 3;
174
175   // Kind is the serialized kind of the resource.  It is normally CamelCase and singular.
176   optional string kind = 4;
177
178   // ListKind is the serialized kind of the list for this resource.  Defaults to <kind>List.
179   // +optional
180   optional string listKind = 5;
181
182   // Categories is a list of grouped resources custom resources belong to (e.g. 'all')
183   // +optional
184   repeated string categories = 6;
185 }
186
187 // CustomResourceDefinitionSpec describes how a user wants their resource to appear
188 message CustomResourceDefinitionSpec {
189   // Group is the group this resource belongs in
190   optional string group = 1;
191
192   // Version is the version this resource belongs in
193   // Should be always first item in Versions field if provided.
194   // Optional, but at least one of Version or Versions must be set.
195   // Deprecated: Please use `Versions`.
196   // +optional
197   optional string version = 2;
198
199   // Names are the names used to describe this custom resource
200   optional CustomResourceDefinitionNames names = 3;
201
202   // Scope indicates whether this resource is cluster or namespace scoped.  Default is namespaced
203   optional string scope = 4;
204
205   // Validation describes the validation methods for CustomResources
206   // Optional, the global validation schema for all versions.
207   // Top-level and per-version schemas are mutually exclusive.
208   // +optional
209   optional CustomResourceValidation validation = 5;
210
211   // Subresources describes the subresources for CustomResource
212   // Optional, the global subresources for all versions.
213   // Top-level and per-version subresources are mutually exclusive.
214   // +optional
215   optional CustomResourceSubresources subresources = 6;
216
217   // Versions is the list of all supported versions for this resource.
218   // If Version field is provided, this field is optional.
219   // Validation: All versions must use the same validation schema for now. i.e., top
220   // level Validation field is applied to all of these versions.
221   // Order: The version name will be used to compute the order.
222   // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered
223   // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version),
224   // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first
225   // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing
226   // major version, then minor version. An example sorted list of versions:
227   // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
228   // +optional
229   repeated CustomResourceDefinitionVersion versions = 7;
230
231   // AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column.
232   // Optional, the global columns for all versions.
233   // Top-level and per-version columns are mutually exclusive.
234   // +optional
235   repeated CustomResourceColumnDefinition additionalPrinterColumns = 8;
236
237   // `conversion` defines conversion settings for the CRD.
238   // +optional
239   optional CustomResourceConversion conversion = 9;
240 }
241
242 // CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition
243 message CustomResourceDefinitionStatus {
244   // Conditions indicate state for particular aspects of a CustomResourceDefinition
245   repeated CustomResourceDefinitionCondition conditions = 1;
246
247   // AcceptedNames are the names that are actually being used to serve discovery
248   // They may be different than the names in spec.
249   optional CustomResourceDefinitionNames acceptedNames = 2;
250
251   // StoredVersions are all versions of CustomResources that were ever persisted. Tracking these
252   // versions allows a migration path for stored versions in etcd. The field is mutable
253   // so the migration controller can first finish a migration to another version (i.e.
254   // that no old objects are left in the storage), and then remove the rest of the
255   // versions from this list.
256   // None of the versions in this list can be removed from the spec.Versions field.
257   repeated string storedVersions = 3;
258 }
259
260 // CustomResourceDefinitionVersion describes a version for CRD.
261 message CustomResourceDefinitionVersion {
262   // Name is the version name, e.g. “v1”, “v2beta1”, etc.
263   optional string name = 1;
264
265   // Served is a flag enabling/disabling this version from being served via REST APIs
266   optional bool served = 2;
267
268   // Storage flags the version as storage version. There must be exactly one
269   // flagged as storage version.
270   optional bool storage = 3;
271
272   // Schema describes the schema for CustomResource used in validation, pruning, and defaulting.
273   // Top-level and per-version schemas are mutually exclusive.
274   // Per-version schemas must not all be set to identical values (top-level validation schema should be used instead)
275   // This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature.
276   // +optional
277   optional CustomResourceValidation schema = 4;
278
279   // Subresources describes the subresources for CustomResource
280   // Top-level and per-version subresources are mutually exclusive.
281   // Per-version subresources must not all be set to identical values (top-level subresources should be used instead)
282   // This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature.
283   // +optional
284   optional CustomResourceSubresources subresources = 5;
285
286   // AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column.
287   // Top-level and per-version columns are mutually exclusive.
288   // Per-version columns must not all be set to identical values (top-level columns should be used instead)
289   // This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature.
290   // NOTE: CRDs created prior to 1.13 populated the top-level additionalPrinterColumns field by default. To apply an
291   // update that changes to per-version additionalPrinterColumns, the top-level additionalPrinterColumns field must
292   // be explicitly set to null
293   // +optional
294   repeated CustomResourceColumnDefinition additionalPrinterColumns = 6;
295 }
296
297 // CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.
298 message CustomResourceSubresourceScale {
299   // SpecReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Spec.Replicas.
300   // Only JSON paths without the array notation are allowed.
301   // Must be a JSON Path under .spec.
302   // If there is no value under the given path in the CustomResource, the /scale subresource will return an error on GET.
303   optional string specReplicasPath = 1;
304
305   // StatusReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Replicas.
306   // Only JSON paths without the array notation are allowed.
307   // Must be a JSON Path under .status.
308   // If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource
309   // will default to 0.
310   optional string statusReplicasPath = 2;
311
312   // LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector.
313   // Only JSON paths without the array notation are allowed.
314   // Must be a JSON Path under .status.
315   // Must be set to work with HPA.
316   // If there is no value under the given path in the CustomResource, the status label selector value in the /scale
317   // subresource will default to the empty string.
318   // +optional
319   optional string labelSelectorPath = 3;
320 }
321
322 // CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources.
323 // Status is represented by the `.status` JSON path inside of a CustomResource. When set,
324 // * exposes a /status subresource for the custom resource
325 // * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza
326 // * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza
327 message CustomResourceSubresourceStatus {
328 }
329
330 // CustomResourceSubresources defines the status and scale subresources for CustomResources.
331 message CustomResourceSubresources {
332   // Status denotes the status subresource for CustomResources
333   // +optional
334   optional CustomResourceSubresourceStatus status = 1;
335
336   // Scale denotes the scale subresource for CustomResources
337   // +optional
338   optional CustomResourceSubresourceScale scale = 2;
339 }
340
341 // CustomResourceValidation is a list of validation methods for CustomResources.
342 message CustomResourceValidation {
343   // OpenAPIV3Schema is the OpenAPI v3 schema to be validated against.
344   // +optional
345   optional JSONSchemaProps openAPIV3Schema = 1;
346 }
347
348 // ExternalDocumentation allows referencing an external resource for extended documentation.
349 message ExternalDocumentation {
350   optional string description = 1;
351
352   optional string url = 2;
353 }
354
355 // JSON represents any valid JSON value.
356 // These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
357 message JSON {
358   optional bytes raw = 1;
359 }
360
361 // JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).
362 message JSONSchemaProps {
363   optional string id = 1;
364
365   optional string schema = 2;
366
367   optional string ref = 3;
368
369   optional string description = 4;
370
371   optional string type = 5;
372
373   optional string format = 6;
374
375   optional string title = 7;
376
377   optional JSON default = 8;
378
379   optional double maximum = 9;
380
381   optional bool exclusiveMaximum = 10;
382
383   optional double minimum = 11;
384
385   optional bool exclusiveMinimum = 12;
386
387   optional int64 maxLength = 13;
388
389   optional int64 minLength = 14;
390
391   optional string pattern = 15;
392
393   optional int64 maxItems = 16;
394
395   optional int64 minItems = 17;
396
397   optional bool uniqueItems = 18;
398
399   optional double multipleOf = 19;
400
401   repeated JSON enum = 20;
402
403   optional int64 maxProperties = 21;
404
405   optional int64 minProperties = 22;
406
407   repeated string required = 23;
408
409   optional JSONSchemaPropsOrArray items = 24;
410
411   repeated JSONSchemaProps allOf = 25;
412
413   repeated JSONSchemaProps oneOf = 26;
414
415   repeated JSONSchemaProps anyOf = 27;
416
417   optional JSONSchemaProps not = 28;
418
419   map<string, JSONSchemaProps> properties = 29;
420
421   optional JSONSchemaPropsOrBool additionalProperties = 30;
422
423   map<string, JSONSchemaProps> patternProperties = 31;
424
425   map<string, JSONSchemaPropsOrStringArray> dependencies = 32;
426
427   optional JSONSchemaPropsOrBool additionalItems = 33;
428
429   map<string, JSONSchemaProps> definitions = 34;
430
431   optional ExternalDocumentation externalDocs = 35;
432
433   optional JSON example = 36;
434 }
435
436 // JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps
437 // or an array of JSONSchemaProps. Mainly here for serialization purposes.
438 message JSONSchemaPropsOrArray {
439   optional JSONSchemaProps schema = 1;
440
441   repeated JSONSchemaProps jSONSchemas = 2;
442 }
443
444 // JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value.
445 // Defaults to true for the boolean property.
446 message JSONSchemaPropsOrBool {
447   optional bool allows = 1;
448
449   optional JSONSchemaProps schema = 2;
450 }
451
452 // JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.
453 message JSONSchemaPropsOrStringArray {
454   optional JSONSchemaProps schema = 1;
455
456   repeated string property = 2;
457 }
458
459 // ServiceReference holds a reference to Service.legacy.k8s.io
460 message ServiceReference {
461   // `namespace` is the namespace of the service.
462   // Required
463   optional string namespace = 1;
464
465   // `name` is the name of the service.
466   // Required
467   optional string name = 2;
468
469   // `path` is an optional URL path which will be sent in any request to
470   // this service.
471   // +optional
472   optional string path = 3;
473 }
474
475 // WebhookClientConfig contains the information to make a TLS
476 // connection with the webhook. It has the same field as admissionregistration.v1beta1.WebhookClientConfig.
477 message WebhookClientConfig {
478   // `url` gives the location of the webhook, in standard URL form
479   // (`scheme://host:port/path`). Exactly one of `url` or `service`
480   // must be specified.
481   //
482   // The `host` should not refer to a service running in the cluster; use
483   // the `service` field instead. The host might be resolved via external
484   // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve
485   // in-cluster DNS as that would be a layering violation). `host` may
486   // also be an IP address.
487   //
488   // Please note that using `localhost` or `127.0.0.1` as a `host` is
489   // risky unless you take great care to run this webhook on all hosts
490   // which run an apiserver which might need to make calls to this
491   // webhook. Such installs are likely to be non-portable, i.e., not easy
492   // to turn up in a new cluster.
493   //
494   // The scheme must be "https"; the URL must begin with "https://".
495   //
496   // A path is optional, and if present may be any string permissible in
497   // a URL. You may use the path to pass an arbitrary string to the
498   // webhook, for example, a cluster identifier.
499   //
500   // Attempting to use a user or basic auth e.g. "user:password@" is not
501   // allowed. Fragments ("#...") and query parameters ("?...") are not
502   // allowed, either.
503   //
504   // +optional
505   optional string url = 3;
506
507   // `service` is a reference to the service for this webhook. Either
508   // `service` or `url` must be specified.
509   //
510   // If the webhook is running within the cluster, then you should use `service`.
511   //
512   // Port 443 will be used if it is open, otherwise it is an error.
513   //
514   // +optional
515   optional ServiceReference service = 1;
516
517   // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
518   // If unspecified, system trust roots on the apiserver are used.
519   // +optional
520   optional bytes caBundle = 2;
521 }
522