mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
commit
a5e8cefc7a
214
api/openapi-spec/swagger.json
generated
214
api/openapi-spec/swagger.json
generated
@ -17363,11 +17363,11 @@
|
||||
"type": "string"
|
||||
},
|
||||
"format": {
|
||||
"description": "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.",
|
||||
"description": "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.",
|
||||
"type": "string"
|
||||
},
|
||||
"jsonPath": {
|
||||
"description": "JSONPath is a simple JSON path, i.e. with array notation.",
|
||||
"description": "jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
@ -17375,12 +17375,12 @@
|
||||
"type": "string"
|
||||
},
|
||||
"priority": {
|
||||
"description": "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a higher priority.",
|
||||
"description": "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.",
|
||||
"format": "int32",
|
||||
"type": "integer"
|
||||
},
|
||||
"type": {
|
||||
"description": "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.",
|
||||
"description": "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@ -17395,12 +17395,12 @@
|
||||
"description": "CustomResourceConversion describes how to convert different versions of a CR.",
|
||||
"properties": {
|
||||
"strategy": {
|
||||
"description": "`strategy` specifies the conversion strategy. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the CR. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false.",
|
||||
"description": "strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.",
|
||||
"type": "string"
|
||||
},
|
||||
"webhook": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.WebhookConversion",
|
||||
"description": "webhook describes how to call the conversion webhook. Required when strategy is \"Webhook\"."
|
||||
"description": "webhook describes how to call the conversion webhook. Required when `strategy` is set to `Webhook`."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@ -17424,11 +17424,11 @@
|
||||
},
|
||||
"spec": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec",
|
||||
"description": "Spec describes how the user wants the resources to appear"
|
||||
"description": "spec describes how the user wants the resources to appear"
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionStatus",
|
||||
"description": "Status indicates the actual state of the CustomResourceDefinition"
|
||||
"description": "status indicates the actual state of the CustomResourceDefinition"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@ -17448,22 +17448,22 @@
|
||||
"properties": {
|
||||
"lastTransitionTime": {
|
||||
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time",
|
||||
"description": "Last time the condition transitioned from one status to another."
|
||||
"description": "lastTransitionTime last time the condition transitioned from one status to another."
|
||||
},
|
||||
"message": {
|
||||
"description": "Human-readable message indicating details about last transition.",
|
||||
"description": "message is a human-readable message indicating details about last transition.",
|
||||
"type": "string"
|
||||
},
|
||||
"reason": {
|
||||
"description": "Unique, one-word, CamelCase reason for the condition's last transition.",
|
||||
"description": "reason is a unique, one-word, CamelCase reason for the condition's last transition.",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "Status is the status of the condition. Can be True, False, Unknown.",
|
||||
"description": "status is the status of the condition. Can be True, False, Unknown.",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"description": "Type is the type of the condition. Types include Established, NamesAccepted and Terminating.",
|
||||
"description": "type is the type of the condition. Types include Established, NamesAccepted and Terminating.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@ -17481,7 +17481,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
"description": "Items individual CustomResourceDefinitions",
|
||||
"description": "items list individual CustomResourceDefinition objects",
|
||||
"items": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition"
|
||||
},
|
||||
@ -17511,33 +17511,33 @@
|
||||
"description": "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition",
|
||||
"properties": {
|
||||
"categories": {
|
||||
"description": "Categories is a list of grouped resources custom resources belong to (e.g. 'all')",
|
||||
"description": "categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"kind": {
|
||||
"description": "Kind is the serialized kind of the resource. It is normally CamelCase and singular.",
|
||||
"description": "kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.",
|
||||
"type": "string"
|
||||
},
|
||||
"listKind": {
|
||||
"description": "ListKind is the serialized kind of the list for this resource. Defaults to <kind>List.",
|
||||
"description": "listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".",
|
||||
"type": "string"
|
||||
},
|
||||
"plural": {
|
||||
"description": "Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration too: plural.group and it must be all lowercase.",
|
||||
"description": "plural is the plural name of the resource to serve. The custom resources are served under `/apis/<group>/<version>/.../<plural>`. Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`). Must be all lowercase.",
|
||||
"type": "string"
|
||||
},
|
||||
"shortNames": {
|
||||
"description": "ShortNames are short names for the resource. It must be all lowercase.",
|
||||
"description": "shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get <shortname>`. It must be all lowercase.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"singular": {
|
||||
"description": "Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased <kind>",
|
||||
"description": "singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@ -17552,26 +17552,26 @@
|
||||
"properties": {
|
||||
"conversion": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion",
|
||||
"description": "`conversion` defines conversion settings for the CRD."
|
||||
"description": "conversion defines conversion settings for the CRD."
|
||||
},
|
||||
"group": {
|
||||
"description": "Group is the group this resource belongs in",
|
||||
"description": "group is the API group of the defined custom resource. The custom resources are served under `/apis/<group>/...`. Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`).",
|
||||
"type": "string"
|
||||
},
|
||||
"names": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames",
|
||||
"description": "Names are the names used to describe this custom resource"
|
||||
"description": "names specify the resource and kind names for the custom resource."
|
||||
},
|
||||
"preserveUnknownFields": {
|
||||
"description": "preserveUnknownFields disables pruning of object fields which are not specified in the OpenAPI schema. apiVersion, kind, metadata and known fields inside metadata are always preserved. This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`.",
|
||||
"description": "preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"scope": {
|
||||
"description": "Scope indicates whether this resource is cluster or namespace scoped.",
|
||||
"description": "scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.",
|
||||
"type": "string"
|
||||
},
|
||||
"versions": {
|
||||
"description": "Versions is the list of all supported versions for this resource. Order: The version name will be used to compute the order. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.",
|
||||
"description": "versions is the list of all API versions of the defined custom resource. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion"
|
||||
},
|
||||
@ -17591,17 +17591,17 @@
|
||||
"properties": {
|
||||
"acceptedNames": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames",
|
||||
"description": "AcceptedNames are the names that are actually being used to serve discovery They may be different than the names in spec."
|
||||
"description": "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec."
|
||||
},
|
||||
"conditions": {
|
||||
"description": "Conditions indicate state for particular aspects of a CustomResourceDefinition",
|
||||
"description": "conditions indicate state for particular aspects of a CustomResourceDefinition",
|
||||
"items": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionCondition"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"storedVersions": {
|
||||
"description": "StoredVersions are all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so the migration controller can first finish a migration to another version (i.e. that no old objects are left in the storage), and then remove the rest of the versions from this list. None of the versions in this list can be removed from the spec.Versions field.",
|
||||
"description": "storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from `spec.versions` while they exist in this list.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
@ -17618,31 +17618,31 @@
|
||||
"description": "CustomResourceDefinitionVersion describes a version for CRD.",
|
||||
"properties": {
|
||||
"additionalPrinterColumns": {
|
||||
"description": "AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column.",
|
||||
"description": "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceColumnDefinition"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"name": {
|
||||
"description": "Name is the version name, e.g. “v1”, “v2beta1”, etc.",
|
||||
"description": "name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis/<group>/<version>/...` if `served` is true.",
|
||||
"type": "string"
|
||||
},
|
||||
"schema": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation",
|
||||
"description": "Schema describes the schema for CustomResource used in validation, pruning, and defaulting."
|
||||
"description": "schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource."
|
||||
},
|
||||
"served": {
|
||||
"description": "Served is a flag enabling/disabling this version from being served via REST APIs",
|
||||
"description": "served is a flag enabling/disabling this version from being served via REST APIs",
|
||||
"type": "boolean"
|
||||
},
|
||||
"storage": {
|
||||
"description": "Storage flags the version as storage version. There must be exactly one flagged as storage version.",
|
||||
"description": "storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"subresources": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources",
|
||||
"description": "Subresources describes the subresources for CustomResource"
|
||||
"description": "subresources specify what subresources this version of the defined custom resource have."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@ -17656,15 +17656,15 @@
|
||||
"description": "CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.",
|
||||
"properties": {
|
||||
"labelSelectorPath": {
|
||||
"description": "LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status or .spec. Must be set to work with HPA. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the CustomResource, the status label selector value in the /scale subresource will default to the empty string.",
|
||||
"description": "labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.",
|
||||
"type": "string"
|
||||
},
|
||||
"specReplicasPath": {
|
||||
"description": "SpecReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Spec.Replicas. Only JSON paths without the array notation are allowed. Must be a JSON Path under .spec. If there is no value under the given path in the CustomResource, the /scale subresource will return an error on GET.",
|
||||
"description": "specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.",
|
||||
"type": "string"
|
||||
},
|
||||
"statusReplicasPath": {
|
||||
"description": "StatusReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Replicas. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status. If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource will default to 0.",
|
||||
"description": "statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@ -17683,11 +17683,11 @@
|
||||
"properties": {
|
||||
"scale": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale",
|
||||
"description": "Scale denotes the scale subresource for CustomResources"
|
||||
"description": "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object."
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceStatus",
|
||||
"description": "Status denotes the status subresource for CustomResources"
|
||||
"description": "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object."
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@ -17697,7 +17697,7 @@
|
||||
"properties": {
|
||||
"openAPIV3Schema": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps",
|
||||
"description": "OpenAPIV3Schema is the OpenAPI v3 schema to be validated against."
|
||||
"description": "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning."
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@ -17746,7 +17746,7 @@
|
||||
},
|
||||
"default": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON",
|
||||
"description": "default is a default value for undefined object fields. Defaulting is an alpha feature under the CustomResourceDefaulting feature gate. Defaulting requires spec.preserveUnknownFields to be false."
|
||||
"description": "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. Defaulting requires spec.preserveUnknownFields to be false."
|
||||
},
|
||||
"definitions": {
|
||||
"additionalProperties": {
|
||||
@ -17896,19 +17896,19 @@
|
||||
"description": "ServiceReference holds a reference to Service.legacy.k8s.io",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "`name` is the name of the service. Required",
|
||||
"description": "name is the name of the service. Required",
|
||||
"type": "string"
|
||||
},
|
||||
"namespace": {
|
||||
"description": "`namespace` is the namespace of the service. Required",
|
||||
"description": "namespace is the namespace of the service. Required",
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"description": "`path` is an optional URL path which will be sent in any request to this service.",
|
||||
"description": "path is an optional URL path at which the webhook will be contacted.",
|
||||
"type": "string"
|
||||
},
|
||||
"port": {
|
||||
"description": "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).",
|
||||
"description": "port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.",
|
||||
"format": "int32",
|
||||
"type": "integer"
|
||||
}
|
||||
@ -17920,19 +17920,19 @@
|
||||
"type": "object"
|
||||
},
|
||||
"io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.WebhookClientConfig": {
|
||||
"description": "WebhookClientConfig contains the information to make a TLS connection with the webhook. It has the same field as admissionregistration.v1.WebhookClientConfig.",
|
||||
"description": "WebhookClientConfig contains the information to make a TLS connection with the webhook.",
|
||||
"properties": {
|
||||
"caBundle": {
|
||||
"description": "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.",
|
||||
"description": "caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.",
|
||||
"format": "byte",
|
||||
"type": "string"
|
||||
},
|
||||
"service": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ServiceReference",
|
||||
"description": "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`."
|
||||
"description": "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`."
|
||||
},
|
||||
"url": {
|
||||
"description": "`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.",
|
||||
"description": "url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@ -17943,10 +17943,10 @@
|
||||
"properties": {
|
||||
"clientConfig": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.WebhookClientConfig",
|
||||
"description": "`clientConfig` is the instructions for how to call the webhook if strategy is `Webhook`."
|
||||
"description": "clientConfig is the instructions for how to call the webhook if strategy is `Webhook`."
|
||||
},
|
||||
"conversionReviewVersions": {
|
||||
"description": "ConversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, conversion will fail for this object. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.",
|
||||
"description": "conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
@ -17962,7 +17962,7 @@
|
||||
"description": "CustomResourceColumnDefinition specifies a column for server side printing.",
|
||||
"properties": {
|
||||
"JSONPath": {
|
||||
"description": "JSONPath is a simple JSON path, i.e. with array notation.",
|
||||
"description": "JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.",
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
@ -17970,7 +17970,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"format": {
|
||||
"description": "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.",
|
||||
"description": "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
@ -17978,12 +17978,12 @@
|
||||
"type": "string"
|
||||
},
|
||||
"priority": {
|
||||
"description": "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a higher priority.",
|
||||
"description": "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.",
|
||||
"format": "int32",
|
||||
"type": "integer"
|
||||
},
|
||||
"type": {
|
||||
"description": "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.",
|
||||
"description": "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@ -17998,19 +17998,19 @@
|
||||
"description": "CustomResourceConversion describes how to convert different versions of a CR.",
|
||||
"properties": {
|
||||
"conversionReviewVersions": {
|
||||
"description": "ConversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, conversion will fail for this object. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail. Default to `['v1beta1']`.",
|
||||
"description": "conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail. Defaults to `[\"v1beta1\"]`.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"strategy": {
|
||||
"description": "`strategy` specifies the conversion strategy. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the CR. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false.",
|
||||
"description": "strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set.",
|
||||
"type": "string"
|
||||
},
|
||||
"webhookClientConfig": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.WebhookClientConfig",
|
||||
"description": "`webhookClientConfig` is the instructions for how to call the webhook if strategy is `Webhook`. This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature."
|
||||
"description": "webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`. Required when `strategy` is set to `Webhook`."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@ -18034,11 +18034,11 @@
|
||||
},
|
||||
"spec": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec",
|
||||
"description": "Spec describes how the user wants the resources to appear"
|
||||
"description": "spec describes how the user wants the resources to appear"
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus",
|
||||
"description": "Status indicates the actual state of the CustomResourceDefinition"
|
||||
"description": "status indicates the actual state of the CustomResourceDefinition"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@ -18058,22 +18058,22 @@
|
||||
"properties": {
|
||||
"lastTransitionTime": {
|
||||
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time",
|
||||
"description": "Last time the condition transitioned from one status to another."
|
||||
"description": "lastTransitionTime last time the condition transitioned from one status to another."
|
||||
},
|
||||
"message": {
|
||||
"description": "Human-readable message indicating details about last transition.",
|
||||
"description": "message is a human-readable message indicating details about last transition.",
|
||||
"type": "string"
|
||||
},
|
||||
"reason": {
|
||||
"description": "Unique, one-word, CamelCase reason for the condition's last transition.",
|
||||
"description": "reason is a unique, one-word, CamelCase reason for the condition's last transition.",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "Status is the status of the condition. Can be True, False, Unknown.",
|
||||
"description": "status is the status of the condition. Can be True, False, Unknown.",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"description": "Type is the type of the condition. Types include Established, NamesAccepted and Terminating.",
|
||||
"description": "type is the type of the condition. Types include Established, NamesAccepted and Terminating.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@ -18091,7 +18091,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
"description": "Items individual CustomResourceDefinitions",
|
||||
"description": "items list individual CustomResourceDefinition objects",
|
||||
"items": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition"
|
||||
},
|
||||
@ -18121,33 +18121,33 @@
|
||||
"description": "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition",
|
||||
"properties": {
|
||||
"categories": {
|
||||
"description": "Categories is a list of grouped resources custom resources belong to (e.g. 'all')",
|
||||
"description": "categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"kind": {
|
||||
"description": "Kind is the serialized kind of the resource. It is normally CamelCase and singular.",
|
||||
"description": "kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.",
|
||||
"type": "string"
|
||||
},
|
||||
"listKind": {
|
||||
"description": "ListKind is the serialized kind of the list for this resource. Defaults to <kind>List.",
|
||||
"description": "listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".",
|
||||
"type": "string"
|
||||
},
|
||||
"plural": {
|
||||
"description": "Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration too: plural.group and it must be all lowercase.",
|
||||
"description": "plural is the plural name of the resource to serve. The custom resources are served under `/apis/<group>/<version>/.../<plural>`. Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`). Must be all lowercase.",
|
||||
"type": "string"
|
||||
},
|
||||
"shortNames": {
|
||||
"description": "ShortNames are short names for the resource. It must be all lowercase.",
|
||||
"description": "shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get <shortname>`. It must be all lowercase.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"singular": {
|
||||
"description": "Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased <kind>",
|
||||
"description": "singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@ -18161,7 +18161,7 @@
|
||||
"description": "CustomResourceDefinitionSpec describes how a user wants their resource to appear",
|
||||
"properties": {
|
||||
"additionalPrinterColumns": {
|
||||
"description": "AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. Optional, the global columns for all versions. Top-level and per-version columns are mutually exclusive.",
|
||||
"description": "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceColumnDefinition"
|
||||
},
|
||||
@ -18169,38 +18169,38 @@
|
||||
},
|
||||
"conversion": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceConversion",
|
||||
"description": "`conversion` defines conversion settings for the CRD."
|
||||
"description": "conversion defines conversion settings for the CRD."
|
||||
},
|
||||
"group": {
|
||||
"description": "Group is the group this resource belongs in",
|
||||
"description": "group is the API group of the defined custom resource. The custom resources are served under `/apis/<group>/...`. Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`).",
|
||||
"type": "string"
|
||||
},
|
||||
"names": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames",
|
||||
"description": "Names are the names used to describe this custom resource"
|
||||
"description": "names specify the resource and kind names for the custom resource."
|
||||
},
|
||||
"preserveUnknownFields": {
|
||||
"description": "preserveUnknownFields disables pruning of object fields which are not specified in the OpenAPI schema. apiVersion, kind, metadata and known fields inside metadata are always preserved. Defaults to true in v1beta and will default to false in v1.",
|
||||
"description": "preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. If false, schemas must be defined for all versions. Defaults to true in v1beta for backwards compatibility. Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"scope": {
|
||||
"description": "Scope indicates whether this resource is cluster or namespace scoped. Default is namespaced",
|
||||
"description": "scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.",
|
||||
"type": "string"
|
||||
},
|
||||
"subresources": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresources",
|
||||
"description": "Subresources describes the subresources for CustomResource Optional, the global subresources for all versions. Top-level and per-version subresources are mutually exclusive."
|
||||
"description": "subresources specify what subresources the defined custom resource has. If present, this field configures subresources for all versions. Top-level and per-version subresources are mutually exclusive."
|
||||
},
|
||||
"validation": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceValidation",
|
||||
"description": "Validation describes the validation methods for CustomResources Optional, the global validation schema for all versions. Top-level and per-version schemas are mutually exclusive."
|
||||
"description": "validation describes the schema used for validation and pruning of the custom resource. If present, this validation schema is used to validate all versions. Top-level and per-version schemas are mutually exclusive."
|
||||
},
|
||||
"version": {
|
||||
"description": "Version is the version this resource belongs in Should be always first item in Versions field if provided. Optional, but at least one of Version or Versions must be set. Deprecated: Please use `Versions`.",
|
||||
"description": "version is the API version of the defined custom resource. The custom resources are served under `/apis/<group>/<version>/...`. Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. Optional if `versions` is specified. Deprecated: use `versions` instead.",
|
||||
"type": "string"
|
||||
},
|
||||
"versions": {
|
||||
"description": "Versions is the list of all supported versions for this resource. If Version field is provided, this field is optional. Validation: All versions must use the same validation schema for now. i.e., top level Validation field is applied to all of these versions. Order: The version name will be used to compute the order. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.",
|
||||
"description": "versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionVersion"
|
||||
},
|
||||
@ -18219,17 +18219,17 @@
|
||||
"properties": {
|
||||
"acceptedNames": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames",
|
||||
"description": "AcceptedNames are the names that are actually being used to serve discovery They may be different than the names in spec."
|
||||
"description": "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec."
|
||||
},
|
||||
"conditions": {
|
||||
"description": "Conditions indicate state for particular aspects of a CustomResourceDefinition",
|
||||
"description": "conditions indicate state for particular aspects of a CustomResourceDefinition",
|
||||
"items": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionCondition"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"storedVersions": {
|
||||
"description": "StoredVersions are all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so the migration controller can first finish a migration to another version (i.e. that no old objects are left in the storage), and then remove the rest of the versions from this list. None of the versions in this list can be removed from the spec.Versions field.",
|
||||
"description": "storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from `spec.versions` while they exist in this list.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
@ -18246,31 +18246,31 @@
|
||||
"description": "CustomResourceDefinitionVersion describes a version for CRD.",
|
||||
"properties": {
|
||||
"additionalPrinterColumns": {
|
||||
"description": "AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead) This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature. NOTE: CRDs created prior to 1.13 populated the top-level additionalPrinterColumns field by default. To apply an update that changes to per-version additionalPrinterColumns, the top-level additionalPrinterColumns field must be explicitly set to null",
|
||||
"description": "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceColumnDefinition"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"name": {
|
||||
"description": "Name is the version name, e.g. “v1”, “v2beta1”, etc.",
|
||||
"description": "name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis/<group>/<version>/...` if `served` is true.",
|
||||
"type": "string"
|
||||
},
|
||||
"schema": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceValidation",
|
||||
"description": "Schema describes the schema for CustomResource used in validation, pruning, and defaulting. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead) This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature."
|
||||
"description": "schema describes the schema used for validation and pruning of this version of the custom resource. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead)."
|
||||
},
|
||||
"served": {
|
||||
"description": "Served is a flag enabling/disabling this version from being served via REST APIs",
|
||||
"description": "served is a flag enabling/disabling this version from being served via REST APIs",
|
||||
"type": "boolean"
|
||||
},
|
||||
"storage": {
|
||||
"description": "Storage flags the version as storage version. There must be exactly one flagged as storage version.",
|
||||
"description": "storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"subresources": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresources",
|
||||
"description": "Subresources describes the subresources for CustomResource Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead) This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature."
|
||||
"description": "subresources specify what subresources this version of the defined custom resource have. Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead)."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@ -18284,15 +18284,15 @@
|
||||
"description": "CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.",
|
||||
"properties": {
|
||||
"labelSelectorPath": {
|
||||
"description": "LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status or .spec. Must be set to work with HPA. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the CustomResource, the status label selector value in the /scale subresource will default to the empty string.",
|
||||
"description": "labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.",
|
||||
"type": "string"
|
||||
},
|
||||
"specReplicasPath": {
|
||||
"description": "SpecReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Spec.Replicas. Only JSON paths without the array notation are allowed. Must be a JSON Path under .spec. If there is no value under the given path in the CustomResource, the /scale subresource will return an error on GET.",
|
||||
"description": "specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.",
|
||||
"type": "string"
|
||||
},
|
||||
"statusReplicasPath": {
|
||||
"description": "StatusReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Replicas. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status. If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource will default to 0.",
|
||||
"description": "statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
@ -18311,11 +18311,11 @@
|
||||
"properties": {
|
||||
"scale": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceScale",
|
||||
"description": "Scale denotes the scale subresource for CustomResources"
|
||||
"description": "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object."
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceStatus",
|
||||
"description": "Status denotes the status subresource for CustomResources"
|
||||
"description": "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object."
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@ -18325,7 +18325,7 @@
|
||||
"properties": {
|
||||
"openAPIV3Schema": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps",
|
||||
"description": "OpenAPIV3Schema is the OpenAPI v3 schema to be validated against."
|
||||
"description": "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning."
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@ -18374,7 +18374,7 @@
|
||||
},
|
||||
"default": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON",
|
||||
"description": "default is a default value for undefined object fields. Defaulting is an alpha feature under the CustomResourceDefaulting feature gate. Defaulting requires spec.preserveUnknownFields to be false."
|
||||
"description": "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API."
|
||||
},
|
||||
"definitions": {
|
||||
"additionalProperties": {
|
||||
@ -18524,19 +18524,19 @@
|
||||
"description": "ServiceReference holds a reference to Service.legacy.k8s.io",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "`name` is the name of the service. Required",
|
||||
"description": "name is the name of the service. Required",
|
||||
"type": "string"
|
||||
},
|
||||
"namespace": {
|
||||
"description": "`namespace` is the namespace of the service. Required",
|
||||
"description": "namespace is the namespace of the service. Required",
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"description": "`path` is an optional URL path which will be sent in any request to this service.",
|
||||
"description": "path is an optional URL path at which the webhook will be contacted.",
|
||||
"type": "string"
|
||||
},
|
||||
"port": {
|
||||
"description": "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).",
|
||||
"description": "port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.",
|
||||
"format": "int32",
|
||||
"type": "integer"
|
||||
}
|
||||
@ -18548,19 +18548,19 @@
|
||||
"type": "object"
|
||||
},
|
||||
"io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.WebhookClientConfig": {
|
||||
"description": "WebhookClientConfig contains the information to make a TLS connection with the webhook. It has the same field as admissionregistration.v1beta1.WebhookClientConfig.",
|
||||
"description": "WebhookClientConfig contains the information to make a TLS connection with the webhook.",
|
||||
"properties": {
|
||||
"caBundle": {
|
||||
"description": "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.",
|
||||
"description": "caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.",
|
||||
"format": "byte",
|
||||
"type": "string"
|
||||
},
|
||||
"service": {
|
||||
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ServiceReference",
|
||||
"description": "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`."
|
||||
"description": "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`."
|
||||
},
|
||||
"url": {
|
||||
"description": "`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.",
|
||||
"description": "url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
|
@ -30,33 +30,33 @@ option go_package = "v1";
|
||||
|
||||
// ConversionRequest describes the conversion request parameters.
|
||||
message ConversionRequest {
|
||||
// `uid` is an identifier for the individual request/response. It allows us to distinguish instances of requests which are
|
||||
// otherwise identical (parallel requests, requests when earlier requests did not modify etc)
|
||||
// The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.
|
||||
// uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are
|
||||
// otherwise identical (parallel requests, etc).
|
||||
// The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request.
|
||||
// It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.
|
||||
optional string uid = 1;
|
||||
|
||||
// `desiredAPIVersion` is the version to convert given objects to. e.g. "myapi.example.com/v1"
|
||||
// desiredAPIVersion is the version to convert given objects to. e.g. "myapi.example.com/v1"
|
||||
optional string desiredAPIVersion = 2;
|
||||
|
||||
// `objects` is the list of CR objects to be converted.
|
||||
// objects is the list of custom resource objects to be converted.
|
||||
repeated k8s.io.apimachinery.pkg.runtime.RawExtension objects = 3;
|
||||
}
|
||||
|
||||
// ConversionResponse describes a conversion response.
|
||||
message ConversionResponse {
|
||||
// `uid` is an identifier for the individual request/response.
|
||||
// This should be copied over from the corresponding ConversionRequest.
|
||||
// uid is an identifier for the individual request/response.
|
||||
// This should be copied over from the corresponding `request.uid`.
|
||||
optional string uid = 1;
|
||||
|
||||
// `convertedObjects` is the list of converted version of `request.objects` if the `result` is successful otherwise empty.
|
||||
// The webhook is expected to set apiVersion of these objects to the ConversionRequest.desiredAPIVersion. The list
|
||||
// must also have the same size as the input list with the same objects in the same order (equal kind, UID, name and namespace).
|
||||
// convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty.
|
||||
// The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list
|
||||
// must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace).
|
||||
// The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored.
|
||||
repeated k8s.io.apimachinery.pkg.runtime.RawExtension convertedObjects = 2;
|
||||
|
||||
// `result` contains the result of conversion with extra details if the conversion failed. `result.status` determines if
|
||||
// the conversion failed or succeeded. The `result.status` field is required and represent the success or failure of the
|
||||
// result contains the result of conversion with extra details if the conversion failed. `result.status` determines if
|
||||
// the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the
|
||||
// conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set
|
||||
// `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message`
|
||||
// will be used to construct an error message for the end user.
|
||||
@ -65,11 +65,11 @@ message ConversionResponse {
|
||||
|
||||
// ConversionReview describes a conversion request/response.
|
||||
message ConversionReview {
|
||||
// `request` describes the attributes for the conversion request.
|
||||
// request describes the attributes for the conversion request.
|
||||
// +optional
|
||||
optional ConversionRequest request = 1;
|
||||
|
||||
// `response` describes the attributes for the conversion response.
|
||||
// response describes the attributes for the conversion response.
|
||||
// +optional
|
||||
optional ConversionResponse response = 2;
|
||||
}
|
||||
@ -80,12 +80,12 @@ message CustomResourceColumnDefinition {
|
||||
optional string name = 1;
|
||||
|
||||
// type is an OpenAPI type definition for this column.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.
|
||||
optional string type = 2;
|
||||
|
||||
// format is an optional OpenAPI type definition for this column. The 'name' format is applied
|
||||
// to the primary identifier column to assist in clients identifying column is the resource name.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.
|
||||
// +optional
|
||||
optional string format = 3;
|
||||
|
||||
@ -95,23 +95,24 @@ message CustomResourceColumnDefinition {
|
||||
|
||||
// priority is an integer defining the relative importance of this column compared to others. Lower
|
||||
// numbers are considered higher priority. Columns that may be omitted in limited space scenarios
|
||||
// should be given a higher priority.
|
||||
// should be given a priority greater than 0.
|
||||
// +optional
|
||||
optional int32 priority = 5;
|
||||
|
||||
// JSONPath is a simple JSON path, i.e. with array notation.
|
||||
// jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against
|
||||
// each custom resource to produce the value for this column.
|
||||
optional string jsonPath = 6;
|
||||
}
|
||||
|
||||
// CustomResourceConversion describes how to convert different versions of a CR.
|
||||
message CustomResourceConversion {
|
||||
// `strategy` specifies the conversion strategy. Allowed values are:
|
||||
// - `None`: The converter only change the apiVersion and would not touch any other field in the CR.
|
||||
// strategy specifies how custom resources are converted between versions. Allowed values are:
|
||||
// - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource.
|
||||
// - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information
|
||||
// is needed for this option. This requires spec.preserveUnknownFields to be false.
|
||||
// is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.
|
||||
optional string strategy = 1;
|
||||
|
||||
// webhook describes how to call the conversion webhook. Required when strategy is "Webhook".
|
||||
// webhook describes how to call the conversion webhook. Required when `strategy` is set to `Webhook`.
|
||||
// +optional
|
||||
optional WebhookConversion webhook = 2;
|
||||
}
|
||||
@ -121,32 +122,32 @@ message CustomResourceConversion {
|
||||
message CustomResourceDefinition {
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec describes how the user wants the resources to appear
|
||||
// spec describes how the user wants the resources to appear
|
||||
optional CustomResourceDefinitionSpec spec = 2;
|
||||
|
||||
// Status indicates the actual state of the CustomResourceDefinition
|
||||
// status indicates the actual state of the CustomResourceDefinition
|
||||
// +optional
|
||||
optional CustomResourceDefinitionStatus status = 3;
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionCondition contains details for the current condition of this pod.
|
||||
message CustomResourceDefinitionCondition {
|
||||
// Type is the type of the condition. Types include Established, NamesAccepted and Terminating.
|
||||
// type is the type of the condition. Types include Established, NamesAccepted and Terminating.
|
||||
optional string type = 1;
|
||||
|
||||
// Status is the status of the condition.
|
||||
// status is the status of the condition.
|
||||
// Can be True, False, Unknown.
|
||||
optional string status = 2;
|
||||
|
||||
// Last time the condition transitioned from one status to another.
|
||||
// lastTransitionTime last time the condition transitioned from one status to another.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
|
||||
|
||||
// Unique, one-word, CamelCase reason for the condition's last transition.
|
||||
// reason is a unique, one-word, CamelCase reason for the condition's last transition.
|
||||
// +optional
|
||||
optional string reason = 4;
|
||||
|
||||
// Human-readable message indicating details about last transition.
|
||||
// message is a human-readable message indicating details about last transition.
|
||||
// +optional
|
||||
optional string message = 5;
|
||||
}
|
||||
@ -155,49 +156,59 @@ message CustomResourceDefinitionCondition {
|
||||
message CustomResourceDefinitionList {
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items individual CustomResourceDefinitions
|
||||
// items list individual CustomResourceDefinition objects
|
||||
repeated CustomResourceDefinition items = 2;
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition
|
||||
message CustomResourceDefinitionNames {
|
||||
// Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration
|
||||
// too: plural.group and it must be all lowercase.
|
||||
// plural is the plural name of the resource to serve.
|
||||
// The custom resources are served under `/apis/<group>/<version>/.../<plural>`.
|
||||
// Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`).
|
||||
// Must be all lowercase.
|
||||
optional string plural = 1;
|
||||
|
||||
// Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased <kind>
|
||||
// singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.
|
||||
// +optional
|
||||
optional string singular = 2;
|
||||
|
||||
// ShortNames are short names for the resource. It must be all lowercase.
|
||||
// shortNames are short names for the resource, exposed in API discovery documents,
|
||||
// and used by clients to support invocations like `kubectl get <shortname>`.
|
||||
// It must be all lowercase.
|
||||
// +optional
|
||||
repeated string shortNames = 3;
|
||||
|
||||
// Kind is the serialized kind of the resource. It is normally CamelCase and singular.
|
||||
// kind is the serialized kind of the resource. It is normally CamelCase and singular.
|
||||
// Custom resource instances will use this value as the `kind` attribute in API calls.
|
||||
optional string kind = 4;
|
||||
|
||||
// ListKind is the serialized kind of the list for this resource. Defaults to <kind>List.
|
||||
// listKind is the serialized kind of the list for this resource. Defaults to "`kind`List".
|
||||
// +optional
|
||||
optional string listKind = 5;
|
||||
|
||||
// Categories is a list of grouped resources custom resources belong to (e.g. 'all')
|
||||
// categories is a list of grouped resources this custom resource belongs to (e.g. 'all').
|
||||
// This is published in API discovery documents, and used by clients to support invocations like
|
||||
// `kubectl get all`.
|
||||
// +optional
|
||||
repeated string categories = 6;
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionSpec describes how a user wants their resource to appear
|
||||
message CustomResourceDefinitionSpec {
|
||||
// Group is the group this resource belongs in
|
||||
// group is the API group of the defined custom resource.
|
||||
// The custom resources are served under `/apis/<group>/...`.
|
||||
// Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`).
|
||||
optional string group = 1;
|
||||
|
||||
// Names are the names used to describe this custom resource
|
||||
// names specify the resource and kind names for the custom resource.
|
||||
optional CustomResourceDefinitionNames names = 3;
|
||||
|
||||
// Scope indicates whether this resource is cluster or namespace scoped.
|
||||
// scope indicates whether the defined custom resource is cluster- or namespace-scoped.
|
||||
// Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.
|
||||
optional string scope = 4;
|
||||
|
||||
// Versions is the list of all supported versions for this resource.
|
||||
// Order: The version name will be used to compute the order.
|
||||
// versions is the list of all API versions of the defined custom resource.
|
||||
// Version names are used to compute the order in which served versions are listed in API discovery.
|
||||
// If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered
|
||||
// lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version),
|
||||
// then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first
|
||||
@ -206,85 +217,89 @@ message CustomResourceDefinitionSpec {
|
||||
// v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
|
||||
repeated CustomResourceDefinitionVersion versions = 7;
|
||||
|
||||
// `conversion` defines conversion settings for the CRD.
|
||||
// conversion defines conversion settings for the CRD.
|
||||
// +optional
|
||||
optional CustomResourceConversion conversion = 9;
|
||||
|
||||
// preserveUnknownFields disables pruning of object fields which are not
|
||||
// specified in the OpenAPI schema. apiVersion, kind, metadata and known
|
||||
// fields inside metadata are always preserved.
|
||||
// preserveUnknownFields indicates that object fields which are not specified
|
||||
// in the OpenAPI schema should be preserved when persisting to storage.
|
||||
// apiVersion, kind, metadata and known fields inside metadata are always preserved.
|
||||
// This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`.
|
||||
// See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.
|
||||
// +optional
|
||||
optional bool preserveUnknownFields = 10;
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition
|
||||
message CustomResourceDefinitionStatus {
|
||||
// Conditions indicate state for particular aspects of a CustomResourceDefinition
|
||||
// conditions indicate state for particular aspects of a CustomResourceDefinition
|
||||
// +optional
|
||||
repeated CustomResourceDefinitionCondition conditions = 1;
|
||||
|
||||
// AcceptedNames are the names that are actually being used to serve discovery
|
||||
// acceptedNames are the names that are actually being used to serve discovery.
|
||||
// They may be different than the names in spec.
|
||||
optional CustomResourceDefinitionNames acceptedNames = 2;
|
||||
|
||||
// StoredVersions are all versions of CustomResources that were ever persisted. Tracking these
|
||||
// storedVersions lists all versions of CustomResources that were ever persisted. Tracking these
|
||||
// versions allows a migration path for stored versions in etcd. The field is mutable
|
||||
// so the migration controller can first finish a migration to another version (i.e.
|
||||
// that no old objects are left in the storage), and then remove the rest of the
|
||||
// so a migration controller can finish a migration to another version (ensuring
|
||||
// no old objects are left in storage), and then remove the rest of the
|
||||
// versions from this list.
|
||||
// None of the versions in this list can be removed from the spec.Versions field.
|
||||
// Versions may not be removed from `spec.versions` while they exist in this list.
|
||||
repeated string storedVersions = 3;
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionVersion describes a version for CRD.
|
||||
message CustomResourceDefinitionVersion {
|
||||
// Name is the version name, e.g. “v1”, “v2beta1”, etc.
|
||||
// name is the version name, e.g. “v1”, “v2beta1”, etc.
|
||||
// The custom resources are served under this version at `/apis/<group>/<version>/...` if `served` is true.
|
||||
optional string name = 1;
|
||||
|
||||
// Served is a flag enabling/disabling this version from being served via REST APIs
|
||||
// served is a flag enabling/disabling this version from being served via REST APIs
|
||||
optional bool served = 2;
|
||||
|
||||
// Storage flags the version as storage version. There must be exactly one
|
||||
// flagged as storage version.
|
||||
// storage indicates this version should be used when persisting custom resources to storage.
|
||||
// There must be exactly one version with storage=true.
|
||||
optional bool storage = 3;
|
||||
|
||||
// Schema describes the schema for CustomResource used in validation, pruning, and defaulting.
|
||||
// schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.
|
||||
// +optional
|
||||
optional CustomResourceValidation schema = 4;
|
||||
|
||||
// Subresources describes the subresources for CustomResource
|
||||
// subresources specify what subresources this version of the defined custom resource have.
|
||||
// +optional
|
||||
optional CustomResourceSubresources subresources = 5;
|
||||
|
||||
// AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column.
|
||||
// additionalPrinterColumns specifies additional columns returned in Table output.
|
||||
// See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details.
|
||||
// If no columns are specified, a single column displaying the age of the custom resource is used.
|
||||
// +optional
|
||||
repeated CustomResourceColumnDefinition additionalPrinterColumns = 6;
|
||||
}
|
||||
|
||||
// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.
|
||||
message CustomResourceSubresourceScale {
|
||||
// SpecReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Spec.Replicas.
|
||||
// specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`.
|
||||
// Only JSON paths without the array notation are allowed.
|
||||
// Must be a JSON Path under .spec.
|
||||
// If there is no value under the given path in the CustomResource, the /scale subresource will return an error on GET.
|
||||
// Must be a JSON Path under `.spec`.
|
||||
// If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.
|
||||
optional string specReplicasPath = 1;
|
||||
|
||||
// StatusReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Replicas.
|
||||
// statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`.
|
||||
// Only JSON paths without the array notation are allowed.
|
||||
// Must be a JSON Path under .status.
|
||||
// If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource
|
||||
// Must be a JSON Path under `.status`.
|
||||
// If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource
|
||||
// will default to 0.
|
||||
optional string statusReplicasPath = 2;
|
||||
|
||||
// LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector.
|
||||
// labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`.
|
||||
// Only JSON paths without the array notation are allowed.
|
||||
// Must be a JSON Path under .status or .spec.
|
||||
// Must be set to work with HPA.
|
||||
// Must be a JSON Path under `.status` or `.spec`.
|
||||
// Must be set to work with HorizontalPodAutoscaler.
|
||||
// The field pointed by this JSON path must be a string field (not a complex selector struct)
|
||||
// which contains a serialized label selector in string form.
|
||||
// More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource
|
||||
// If there is no value under the given path in the CustomResource, the status label selector value in the /scale
|
||||
// If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale`
|
||||
// subresource will default to the empty string.
|
||||
// +optional
|
||||
optional string labelSelectorPath = 3;
|
||||
@ -300,18 +315,21 @@ message CustomResourceSubresourceStatus {
|
||||
|
||||
// CustomResourceSubresources defines the status and scale subresources for CustomResources.
|
||||
message CustomResourceSubresources {
|
||||
// Status denotes the status subresource for CustomResources
|
||||
// status indicates the custom resource should serve a `/status` subresource.
|
||||
// When enabled:
|
||||
// 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object.
|
||||
// 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.
|
||||
// +optional
|
||||
optional CustomResourceSubresourceStatus status = 1;
|
||||
|
||||
// Scale denotes the scale subresource for CustomResources
|
||||
// scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.
|
||||
// +optional
|
||||
optional CustomResourceSubresourceScale scale = 2;
|
||||
}
|
||||
|
||||
// CustomResourceValidation is a list of validation methods for CustomResources.
|
||||
message CustomResourceValidation {
|
||||
// OpenAPIV3Schema is the OpenAPI v3 schema to be validated against.
|
||||
// openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.
|
||||
// +optional
|
||||
optional JSONSchemaProps openAPIV3Schema = 1;
|
||||
}
|
||||
@ -346,7 +364,7 @@ message JSONSchemaProps {
|
||||
optional string title = 7;
|
||||
|
||||
// default is a default value for undefined object fields.
|
||||
// Defaulting is an alpha feature under the CustomResourceDefaulting feature gate.
|
||||
// Defaulting is a beta feature under the CustomResourceDefaulting feature gate.
|
||||
// Defaulting requires spec.preserveUnknownFields to be false.
|
||||
optional JSON default = 8;
|
||||
|
||||
@ -466,30 +484,28 @@ message JSONSchemaPropsOrStringArray {
|
||||
|
||||
// ServiceReference holds a reference to Service.legacy.k8s.io
|
||||
message ServiceReference {
|
||||
// `namespace` is the namespace of the service.
|
||||
// namespace is the namespace of the service.
|
||||
// Required
|
||||
optional string namespace = 1;
|
||||
|
||||
// `name` is the name of the service.
|
||||
// name is the name of the service.
|
||||
// Required
|
||||
optional string name = 2;
|
||||
|
||||
// `path` is an optional URL path which will be sent in any request to
|
||||
// this service.
|
||||
// path is an optional URL path at which the webhook will be contacted.
|
||||
// +optional
|
||||
optional string path = 3;
|
||||
|
||||
// If specified, the port on the service that hosting webhook.
|
||||
// Default to 443 for backward compatibility.
|
||||
// port is an optional service port at which the webhook will be contacted.
|
||||
// `port` should be a valid port number (1-65535, inclusive).
|
||||
// Defaults to 443 for backward compatibility.
|
||||
// +optional
|
||||
optional int32 port = 4;
|
||||
}
|
||||
|
||||
// WebhookClientConfig contains the information to make a TLS
|
||||
// connection with the webhook. It has the same field as admissionregistration.v1.WebhookClientConfig.
|
||||
// WebhookClientConfig contains the information to make a TLS connection with the webhook.
|
||||
message WebhookClientConfig {
|
||||
// `url` gives the location of the webhook, in standard URL form
|
||||
// url gives the location of the webhook, in standard URL form
|
||||
// (`scheme://host:port/path`). Exactly one of `url` or `service`
|
||||
// must be specified.
|
||||
//
|
||||
@ -518,15 +534,15 @@ message WebhookClientConfig {
|
||||
// +optional
|
||||
optional string url = 3;
|
||||
|
||||
// `service` is a reference to the service for this webhook. Either
|
||||
// `service` or `url` must be specified.
|
||||
// service is a reference to the service for this webhook. Either
|
||||
// service or url must be specified.
|
||||
//
|
||||
// If the webhook is running within the cluster, then you should use `service`.
|
||||
//
|
||||
// +optional
|
||||
optional ServiceReference service = 1;
|
||||
|
||||
// `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
|
||||
// caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
|
||||
// If unspecified, system trust roots on the apiserver are used.
|
||||
// +optional
|
||||
optional bytes caBundle = 2;
|
||||
@ -534,14 +550,14 @@ message WebhookClientConfig {
|
||||
|
||||
// WebhookConversion describes how to call a conversion webhook
|
||||
message WebhookConversion {
|
||||
// `clientConfig` is the instructions for how to call the webhook if strategy is `Webhook`.
|
||||
// clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.
|
||||
// +optional
|
||||
optional WebhookClientConfig clientConfig = 2;
|
||||
|
||||
// ConversionReviewVersions is an ordered list of preferred `ConversionReview`
|
||||
// versions the Webhook expects. API server will try to use first version in
|
||||
// conversionReviewVersions is an ordered list of preferred `ConversionReview`
|
||||
// versions the Webhook expects. The API server will use the first version in
|
||||
// the list which it supports. If none of the versions specified in this list
|
||||
// supported by API server, conversion will fail for this object.
|
||||
// are supported by API server, conversion will fail for the custom resource.
|
||||
// If a persisted Webhook configuration specifies allowed versions and does not
|
||||
// include any versions known to the API Server, calls to the webhook will fail.
|
||||
repeated string conversionReviewVersions = 3;
|
||||
|
@ -26,6 +26,11 @@ import (
|
||||
type ConversionStrategyType string
|
||||
|
||||
const (
|
||||
// KubeAPIApprovedAnnotation is an annotation that must be set to create a CRD for the k8s.io, *.k8s.io, kubernetes.io, or *.kubernetes.io namespaces.
|
||||
// The value should be a link to a URL where the current spec was approved, so updates to the spec should also update the URL.
|
||||
// If the API is unapproved, you may set the annotation to a string starting with `"unapproved"`. For instance, `"unapproved, temporarily squatting"` or `"unapproved, experimental-only"`. This is discouraged.
|
||||
KubeAPIApprovedAnnotation = "api-approved.kubernetes.io"
|
||||
|
||||
// NoneConverter is a converter that only sets apiversion of the CR and leave everything else unchanged.
|
||||
NoneConverter ConversionStrategyType = "None"
|
||||
// WebhookConverter is a converter that calls to an external webhook to convert the CR.
|
||||
@ -34,14 +39,17 @@ const (
|
||||
|
||||
// CustomResourceDefinitionSpec describes how a user wants their resource to appear
|
||||
type CustomResourceDefinitionSpec struct {
|
||||
// Group is the group this resource belongs in
|
||||
// group is the API group of the defined custom resource.
|
||||
// The custom resources are served under `/apis/<group>/...`.
|
||||
// Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`).
|
||||
Group string `json:"group" protobuf:"bytes,1,opt,name=group"`
|
||||
// Names are the names used to describe this custom resource
|
||||
// names specify the resource and kind names for the custom resource.
|
||||
Names CustomResourceDefinitionNames `json:"names" protobuf:"bytes,3,opt,name=names"`
|
||||
// Scope indicates whether this resource is cluster or namespace scoped.
|
||||
// scope indicates whether the defined custom resource is cluster- or namespace-scoped.
|
||||
// Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.
|
||||
Scope ResourceScope `json:"scope" protobuf:"bytes,4,opt,name=scope,casttype=ResourceScope"`
|
||||
// Versions is the list of all supported versions for this resource.
|
||||
// Order: The version name will be used to compute the order.
|
||||
// versions is the list of all API versions of the defined custom resource.
|
||||
// Version names are used to compute the order in which served versions are listed in API discovery.
|
||||
// If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered
|
||||
// lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version),
|
||||
// then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first
|
||||
@ -50,50 +58,50 @@ type CustomResourceDefinitionSpec struct {
|
||||
// v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
|
||||
Versions []CustomResourceDefinitionVersion `json:"versions" protobuf:"bytes,7,rep,name=versions"`
|
||||
|
||||
// `conversion` defines conversion settings for the CRD.
|
||||
// conversion defines conversion settings for the CRD.
|
||||
// +optional
|
||||
Conversion *CustomResourceConversion `json:"conversion,omitempty" protobuf:"bytes,9,opt,name=conversion"`
|
||||
|
||||
// preserveUnknownFields disables pruning of object fields which are not
|
||||
// specified in the OpenAPI schema. apiVersion, kind, metadata and known
|
||||
// fields inside metadata are always preserved.
|
||||
// preserveUnknownFields indicates that object fields which are not specified
|
||||
// in the OpenAPI schema should be preserved when persisting to storage.
|
||||
// apiVersion, kind, metadata and known fields inside metadata are always preserved.
|
||||
// This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`.
|
||||
// See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.
|
||||
// +optional
|
||||
PreserveUnknownFields bool `json:"preserveUnknownFields,omitempty" protobuf:"varint,10,opt,name=preserveUnknownFields"`
|
||||
}
|
||||
|
||||
// CustomResourceConversion describes how to convert different versions of a CR.
|
||||
type CustomResourceConversion struct {
|
||||
// `strategy` specifies the conversion strategy. Allowed values are:
|
||||
// - `None`: The converter only change the apiVersion and would not touch any other field in the CR.
|
||||
// strategy specifies how custom resources are converted between versions. Allowed values are:
|
||||
// - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource.
|
||||
// - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information
|
||||
// is needed for this option. This requires spec.preserveUnknownFields to be false.
|
||||
// is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.
|
||||
Strategy ConversionStrategyType `json:"strategy" protobuf:"bytes,1,name=strategy"`
|
||||
|
||||
// webhook describes how to call the conversion webhook. Required when strategy is "Webhook".
|
||||
// webhook describes how to call the conversion webhook. Required when `strategy` is set to `Webhook`.
|
||||
// +optional
|
||||
Webhook *WebhookConversion `json:"webhook,omitempty" protobuf:"bytes,2,opt,name=webhook"`
|
||||
}
|
||||
|
||||
// WebhookConversion describes how to call a conversion webhook
|
||||
type WebhookConversion struct {
|
||||
// `clientConfig` is the instructions for how to call the webhook if strategy is `Webhook`.
|
||||
// clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.
|
||||
// +optional
|
||||
ClientConfig *WebhookClientConfig `json:"clientConfig,omitempty" protobuf:"bytes,2,name=clientConfig"`
|
||||
|
||||
// ConversionReviewVersions is an ordered list of preferred `ConversionReview`
|
||||
// versions the Webhook expects. API server will try to use first version in
|
||||
// conversionReviewVersions is an ordered list of preferred `ConversionReview`
|
||||
// versions the Webhook expects. The API server will use the first version in
|
||||
// the list which it supports. If none of the versions specified in this list
|
||||
// supported by API server, conversion will fail for this object.
|
||||
// are supported by API server, conversion will fail for the custom resource.
|
||||
// If a persisted Webhook configuration specifies allowed versions and does not
|
||||
// include any versions known to the API Server, calls to the webhook will fail.
|
||||
ConversionReviewVersions []string `json:"conversionReviewVersions" protobuf:"bytes,3,rep,name=conversionReviewVersions"`
|
||||
}
|
||||
|
||||
// WebhookClientConfig contains the information to make a TLS
|
||||
// connection with the webhook. It has the same field as admissionregistration.v1.WebhookClientConfig.
|
||||
// WebhookClientConfig contains the information to make a TLS connection with the webhook.
|
||||
type WebhookClientConfig struct {
|
||||
// `url` gives the location of the webhook, in standard URL form
|
||||
// url gives the location of the webhook, in standard URL form
|
||||
// (`scheme://host:port/path`). Exactly one of `url` or `service`
|
||||
// must be specified.
|
||||
//
|
||||
@ -122,15 +130,15 @@ type WebhookClientConfig struct {
|
||||
// +optional
|
||||
URL *string `json:"url,omitempty" protobuf:"bytes,3,opt,name=url"`
|
||||
|
||||
// `service` is a reference to the service for this webhook. Either
|
||||
// `service` or `url` must be specified.
|
||||
// service is a reference to the service for this webhook. Either
|
||||
// service or url must be specified.
|
||||
//
|
||||
// If the webhook is running within the cluster, then you should use `service`.
|
||||
//
|
||||
// +optional
|
||||
Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,1,opt,name=service"`
|
||||
|
||||
// `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
|
||||
// caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
|
||||
// If unspecified, system trust roots on the apiserver are used.
|
||||
// +optional
|
||||
CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,2,opt,name=caBundle"`
|
||||
@ -138,41 +146,43 @@ type WebhookClientConfig struct {
|
||||
|
||||
// ServiceReference holds a reference to Service.legacy.k8s.io
|
||||
type ServiceReference struct {
|
||||
// `namespace` is the namespace of the service.
|
||||
// namespace is the namespace of the service.
|
||||
// Required
|
||||
Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"`
|
||||
// `name` is the name of the service.
|
||||
// name is the name of the service.
|
||||
// Required
|
||||
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
|
||||
|
||||
// `path` is an optional URL path which will be sent in any request to
|
||||
// this service.
|
||||
// path is an optional URL path at which the webhook will be contacted.
|
||||
// +optional
|
||||
Path *string `json:"path,omitempty" protobuf:"bytes,3,opt,name=path"`
|
||||
|
||||
// If specified, the port on the service that hosting webhook.
|
||||
// Default to 443 for backward compatibility.
|
||||
// port is an optional service port at which the webhook will be contacted.
|
||||
// `port` should be a valid port number (1-65535, inclusive).
|
||||
// Defaults to 443 for backward compatibility.
|
||||
// +optional
|
||||
Port *int32 `json:"port,omitempty" protobuf:"varint,4,opt,name=port"`
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionVersion describes a version for CRD.
|
||||
type CustomResourceDefinitionVersion struct {
|
||||
// Name is the version name, e.g. “v1”, “v2beta1”, etc.
|
||||
// name is the version name, e.g. “v1”, “v2beta1”, etc.
|
||||
// The custom resources are served under this version at `/apis/<group>/<version>/...` if `served` is true.
|
||||
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
||||
// Served is a flag enabling/disabling this version from being served via REST APIs
|
||||
// served is a flag enabling/disabling this version from being served via REST APIs
|
||||
Served bool `json:"served" protobuf:"varint,2,opt,name=served"`
|
||||
// Storage flags the version as storage version. There must be exactly one
|
||||
// flagged as storage version.
|
||||
// storage indicates this version should be used when persisting custom resources to storage.
|
||||
// There must be exactly one version with storage=true.
|
||||
Storage bool `json:"storage" protobuf:"varint,3,opt,name=storage"`
|
||||
// Schema describes the schema for CustomResource used in validation, pruning, and defaulting.
|
||||
// schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.
|
||||
// +optional
|
||||
Schema *CustomResourceValidation `json:"schema,omitempty" protobuf:"bytes,4,opt,name=schema"`
|
||||
// Subresources describes the subresources for CustomResource
|
||||
// subresources specify what subresources this version of the defined custom resource have.
|
||||
// +optional
|
||||
Subresources *CustomResourceSubresources `json:"subresources,omitempty" protobuf:"bytes,5,opt,name=subresources"`
|
||||
// AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column.
|
||||
// additionalPrinterColumns specifies additional columns returned in Table output.
|
||||
// See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details.
|
||||
// If no columns are specified, a single column displaying the age of the custom resource is used.
|
||||
// +optional
|
||||
AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,6,rep,name=additionalPrinterColumns"`
|
||||
}
|
||||
@ -182,11 +192,11 @@ type CustomResourceColumnDefinition struct {
|
||||
// name is a human readable name for the column.
|
||||
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
||||
// type is an OpenAPI type definition for this column.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.
|
||||
Type string `json:"type" protobuf:"bytes,2,opt,name=type"`
|
||||
// format is an optional OpenAPI type definition for this column. The 'name' format is applied
|
||||
// to the primary identifier column to assist in clients identifying column is the resource name.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.
|
||||
// +optional
|
||||
Format string `json:"format,omitempty" protobuf:"bytes,3,opt,name=format"`
|
||||
// description is a human readable description of this column.
|
||||
@ -194,31 +204,38 @@ type CustomResourceColumnDefinition struct {
|
||||
Description string `json:"description,omitempty" protobuf:"bytes,4,opt,name=description"`
|
||||
// priority is an integer defining the relative importance of this column compared to others. Lower
|
||||
// numbers are considered higher priority. Columns that may be omitted in limited space scenarios
|
||||
// should be given a higher priority.
|
||||
// should be given a priority greater than 0.
|
||||
// +optional
|
||||
Priority int32 `json:"priority,omitempty" protobuf:"bytes,5,opt,name=priority"`
|
||||
|
||||
// JSONPath is a simple JSON path, i.e. with array notation.
|
||||
// jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against
|
||||
// each custom resource to produce the value for this column.
|
||||
JSONPath string `json:"jsonPath" protobuf:"bytes,6,opt,name=jsonPath"`
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition
|
||||
type CustomResourceDefinitionNames struct {
|
||||
// Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration
|
||||
// too: plural.group and it must be all lowercase.
|
||||
// plural is the plural name of the resource to serve.
|
||||
// The custom resources are served under `/apis/<group>/<version>/.../<plural>`.
|
||||
// Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`).
|
||||
// Must be all lowercase.
|
||||
Plural string `json:"plural" protobuf:"bytes,1,opt,name=plural"`
|
||||
// Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased <kind>
|
||||
// singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.
|
||||
// +optional
|
||||
Singular string `json:"singular,omitempty" protobuf:"bytes,2,opt,name=singular"`
|
||||
// ShortNames are short names for the resource. It must be all lowercase.
|
||||
// shortNames are short names for the resource, exposed in API discovery documents,
|
||||
// and used by clients to support invocations like `kubectl get <shortname>`.
|
||||
// It must be all lowercase.
|
||||
// +optional
|
||||
ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,3,opt,name=shortNames"`
|
||||
// Kind is the serialized kind of the resource. It is normally CamelCase and singular.
|
||||
// kind is the serialized kind of the resource. It is normally CamelCase and singular.
|
||||
// Custom resource instances will use this value as the `kind` attribute in API calls.
|
||||
Kind string `json:"kind" protobuf:"bytes,4,opt,name=kind"`
|
||||
// ListKind is the serialized kind of the list for this resource. Defaults to <kind>List.
|
||||
// listKind is the serialized kind of the list for this resource. Defaults to "`kind`List".
|
||||
// +optional
|
||||
ListKind string `json:"listKind,omitempty" protobuf:"bytes,5,opt,name=listKind"`
|
||||
// Categories is a list of grouped resources custom resources belong to (e.g. 'all')
|
||||
// categories is a list of grouped resources this custom resource belongs to (e.g. 'all').
|
||||
// This is published in API discovery documents, and used by clients to support invocations like
|
||||
// `kubectl get all`.
|
||||
// +optional
|
||||
Categories []string `json:"categories,omitempty" protobuf:"bytes,6,rep,name=categories"`
|
||||
}
|
||||
@ -272,42 +289,47 @@ const (
|
||||
NonStructuralSchema CustomResourceDefinitionConditionType = "NonStructuralSchema"
|
||||
// Terminating means that the CustomResourceDefinition has been deleted and is cleaning up.
|
||||
Terminating CustomResourceDefinitionConditionType = "Terminating"
|
||||
// KubernetesAPIApprovalPolicyConformant indicates that an API in *.k8s.io or *.kubernetes.io is or is not approved. For CRDs
|
||||
// outside those groups, this condition will not be set. For CRDs inside those groups, the condition will
|
||||
// be true if .metadata.annotations["api-approved.kubernetes.io"] is set to a URL, otherwise it will be false.
|
||||
// See https://github.com/kubernetes/enhancements/pull/1111 for more details.
|
||||
KubernetesAPIApprovalPolicyConformant CustomResourceDefinitionConditionType = "KubernetesAPIApprovalPolicyConformant"
|
||||
)
|
||||
|
||||
// CustomResourceDefinitionCondition contains details for the current condition of this pod.
|
||||
type CustomResourceDefinitionCondition struct {
|
||||
// Type is the type of the condition. Types include Established, NamesAccepted and Terminating.
|
||||
// type is the type of the condition. Types include Established, NamesAccepted and Terminating.
|
||||
Type CustomResourceDefinitionConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=CustomResourceDefinitionConditionType"`
|
||||
// Status is the status of the condition.
|
||||
// status is the status of the condition.
|
||||
// Can be True, False, Unknown.
|
||||
Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
|
||||
// Last time the condition transitioned from one status to another.
|
||||
// lastTransitionTime last time the condition transitioned from one status to another.
|
||||
// +optional
|
||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
|
||||
// Unique, one-word, CamelCase reason for the condition's last transition.
|
||||
// reason is a unique, one-word, CamelCase reason for the condition's last transition.
|
||||
// +optional
|
||||
Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
|
||||
// Human-readable message indicating details about last transition.
|
||||
// message is a human-readable message indicating details about last transition.
|
||||
// +optional
|
||||
Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition
|
||||
type CustomResourceDefinitionStatus struct {
|
||||
// Conditions indicate state for particular aspects of a CustomResourceDefinition
|
||||
// conditions indicate state for particular aspects of a CustomResourceDefinition
|
||||
// +optional
|
||||
Conditions []CustomResourceDefinitionCondition `json:"conditions" protobuf:"bytes,1,opt,name=conditions"`
|
||||
|
||||
// AcceptedNames are the names that are actually being used to serve discovery
|
||||
// acceptedNames are the names that are actually being used to serve discovery.
|
||||
// They may be different than the names in spec.
|
||||
AcceptedNames CustomResourceDefinitionNames `json:"acceptedNames" protobuf:"bytes,2,opt,name=acceptedNames"`
|
||||
|
||||
// StoredVersions are all versions of CustomResources that were ever persisted. Tracking these
|
||||
// storedVersions lists all versions of CustomResources that were ever persisted. Tracking these
|
||||
// versions allows a migration path for stored versions in etcd. The field is mutable
|
||||
// so the migration controller can first finish a migration to another version (i.e.
|
||||
// that no old objects are left in the storage), and then remove the rest of the
|
||||
// so a migration controller can finish a migration to another version (ensuring
|
||||
// no old objects are left in storage), and then remove the rest of the
|
||||
// versions from this list.
|
||||
// None of the versions in this list can be removed from the spec.Versions field.
|
||||
// Versions may not be removed from `spec.versions` while they exist in this list.
|
||||
StoredVersions []string `json:"storedVersions" protobuf:"bytes,3,rep,name=storedVersions"`
|
||||
}
|
||||
|
||||
@ -325,9 +347,9 @@ type CustomResourceDefinition struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec describes how the user wants the resources to appear
|
||||
// spec describes how the user wants the resources to appear
|
||||
Spec CustomResourceDefinitionSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
||||
// Status indicates the actual state of the CustomResourceDefinition
|
||||
// status indicates the actual state of the CustomResourceDefinition
|
||||
// +optional
|
||||
Status CustomResourceDefinitionStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||
}
|
||||
@ -339,23 +361,26 @@ type CustomResourceDefinitionList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items individual CustomResourceDefinitions
|
||||
// items list individual CustomResourceDefinition objects
|
||||
Items []CustomResourceDefinition `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// CustomResourceValidation is a list of validation methods for CustomResources.
|
||||
type CustomResourceValidation struct {
|
||||
// OpenAPIV3Schema is the OpenAPI v3 schema to be validated against.
|
||||
// openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.
|
||||
// +optional
|
||||
OpenAPIV3Schema *JSONSchemaProps `json:"openAPIV3Schema,omitempty" protobuf:"bytes,1,opt,name=openAPIV3Schema"`
|
||||
}
|
||||
|
||||
// CustomResourceSubresources defines the status and scale subresources for CustomResources.
|
||||
type CustomResourceSubresources struct {
|
||||
// Status denotes the status subresource for CustomResources
|
||||
// status indicates the custom resource should serve a `/status` subresource.
|
||||
// When enabled:
|
||||
// 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object.
|
||||
// 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.
|
||||
// +optional
|
||||
Status *CustomResourceSubresourceStatus `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"`
|
||||
// Scale denotes the scale subresource for CustomResources
|
||||
// scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.
|
||||
// +optional
|
||||
Scale *CustomResourceSubresourceScale `json:"scale,omitempty" protobuf:"bytes,2,opt,name=scale"`
|
||||
}
|
||||
@ -369,25 +394,25 @@ type CustomResourceSubresourceStatus struct{}
|
||||
|
||||
// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.
|
||||
type CustomResourceSubresourceScale struct {
|
||||
// SpecReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Spec.Replicas.
|
||||
// specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`.
|
||||
// Only JSON paths without the array notation are allowed.
|
||||
// Must be a JSON Path under .spec.
|
||||
// If there is no value under the given path in the CustomResource, the /scale subresource will return an error on GET.
|
||||
// Must be a JSON Path under `.spec`.
|
||||
// If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.
|
||||
SpecReplicasPath string `json:"specReplicasPath" protobuf:"bytes,1,name=specReplicasPath"`
|
||||
// StatusReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Replicas.
|
||||
// statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`.
|
||||
// Only JSON paths without the array notation are allowed.
|
||||
// Must be a JSON Path under .status.
|
||||
// If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource
|
||||
// Must be a JSON Path under `.status`.
|
||||
// If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource
|
||||
// will default to 0.
|
||||
StatusReplicasPath string `json:"statusReplicasPath" protobuf:"bytes,2,opt,name=statusReplicasPath"`
|
||||
// LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector.
|
||||
// labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`.
|
||||
// Only JSON paths without the array notation are allowed.
|
||||
// Must be a JSON Path under .status or .spec.
|
||||
// Must be set to work with HPA.
|
||||
// Must be a JSON Path under `.status` or `.spec`.
|
||||
// Must be set to work with HorizontalPodAutoscaler.
|
||||
// The field pointed by this JSON path must be a string field (not a complex selector struct)
|
||||
// which contains a serialized label selector in string form.
|
||||
// More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource
|
||||
// If there is no value under the given path in the CustomResource, the status label selector value in the /scale
|
||||
// If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale`
|
||||
// subresource will default to the empty string.
|
||||
// +optional
|
||||
LabelSelectorPath *string `json:"labelSelectorPath,omitempty" protobuf:"bytes,3,opt,name=labelSelectorPath"`
|
||||
@ -398,39 +423,39 @@ type CustomResourceSubresourceScale struct {
|
||||
// ConversionReview describes a conversion request/response.
|
||||
type ConversionReview struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// `request` describes the attributes for the conversion request.
|
||||
// request describes the attributes for the conversion request.
|
||||
// +optional
|
||||
Request *ConversionRequest `json:"request,omitempty" protobuf:"bytes,1,opt,name=request"`
|
||||
// `response` describes the attributes for the conversion response.
|
||||
// response describes the attributes for the conversion response.
|
||||
// +optional
|
||||
Response *ConversionResponse `json:"response,omitempty" protobuf:"bytes,2,opt,name=response"`
|
||||
}
|
||||
|
||||
// ConversionRequest describes the conversion request parameters.
|
||||
type ConversionRequest struct {
|
||||
// `uid` is an identifier for the individual request/response. It allows us to distinguish instances of requests which are
|
||||
// otherwise identical (parallel requests, requests when earlier requests did not modify etc)
|
||||
// The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.
|
||||
// uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are
|
||||
// otherwise identical (parallel requests, etc).
|
||||
// The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request.
|
||||
// It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.
|
||||
UID types.UID `json:"uid" protobuf:"bytes,1,name=uid"`
|
||||
// `desiredAPIVersion` is the version to convert given objects to. e.g. "myapi.example.com/v1"
|
||||
// desiredAPIVersion is the version to convert given objects to. e.g. "myapi.example.com/v1"
|
||||
DesiredAPIVersion string `json:"desiredAPIVersion" protobuf:"bytes,2,name=desiredAPIVersion"`
|
||||
// `objects` is the list of CR objects to be converted.
|
||||
// objects is the list of custom resource objects to be converted.
|
||||
Objects []runtime.RawExtension `json:"objects" protobuf:"bytes,3,rep,name=objects"`
|
||||
}
|
||||
|
||||
// ConversionResponse describes a conversion response.
|
||||
type ConversionResponse struct {
|
||||
// `uid` is an identifier for the individual request/response.
|
||||
// This should be copied over from the corresponding ConversionRequest.
|
||||
// uid is an identifier for the individual request/response.
|
||||
// This should be copied over from the corresponding `request.uid`.
|
||||
UID types.UID `json:"uid" protobuf:"bytes,1,name=uid"`
|
||||
// `convertedObjects` is the list of converted version of `request.objects` if the `result` is successful otherwise empty.
|
||||
// The webhook is expected to set apiVersion of these objects to the ConversionRequest.desiredAPIVersion. The list
|
||||
// must also have the same size as the input list with the same objects in the same order (equal kind, UID, name and namespace).
|
||||
// convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty.
|
||||
// The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list
|
||||
// must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace).
|
||||
// The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored.
|
||||
ConvertedObjects []runtime.RawExtension `json:"convertedObjects" protobuf:"bytes,2,rep,name=convertedObjects"`
|
||||
// `result` contains the result of conversion with extra details if the conversion failed. `result.status` determines if
|
||||
// the conversion failed or succeeded. The `result.status` field is required and represent the success or failure of the
|
||||
// result contains the result of conversion with extra details if the conversion failed. `result.status` determines if
|
||||
// the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the
|
||||
// conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set
|
||||
// `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message`
|
||||
// will be used to construct an error message for the end user.
|
||||
|
@ -26,7 +26,7 @@ type JSONSchemaProps struct {
|
||||
Format string `json:"format,omitempty" protobuf:"bytes,6,opt,name=format"`
|
||||
Title string `json:"title,omitempty" protobuf:"bytes,7,opt,name=title"`
|
||||
// default is a default value for undefined object fields.
|
||||
// Defaulting is an alpha feature under the CustomResourceDefaulting feature gate.
|
||||
// Defaulting is a beta feature under the CustomResourceDefaulting feature gate.
|
||||
// Defaulting requires spec.preserveUnknownFields to be false.
|
||||
Default *JSON `json:"default,omitempty" protobuf:"bytes,8,opt,name=default"`
|
||||
Maximum *float64 `json:"maximum,omitempty" protobuf:"bytes,9,opt,name=maximum"`
|
||||
|
@ -30,33 +30,33 @@ option go_package = "v1beta1";
|
||||
|
||||
// ConversionRequest describes the conversion request parameters.
|
||||
message ConversionRequest {
|
||||
// `uid` is an identifier for the individual request/response. It allows us to distinguish instances of requests which are
|
||||
// otherwise identical (parallel requests, requests when earlier requests did not modify etc)
|
||||
// The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.
|
||||
// uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are
|
||||
// otherwise identical (parallel requests, etc).
|
||||
// The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request.
|
||||
// It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.
|
||||
optional string uid = 1;
|
||||
|
||||
// `desiredAPIVersion` is the version to convert given objects to. e.g. "myapi.example.com/v1"
|
||||
// desiredAPIVersion is the version to convert given objects to. e.g. "myapi.example.com/v1"
|
||||
optional string desiredAPIVersion = 2;
|
||||
|
||||
// `objects` is the list of CR objects to be converted.
|
||||
// objects is the list of custom resource objects to be converted.
|
||||
repeated k8s.io.apimachinery.pkg.runtime.RawExtension objects = 3;
|
||||
}
|
||||
|
||||
// ConversionResponse describes a conversion response.
|
||||
message ConversionResponse {
|
||||
// `uid` is an identifier for the individual request/response.
|
||||
// This should be copied over from the corresponding ConversionRequest.
|
||||
// uid is an identifier for the individual request/response.
|
||||
// This should be copied over from the corresponding `request.uid`.
|
||||
optional string uid = 1;
|
||||
|
||||
// `convertedObjects` is the list of converted version of `request.objects` if the `result` is successful otherwise empty.
|
||||
// The webhook is expected to set apiVersion of these objects to the ConversionRequest.desiredAPIVersion. The list
|
||||
// must also have the same size as the input list with the same objects in the same order (equal kind, UID, name and namespace).
|
||||
// convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty.
|
||||
// The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list
|
||||
// must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace).
|
||||
// The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored.
|
||||
repeated k8s.io.apimachinery.pkg.runtime.RawExtension convertedObjects = 2;
|
||||
|
||||
// `result` contains the result of conversion with extra details if the conversion failed. `result.status` determines if
|
||||
// the conversion failed or succeeded. The `result.status` field is required and represent the success or failure of the
|
||||
// result contains the result of conversion with extra details if the conversion failed. `result.status` determines if
|
||||
// the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the
|
||||
// conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set
|
||||
// `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message`
|
||||
// will be used to construct an error message for the end user.
|
||||
@ -65,11 +65,11 @@ message ConversionResponse {
|
||||
|
||||
// ConversionReview describes a conversion request/response.
|
||||
message ConversionReview {
|
||||
// `request` describes the attributes for the conversion request.
|
||||
// request describes the attributes for the conversion request.
|
||||
// +optional
|
||||
optional ConversionRequest request = 1;
|
||||
|
||||
// `response` describes the attributes for the conversion response.
|
||||
// response describes the attributes for the conversion response.
|
||||
// +optional
|
||||
optional ConversionResponse response = 2;
|
||||
}
|
||||
@ -80,12 +80,12 @@ message CustomResourceColumnDefinition {
|
||||
optional string name = 1;
|
||||
|
||||
// type is an OpenAPI type definition for this column.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.
|
||||
optional string type = 2;
|
||||
|
||||
// format is an optional OpenAPI type definition for this column. The 'name' format is applied
|
||||
// to the primary identifier column to assist in clients identifying column is the resource name.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.
|
||||
// +optional
|
||||
optional string format = 3;
|
||||
|
||||
@ -95,34 +95,35 @@ message CustomResourceColumnDefinition {
|
||||
|
||||
// priority is an integer defining the relative importance of this column compared to others. Lower
|
||||
// numbers are considered higher priority. Columns that may be omitted in limited space scenarios
|
||||
// should be given a higher priority.
|
||||
// should be given a priority greater than 0.
|
||||
// +optional
|
||||
optional int32 priority = 5;
|
||||
|
||||
// JSONPath is a simple JSON path, i.e. with array notation.
|
||||
// JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against
|
||||
// each custom resource to produce the value for this column.
|
||||
optional string JSONPath = 6;
|
||||
}
|
||||
|
||||
// CustomResourceConversion describes how to convert different versions of a CR.
|
||||
message CustomResourceConversion {
|
||||
// `strategy` specifies the conversion strategy. Allowed values are:
|
||||
// - `None`: The converter only change the apiVersion and would not touch any other field in the CR.
|
||||
// strategy specifies how custom resources are converted between versions. Allowed values are:
|
||||
// - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource.
|
||||
// - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information
|
||||
// is needed for this option. This requires spec.preserveUnknownFields to be false.
|
||||
// is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set.
|
||||
optional string strategy = 1;
|
||||
|
||||
// `webhookClientConfig` is the instructions for how to call the webhook if strategy is `Webhook`. This field is
|
||||
// alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature.
|
||||
// webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`.
|
||||
// Required when `strategy` is set to `Webhook`.
|
||||
// +optional
|
||||
optional WebhookClientConfig webhookClientConfig = 2;
|
||||
|
||||
// ConversionReviewVersions is an ordered list of preferred `ConversionReview`
|
||||
// versions the Webhook expects. API server will try to use first version in
|
||||
// conversionReviewVersions is an ordered list of preferred `ConversionReview`
|
||||
// versions the Webhook expects. The API server will use the first version in
|
||||
// the list which it supports. If none of the versions specified in this list
|
||||
// supported by API server, conversion will fail for this object.
|
||||
// are supported by API server, conversion will fail for the custom resource.
|
||||
// If a persisted Webhook configuration specifies allowed versions and does not
|
||||
// include any versions known to the API Server, calls to the webhook will fail.
|
||||
// Default to `['v1beta1']`.
|
||||
// Defaults to `["v1beta1"]`.
|
||||
// +optional
|
||||
repeated string conversionReviewVersions = 3;
|
||||
}
|
||||
@ -133,32 +134,32 @@ message CustomResourceConversion {
|
||||
message CustomResourceDefinition {
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec describes how the user wants the resources to appear
|
||||
// spec describes how the user wants the resources to appear
|
||||
optional CustomResourceDefinitionSpec spec = 2;
|
||||
|
||||
// Status indicates the actual state of the CustomResourceDefinition
|
||||
// status indicates the actual state of the CustomResourceDefinition
|
||||
// +optional
|
||||
optional CustomResourceDefinitionStatus status = 3;
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionCondition contains details for the current condition of this pod.
|
||||
message CustomResourceDefinitionCondition {
|
||||
// Type is the type of the condition. Types include Established, NamesAccepted and Terminating.
|
||||
// type is the type of the condition. Types include Established, NamesAccepted and Terminating.
|
||||
optional string type = 1;
|
||||
|
||||
// Status is the status of the condition.
|
||||
// status is the status of the condition.
|
||||
// Can be True, False, Unknown.
|
||||
optional string status = 2;
|
||||
|
||||
// Last time the condition transitioned from one status to another.
|
||||
// lastTransitionTime last time the condition transitioned from one status to another.
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
|
||||
|
||||
// Unique, one-word, CamelCase reason for the condition's last transition.
|
||||
// reason is a unique, one-word, CamelCase reason for the condition's last transition.
|
||||
// +optional
|
||||
optional string reason = 4;
|
||||
|
||||
// Human-readable message indicating details about last transition.
|
||||
// message is a human-readable message indicating details about last transition.
|
||||
// +optional
|
||||
optional string message = 5;
|
||||
}
|
||||
@ -167,71 +168,81 @@ message CustomResourceDefinitionCondition {
|
||||
message CustomResourceDefinitionList {
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items individual CustomResourceDefinitions
|
||||
// items list individual CustomResourceDefinition objects
|
||||
repeated CustomResourceDefinition items = 2;
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition
|
||||
message CustomResourceDefinitionNames {
|
||||
// Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration
|
||||
// too: plural.group and it must be all lowercase.
|
||||
// plural is the plural name of the resource to serve.
|
||||
// The custom resources are served under `/apis/<group>/<version>/.../<plural>`.
|
||||
// Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`).
|
||||
// Must be all lowercase.
|
||||
optional string plural = 1;
|
||||
|
||||
// Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased <kind>
|
||||
// singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.
|
||||
// +optional
|
||||
optional string singular = 2;
|
||||
|
||||
// ShortNames are short names for the resource. It must be all lowercase.
|
||||
// shortNames are short names for the resource, exposed in API discovery documents,
|
||||
// and used by clients to support invocations like `kubectl get <shortname>`.
|
||||
// It must be all lowercase.
|
||||
// +optional
|
||||
repeated string shortNames = 3;
|
||||
|
||||
// Kind is the serialized kind of the resource. It is normally CamelCase and singular.
|
||||
// kind is the serialized kind of the resource. It is normally CamelCase and singular.
|
||||
// Custom resource instances will use this value as the `kind` attribute in API calls.
|
||||
optional string kind = 4;
|
||||
|
||||
// ListKind is the serialized kind of the list for this resource. Defaults to <kind>List.
|
||||
// listKind is the serialized kind of the list for this resource. Defaults to "`kind`List".
|
||||
// +optional
|
||||
optional string listKind = 5;
|
||||
|
||||
// Categories is a list of grouped resources custom resources belong to (e.g. 'all')
|
||||
// categories is a list of grouped resources this custom resource belongs to (e.g. 'all').
|
||||
// This is published in API discovery documents, and used by clients to support invocations like
|
||||
// `kubectl get all`.
|
||||
// +optional
|
||||
repeated string categories = 6;
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionSpec describes how a user wants their resource to appear
|
||||
message CustomResourceDefinitionSpec {
|
||||
// Group is the group this resource belongs in
|
||||
// group is the API group of the defined custom resource.
|
||||
// The custom resources are served under `/apis/<group>/...`.
|
||||
// Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`).
|
||||
optional string group = 1;
|
||||
|
||||
// Version is the version this resource belongs in
|
||||
// Should be always first item in Versions field if provided.
|
||||
// Optional, but at least one of Version or Versions must be set.
|
||||
// Deprecated: Please use `Versions`.
|
||||
// version is the API version of the defined custom resource.
|
||||
// The custom resources are served under `/apis/<group>/<version>/...`.
|
||||
// Must match the name of the first item in the `versions` list if `version` and `versions` are both specified.
|
||||
// Optional if `versions` is specified.
|
||||
// Deprecated: use `versions` instead.
|
||||
// +optional
|
||||
optional string version = 2;
|
||||
|
||||
// Names are the names used to describe this custom resource
|
||||
// names specify the resource and kind names for the custom resource.
|
||||
optional CustomResourceDefinitionNames names = 3;
|
||||
|
||||
// Scope indicates whether this resource is cluster or namespace scoped. Default is namespaced
|
||||
// scope indicates whether the defined custom resource is cluster- or namespace-scoped.
|
||||
// Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.
|
||||
optional string scope = 4;
|
||||
|
||||
// Validation describes the validation methods for CustomResources
|
||||
// Optional, the global validation schema for all versions.
|
||||
// validation describes the schema used for validation and pruning of the custom resource.
|
||||
// If present, this validation schema is used to validate all versions.
|
||||
// Top-level and per-version schemas are mutually exclusive.
|
||||
// +optional
|
||||
optional CustomResourceValidation validation = 5;
|
||||
|
||||
// Subresources describes the subresources for CustomResource
|
||||
// Optional, the global subresources for all versions.
|
||||
// subresources specify what subresources the defined custom resource has.
|
||||
// If present, this field configures subresources for all versions.
|
||||
// Top-level and per-version subresources are mutually exclusive.
|
||||
// +optional
|
||||
optional CustomResourceSubresources subresources = 6;
|
||||
|
||||
// Versions is the list of all supported versions for this resource.
|
||||
// If Version field is provided, this field is optional.
|
||||
// Validation: All versions must use the same validation schema for now. i.e., top
|
||||
// level Validation field is applied to all of these versions.
|
||||
// Order: The version name will be used to compute the order.
|
||||
// versions is the list of all API versions of the defined custom resource.
|
||||
// Optional if `version` is specified.
|
||||
// The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified.
|
||||
// Version names are used to compute the order in which served versions are listed in API discovery.
|
||||
// If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered
|
||||
// lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version),
|
||||
// then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first
|
||||
@ -241,102 +252,106 @@ message CustomResourceDefinitionSpec {
|
||||
// +optional
|
||||
repeated CustomResourceDefinitionVersion versions = 7;
|
||||
|
||||
// AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column.
|
||||
// Optional, the global columns for all versions.
|
||||
// additionalPrinterColumns specifies additional columns returned in Table output.
|
||||
// See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details.
|
||||
// If present, this field configures columns for all versions.
|
||||
// Top-level and per-version columns are mutually exclusive.
|
||||
// If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
|
||||
// +optional
|
||||
repeated CustomResourceColumnDefinition additionalPrinterColumns = 8;
|
||||
|
||||
// `conversion` defines conversion settings for the CRD.
|
||||
// conversion defines conversion settings for the CRD.
|
||||
// +optional
|
||||
optional CustomResourceConversion conversion = 9;
|
||||
|
||||
// preserveUnknownFields disables pruning of object fields which are not
|
||||
// specified in the OpenAPI schema. apiVersion, kind, metadata and known
|
||||
// fields inside metadata are always preserved.
|
||||
// Defaults to true in v1beta and will default to false in v1.
|
||||
// preserveUnknownFields indicates that object fields which are not specified
|
||||
// in the OpenAPI schema should be preserved when persisting to storage.
|
||||
// apiVersion, kind, metadata and known fields inside metadata are always preserved.
|
||||
// If false, schemas must be defined for all versions.
|
||||
// Defaults to true in v1beta for backwards compatibility.
|
||||
// Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified
|
||||
// in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension.
|
||||
// See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.
|
||||
// +optional
|
||||
optional bool preserveUnknownFields = 10;
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition
|
||||
message CustomResourceDefinitionStatus {
|
||||
// Conditions indicate state for particular aspects of a CustomResourceDefinition
|
||||
// conditions indicate state for particular aspects of a CustomResourceDefinition
|
||||
// +optional
|
||||
repeated CustomResourceDefinitionCondition conditions = 1;
|
||||
|
||||
// AcceptedNames are the names that are actually being used to serve discovery
|
||||
// acceptedNames are the names that are actually being used to serve discovery.
|
||||
// They may be different than the names in spec.
|
||||
optional CustomResourceDefinitionNames acceptedNames = 2;
|
||||
|
||||
// StoredVersions are all versions of CustomResources that were ever persisted. Tracking these
|
||||
// storedVersions lists all versions of CustomResources that were ever persisted. Tracking these
|
||||
// versions allows a migration path for stored versions in etcd. The field is mutable
|
||||
// so the migration controller can first finish a migration to another version (i.e.
|
||||
// that no old objects are left in the storage), and then remove the rest of the
|
||||
// so a migration controller can finish a migration to another version (ensuring
|
||||
// no old objects are left in storage), and then remove the rest of the
|
||||
// versions from this list.
|
||||
// None of the versions in this list can be removed from the spec.Versions field.
|
||||
// Versions may not be removed from `spec.versions` while they exist in this list.
|
||||
repeated string storedVersions = 3;
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionVersion describes a version for CRD.
|
||||
message CustomResourceDefinitionVersion {
|
||||
// Name is the version name, e.g. “v1”, “v2beta1”, etc.
|
||||
// name is the version name, e.g. “v1”, “v2beta1”, etc.
|
||||
// The custom resources are served under this version at `/apis/<group>/<version>/...` if `served` is true.
|
||||
optional string name = 1;
|
||||
|
||||
// Served is a flag enabling/disabling this version from being served via REST APIs
|
||||
// served is a flag enabling/disabling this version from being served via REST APIs
|
||||
optional bool served = 2;
|
||||
|
||||
// Storage flags the version as storage version. There must be exactly one
|
||||
// flagged as storage version.
|
||||
// storage indicates this version should be used when persisting custom resources to storage.
|
||||
// There must be exactly one version with storage=true.
|
||||
optional bool storage = 3;
|
||||
|
||||
// Schema describes the schema for CustomResource used in validation, pruning, and defaulting.
|
||||
// schema describes the schema used for validation and pruning of this version of the custom resource.
|
||||
// Top-level and per-version schemas are mutually exclusive.
|
||||
// Per-version schemas must not all be set to identical values (top-level validation schema should be used instead)
|
||||
// This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature.
|
||||
// Per-version schemas must not all be set to identical values (top-level validation schema should be used instead).
|
||||
// +optional
|
||||
optional CustomResourceValidation schema = 4;
|
||||
|
||||
// Subresources describes the subresources for CustomResource
|
||||
// subresources specify what subresources this version of the defined custom resource have.
|
||||
// Top-level and per-version subresources are mutually exclusive.
|
||||
// Per-version subresources must not all be set to identical values (top-level subresources should be used instead)
|
||||
// This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature.
|
||||
// Per-version subresources must not all be set to identical values (top-level subresources should be used instead).
|
||||
// +optional
|
||||
optional CustomResourceSubresources subresources = 5;
|
||||
|
||||
// AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column.
|
||||
// additionalPrinterColumns specifies additional columns returned in Table output.
|
||||
// See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details.
|
||||
// Top-level and per-version columns are mutually exclusive.
|
||||
// Per-version columns must not all be set to identical values (top-level columns should be used instead)
|
||||
// This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature.
|
||||
// NOTE: CRDs created prior to 1.13 populated the top-level additionalPrinterColumns field by default. To apply an
|
||||
// update that changes to per-version additionalPrinterColumns, the top-level additionalPrinterColumns field must
|
||||
// be explicitly set to null
|
||||
// Per-version columns must not all be set to identical values (top-level columns should be used instead).
|
||||
// If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
|
||||
// +optional
|
||||
repeated CustomResourceColumnDefinition additionalPrinterColumns = 6;
|
||||
}
|
||||
|
||||
// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.
|
||||
message CustomResourceSubresourceScale {
|
||||
// SpecReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Spec.Replicas.
|
||||
// specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`.
|
||||
// Only JSON paths without the array notation are allowed.
|
||||
// Must be a JSON Path under .spec.
|
||||
// If there is no value under the given path in the CustomResource, the /scale subresource will return an error on GET.
|
||||
// Must be a JSON Path under `.spec`.
|
||||
// If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.
|
||||
optional string specReplicasPath = 1;
|
||||
|
||||
// StatusReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Replicas.
|
||||
// statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`.
|
||||
// Only JSON paths without the array notation are allowed.
|
||||
// Must be a JSON Path under .status.
|
||||
// If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource
|
||||
// Must be a JSON Path under `.status`.
|
||||
// If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource
|
||||
// will default to 0.
|
||||
optional string statusReplicasPath = 2;
|
||||
|
||||
// LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector.
|
||||
// labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`.
|
||||
// Only JSON paths without the array notation are allowed.
|
||||
// Must be a JSON Path under .status or .spec.
|
||||
// Must be set to work with HPA.
|
||||
// Must be a JSON Path under `.status` or `.spec`.
|
||||
// Must be set to work with HorizontalPodAutoscaler.
|
||||
// The field pointed by this JSON path must be a string field (not a complex selector struct)
|
||||
// which contains a serialized label selector in string form.
|
||||
// More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource
|
||||
// If there is no value under the given path in the CustomResource, the status label selector value in the /scale
|
||||
// If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale`
|
||||
// subresource will default to the empty string.
|
||||
// +optional
|
||||
optional string labelSelectorPath = 3;
|
||||
@ -352,18 +367,21 @@ message CustomResourceSubresourceStatus {
|
||||
|
||||
// CustomResourceSubresources defines the status and scale subresources for CustomResources.
|
||||
message CustomResourceSubresources {
|
||||
// Status denotes the status subresource for CustomResources
|
||||
// status indicates the custom resource should serve a `/status` subresource.
|
||||
// When enabled:
|
||||
// 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object.
|
||||
// 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.
|
||||
// +optional
|
||||
optional CustomResourceSubresourceStatus status = 1;
|
||||
|
||||
// Scale denotes the scale subresource for CustomResources
|
||||
// scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.
|
||||
// +optional
|
||||
optional CustomResourceSubresourceScale scale = 2;
|
||||
}
|
||||
|
||||
// CustomResourceValidation is a list of validation methods for CustomResources.
|
||||
message CustomResourceValidation {
|
||||
// OpenAPIV3Schema is the OpenAPI v3 schema to be validated against.
|
||||
// openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.
|
||||
// +optional
|
||||
optional JSONSchemaProps openAPIV3Schema = 1;
|
||||
}
|
||||
@ -398,8 +416,8 @@ message JSONSchemaProps {
|
||||
optional string title = 7;
|
||||
|
||||
// default is a default value for undefined object fields.
|
||||
// Defaulting is an alpha feature under the CustomResourceDefaulting feature gate.
|
||||
// Defaulting requires spec.preserveUnknownFields to be false.
|
||||
// Defaulting is a beta feature under the CustomResourceDefaulting feature gate.
|
||||
// CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API.
|
||||
optional JSON default = 8;
|
||||
|
||||
optional double maximum = 9;
|
||||
@ -518,30 +536,28 @@ message JSONSchemaPropsOrStringArray {
|
||||
|
||||
// ServiceReference holds a reference to Service.legacy.k8s.io
|
||||
message ServiceReference {
|
||||
// `namespace` is the namespace of the service.
|
||||
// namespace is the namespace of the service.
|
||||
// Required
|
||||
optional string namespace = 1;
|
||||
|
||||
// `name` is the name of the service.
|
||||
// name is the name of the service.
|
||||
// Required
|
||||
optional string name = 2;
|
||||
|
||||
// `path` is an optional URL path which will be sent in any request to
|
||||
// this service.
|
||||
// path is an optional URL path at which the webhook will be contacted.
|
||||
// +optional
|
||||
optional string path = 3;
|
||||
|
||||
// If specified, the port on the service that hosting webhook.
|
||||
// Default to 443 for backward compatibility.
|
||||
// port is an optional service port at which the webhook will be contacted.
|
||||
// `port` should be a valid port number (1-65535, inclusive).
|
||||
// Defaults to 443 for backward compatibility.
|
||||
// +optional
|
||||
optional int32 port = 4;
|
||||
}
|
||||
|
||||
// WebhookClientConfig contains the information to make a TLS
|
||||
// connection with the webhook. It has the same field as admissionregistration.v1beta1.WebhookClientConfig.
|
||||
// WebhookClientConfig contains the information to make a TLS connection with the webhook.
|
||||
message WebhookClientConfig {
|
||||
// `url` gives the location of the webhook, in standard URL form
|
||||
// url gives the location of the webhook, in standard URL form
|
||||
// (`scheme://host:port/path`). Exactly one of `url` or `service`
|
||||
// must be specified.
|
||||
//
|
||||
@ -570,15 +586,15 @@ message WebhookClientConfig {
|
||||
// +optional
|
||||
optional string url = 3;
|
||||
|
||||
// `service` is a reference to the service for this webhook. Either
|
||||
// `service` or `url` must be specified.
|
||||
// service is a reference to the service for this webhook. Either
|
||||
// service or url must be specified.
|
||||
//
|
||||
// If the webhook is running within the cluster, then you should use `service`.
|
||||
//
|
||||
// +optional
|
||||
optional ServiceReference service = 1;
|
||||
|
||||
// `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
|
||||
// caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
|
||||
// If unspecified, system trust roots on the apiserver are used.
|
||||
// +optional
|
||||
optional bytes caBundle = 2;
|
||||
|
@ -39,33 +39,36 @@ const (
|
||||
|
||||
// CustomResourceDefinitionSpec describes how a user wants their resource to appear
|
||||
type CustomResourceDefinitionSpec struct {
|
||||
// Group is the group this resource belongs in
|
||||
// group is the API group of the defined custom resource.
|
||||
// The custom resources are served under `/apis/<group>/...`.
|
||||
// Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`).
|
||||
Group string `json:"group" protobuf:"bytes,1,opt,name=group"`
|
||||
// Version is the version this resource belongs in
|
||||
// Should be always first item in Versions field if provided.
|
||||
// Optional, but at least one of Version or Versions must be set.
|
||||
// Deprecated: Please use `Versions`.
|
||||
// version is the API version of the defined custom resource.
|
||||
// The custom resources are served under `/apis/<group>/<version>/...`.
|
||||
// Must match the name of the first item in the `versions` list if `version` and `versions` are both specified.
|
||||
// Optional if `versions` is specified.
|
||||
// Deprecated: use `versions` instead.
|
||||
// +optional
|
||||
Version string `json:"version,omitempty" protobuf:"bytes,2,opt,name=version"`
|
||||
// Names are the names used to describe this custom resource
|
||||
// names specify the resource and kind names for the custom resource.
|
||||
Names CustomResourceDefinitionNames `json:"names" protobuf:"bytes,3,opt,name=names"`
|
||||
// Scope indicates whether this resource is cluster or namespace scoped. Default is namespaced
|
||||
// scope indicates whether the defined custom resource is cluster- or namespace-scoped.
|
||||
// Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.
|
||||
Scope ResourceScope `json:"scope" protobuf:"bytes,4,opt,name=scope,casttype=ResourceScope"`
|
||||
// Validation describes the validation methods for CustomResources
|
||||
// Optional, the global validation schema for all versions.
|
||||
// validation describes the schema used for validation and pruning of the custom resource.
|
||||
// If present, this validation schema is used to validate all versions.
|
||||
// Top-level and per-version schemas are mutually exclusive.
|
||||
// +optional
|
||||
Validation *CustomResourceValidation `json:"validation,omitempty" protobuf:"bytes,5,opt,name=validation"`
|
||||
// Subresources describes the subresources for CustomResource
|
||||
// Optional, the global subresources for all versions.
|
||||
// subresources specify what subresources the defined custom resource has.
|
||||
// If present, this field configures subresources for all versions.
|
||||
// Top-level and per-version subresources are mutually exclusive.
|
||||
// +optional
|
||||
Subresources *CustomResourceSubresources `json:"subresources,omitempty" protobuf:"bytes,6,opt,name=subresources"`
|
||||
// Versions is the list of all supported versions for this resource.
|
||||
// If Version field is provided, this field is optional.
|
||||
// Validation: All versions must use the same validation schema for now. i.e., top
|
||||
// level Validation field is applied to all of these versions.
|
||||
// Order: The version name will be used to compute the order.
|
||||
// versions is the list of all API versions of the defined custom resource.
|
||||
// Optional if `version` is specified.
|
||||
// The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified.
|
||||
// Version names are used to compute the order in which served versions are listed in API discovery.
|
||||
// If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered
|
||||
// lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version),
|
||||
// then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first
|
||||
@ -74,51 +77,57 @@ type CustomResourceDefinitionSpec struct {
|
||||
// v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
|
||||
// +optional
|
||||
Versions []CustomResourceDefinitionVersion `json:"versions,omitempty" protobuf:"bytes,7,rep,name=versions"`
|
||||
// AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column.
|
||||
// Optional, the global columns for all versions.
|
||||
// additionalPrinterColumns specifies additional columns returned in Table output.
|
||||
// See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details.
|
||||
// If present, this field configures columns for all versions.
|
||||
// Top-level and per-version columns are mutually exclusive.
|
||||
// If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
|
||||
// +optional
|
||||
AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,8,rep,name=additionalPrinterColumns"`
|
||||
|
||||
// `conversion` defines conversion settings for the CRD.
|
||||
// conversion defines conversion settings for the CRD.
|
||||
// +optional
|
||||
Conversion *CustomResourceConversion `json:"conversion,omitempty" protobuf:"bytes,9,opt,name=conversion"`
|
||||
|
||||
// preserveUnknownFields disables pruning of object fields which are not
|
||||
// specified in the OpenAPI schema. apiVersion, kind, metadata and known
|
||||
// fields inside metadata are always preserved.
|
||||
// Defaults to true in v1beta and will default to false in v1.
|
||||
// preserveUnknownFields indicates that object fields which are not specified
|
||||
// in the OpenAPI schema should be preserved when persisting to storage.
|
||||
// apiVersion, kind, metadata and known fields inside metadata are always preserved.
|
||||
// If false, schemas must be defined for all versions.
|
||||
// Defaults to true in v1beta for backwards compatibility.
|
||||
// Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified
|
||||
// in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension.
|
||||
// See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.
|
||||
// +optional
|
||||
PreserveUnknownFields *bool `json:"preserveUnknownFields,omitempty" protobuf:"varint,10,opt,name=preserveUnknownFields"`
|
||||
}
|
||||
|
||||
// CustomResourceConversion describes how to convert different versions of a CR.
|
||||
type CustomResourceConversion struct {
|
||||
// `strategy` specifies the conversion strategy. Allowed values are:
|
||||
// - `None`: The converter only change the apiVersion and would not touch any other field in the CR.
|
||||
// strategy specifies how custom resources are converted between versions. Allowed values are:
|
||||
// - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource.
|
||||
// - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information
|
||||
// is needed for this option. This requires spec.preserveUnknownFields to be false.
|
||||
// is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set.
|
||||
Strategy ConversionStrategyType `json:"strategy" protobuf:"bytes,1,name=strategy"`
|
||||
|
||||
// `webhookClientConfig` is the instructions for how to call the webhook if strategy is `Webhook`. This field is
|
||||
// alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature.
|
||||
// webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`.
|
||||
// Required when `strategy` is set to `Webhook`.
|
||||
// +optional
|
||||
WebhookClientConfig *WebhookClientConfig `json:"webhookClientConfig,omitempty" protobuf:"bytes,2,name=webhookClientConfig"`
|
||||
|
||||
// ConversionReviewVersions is an ordered list of preferred `ConversionReview`
|
||||
// versions the Webhook expects. API server will try to use first version in
|
||||
// conversionReviewVersions is an ordered list of preferred `ConversionReview`
|
||||
// versions the Webhook expects. The API server will use the first version in
|
||||
// the list which it supports. If none of the versions specified in this list
|
||||
// supported by API server, conversion will fail for this object.
|
||||
// are supported by API server, conversion will fail for the custom resource.
|
||||
// If a persisted Webhook configuration specifies allowed versions and does not
|
||||
// include any versions known to the API Server, calls to the webhook will fail.
|
||||
// Default to `['v1beta1']`.
|
||||
// Defaults to `["v1beta1"]`.
|
||||
// +optional
|
||||
ConversionReviewVersions []string `json:"conversionReviewVersions,omitempty" protobuf:"bytes,3,rep,name=conversionReviewVersions"`
|
||||
}
|
||||
|
||||
// WebhookClientConfig contains the information to make a TLS
|
||||
// connection with the webhook. It has the same field as admissionregistration.v1beta1.WebhookClientConfig.
|
||||
// WebhookClientConfig contains the information to make a TLS connection with the webhook.
|
||||
type WebhookClientConfig struct {
|
||||
// `url` gives the location of the webhook, in standard URL form
|
||||
// url gives the location of the webhook, in standard URL form
|
||||
// (`scheme://host:port/path`). Exactly one of `url` or `service`
|
||||
// must be specified.
|
||||
//
|
||||
@ -147,15 +156,15 @@ type WebhookClientConfig struct {
|
||||
// +optional
|
||||
URL *string `json:"url,omitempty" protobuf:"bytes,3,opt,name=url"`
|
||||
|
||||
// `service` is a reference to the service for this webhook. Either
|
||||
// `service` or `url` must be specified.
|
||||
// service is a reference to the service for this webhook. Either
|
||||
// service or url must be specified.
|
||||
//
|
||||
// If the webhook is running within the cluster, then you should use `service`.
|
||||
//
|
||||
// +optional
|
||||
Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,1,opt,name=service"`
|
||||
|
||||
// `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
|
||||
// caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
|
||||
// If unspecified, system trust roots on the apiserver are used.
|
||||
// +optional
|
||||
CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,2,opt,name=caBundle"`
|
||||
@ -163,53 +172,49 @@ type WebhookClientConfig struct {
|
||||
|
||||
// ServiceReference holds a reference to Service.legacy.k8s.io
|
||||
type ServiceReference struct {
|
||||
// `namespace` is the namespace of the service.
|
||||
// namespace is the namespace of the service.
|
||||
// Required
|
||||
Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"`
|
||||
// `name` is the name of the service.
|
||||
// name is the name of the service.
|
||||
// Required
|
||||
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
|
||||
|
||||
// `path` is an optional URL path which will be sent in any request to
|
||||
// this service.
|
||||
// path is an optional URL path at which the webhook will be contacted.
|
||||
// +optional
|
||||
Path *string `json:"path,omitempty" protobuf:"bytes,3,opt,name=path"`
|
||||
|
||||
// If specified, the port on the service that hosting webhook.
|
||||
// Default to 443 for backward compatibility.
|
||||
// port is an optional service port at which the webhook will be contacted.
|
||||
// `port` should be a valid port number (1-65535, inclusive).
|
||||
// Defaults to 443 for backward compatibility.
|
||||
// +optional
|
||||
Port *int32 `json:"port,omitempty" protobuf:"varint,4,opt,name=port"`
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionVersion describes a version for CRD.
|
||||
type CustomResourceDefinitionVersion struct {
|
||||
// Name is the version name, e.g. “v1”, “v2beta1”, etc.
|
||||
// name is the version name, e.g. “v1”, “v2beta1”, etc.
|
||||
// The custom resources are served under this version at `/apis/<group>/<version>/...` if `served` is true.
|
||||
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
||||
// Served is a flag enabling/disabling this version from being served via REST APIs
|
||||
// served is a flag enabling/disabling this version from being served via REST APIs
|
||||
Served bool `json:"served" protobuf:"varint,2,opt,name=served"`
|
||||
// Storage flags the version as storage version. There must be exactly one
|
||||
// flagged as storage version.
|
||||
// storage indicates this version should be used when persisting custom resources to storage.
|
||||
// There must be exactly one version with storage=true.
|
||||
Storage bool `json:"storage" protobuf:"varint,3,opt,name=storage"`
|
||||
// Schema describes the schema for CustomResource used in validation, pruning, and defaulting.
|
||||
// schema describes the schema used for validation and pruning of this version of the custom resource.
|
||||
// Top-level and per-version schemas are mutually exclusive.
|
||||
// Per-version schemas must not all be set to identical values (top-level validation schema should be used instead)
|
||||
// This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature.
|
||||
// Per-version schemas must not all be set to identical values (top-level validation schema should be used instead).
|
||||
// +optional
|
||||
Schema *CustomResourceValidation `json:"schema,omitempty" protobuf:"bytes,4,opt,name=schema"`
|
||||
// Subresources describes the subresources for CustomResource
|
||||
// subresources specify what subresources this version of the defined custom resource have.
|
||||
// Top-level and per-version subresources are mutually exclusive.
|
||||
// Per-version subresources must not all be set to identical values (top-level subresources should be used instead)
|
||||
// This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature.
|
||||
// Per-version subresources must not all be set to identical values (top-level subresources should be used instead).
|
||||
// +optional
|
||||
Subresources *CustomResourceSubresources `json:"subresources,omitempty" protobuf:"bytes,5,opt,name=subresources"`
|
||||
// AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column.
|
||||
// additionalPrinterColumns specifies additional columns returned in Table output.
|
||||
// See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details.
|
||||
// Top-level and per-version columns are mutually exclusive.
|
||||
// Per-version columns must not all be set to identical values (top-level columns should be used instead)
|
||||
// This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature.
|
||||
// NOTE: CRDs created prior to 1.13 populated the top-level additionalPrinterColumns field by default. To apply an
|
||||
// update that changes to per-version additionalPrinterColumns, the top-level additionalPrinterColumns field must
|
||||
// be explicitly set to null
|
||||
// Per-version columns must not all be set to identical values (top-level columns should be used instead).
|
||||
// If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
|
||||
// +optional
|
||||
AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,6,rep,name=additionalPrinterColumns"`
|
||||
}
|
||||
@ -219,11 +224,11 @@ type CustomResourceColumnDefinition struct {
|
||||
// name is a human readable name for the column.
|
||||
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
||||
// type is an OpenAPI type definition for this column.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.
|
||||
Type string `json:"type" protobuf:"bytes,2,opt,name=type"`
|
||||
// format is an optional OpenAPI type definition for this column. The 'name' format is applied
|
||||
// to the primary identifier column to assist in clients identifying column is the resource name.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
|
||||
// See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.
|
||||
// +optional
|
||||
Format string `json:"format,omitempty" protobuf:"bytes,3,opt,name=format"`
|
||||
// description is a human readable description of this column.
|
||||
@ -231,31 +236,38 @@ type CustomResourceColumnDefinition struct {
|
||||
Description string `json:"description,omitempty" protobuf:"bytes,4,opt,name=description"`
|
||||
// priority is an integer defining the relative importance of this column compared to others. Lower
|
||||
// numbers are considered higher priority. Columns that may be omitted in limited space scenarios
|
||||
// should be given a higher priority.
|
||||
// should be given a priority greater than 0.
|
||||
// +optional
|
||||
Priority int32 `json:"priority,omitempty" protobuf:"bytes,5,opt,name=priority"`
|
||||
|
||||
// JSONPath is a simple JSON path, i.e. with array notation.
|
||||
// JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against
|
||||
// each custom resource to produce the value for this column.
|
||||
JSONPath string `json:"JSONPath" protobuf:"bytes,6,opt,name=JSONPath"`
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition
|
||||
type CustomResourceDefinitionNames struct {
|
||||
// Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration
|
||||
// too: plural.group and it must be all lowercase.
|
||||
// plural is the plural name of the resource to serve.
|
||||
// The custom resources are served under `/apis/<group>/<version>/.../<plural>`.
|
||||
// Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`).
|
||||
// Must be all lowercase.
|
||||
Plural string `json:"plural" protobuf:"bytes,1,opt,name=plural"`
|
||||
// Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased <kind>
|
||||
// singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.
|
||||
// +optional
|
||||
Singular string `json:"singular,omitempty" protobuf:"bytes,2,opt,name=singular"`
|
||||
// ShortNames are short names for the resource. It must be all lowercase.
|
||||
// shortNames are short names for the resource, exposed in API discovery documents,
|
||||
// and used by clients to support invocations like `kubectl get <shortname>`.
|
||||
// It must be all lowercase.
|
||||
// +optional
|
||||
ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,3,opt,name=shortNames"`
|
||||
// Kind is the serialized kind of the resource. It is normally CamelCase and singular.
|
||||
// kind is the serialized kind of the resource. It is normally CamelCase and singular.
|
||||
// Custom resource instances will use this value as the `kind` attribute in API calls.
|
||||
Kind string `json:"kind" protobuf:"bytes,4,opt,name=kind"`
|
||||
// ListKind is the serialized kind of the list for this resource. Defaults to <kind>List.
|
||||
// listKind is the serialized kind of the list for this resource. Defaults to "`kind`List".
|
||||
// +optional
|
||||
ListKind string `json:"listKind,omitempty" protobuf:"bytes,5,opt,name=listKind"`
|
||||
// Categories is a list of grouped resources custom resources belong to (e.g. 'all')
|
||||
// categories is a list of grouped resources this custom resource belongs to (e.g. 'all').
|
||||
// This is published in API discovery documents, and used by clients to support invocations like
|
||||
// `kubectl get all`.
|
||||
// +optional
|
||||
Categories []string `json:"categories,omitempty" protobuf:"bytes,6,rep,name=categories"`
|
||||
}
|
||||
@ -318,38 +330,38 @@ const (
|
||||
|
||||
// CustomResourceDefinitionCondition contains details for the current condition of this pod.
|
||||
type CustomResourceDefinitionCondition struct {
|
||||
// Type is the type of the condition. Types include Established, NamesAccepted and Terminating.
|
||||
// type is the type of the condition. Types include Established, NamesAccepted and Terminating.
|
||||
Type CustomResourceDefinitionConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=CustomResourceDefinitionConditionType"`
|
||||
// Status is the status of the condition.
|
||||
// status is the status of the condition.
|
||||
// Can be True, False, Unknown.
|
||||
Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
|
||||
// Last time the condition transitioned from one status to another.
|
||||
// lastTransitionTime last time the condition transitioned from one status to another.
|
||||
// +optional
|
||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
|
||||
// Unique, one-word, CamelCase reason for the condition's last transition.
|
||||
// reason is a unique, one-word, CamelCase reason for the condition's last transition.
|
||||
// +optional
|
||||
Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
|
||||
// Human-readable message indicating details about last transition.
|
||||
// message is a human-readable message indicating details about last transition.
|
||||
// +optional
|
||||
Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
|
||||
}
|
||||
|
||||
// CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition
|
||||
type CustomResourceDefinitionStatus struct {
|
||||
// Conditions indicate state for particular aspects of a CustomResourceDefinition
|
||||
// conditions indicate state for particular aspects of a CustomResourceDefinition
|
||||
// +optional
|
||||
Conditions []CustomResourceDefinitionCondition `json:"conditions" protobuf:"bytes,1,opt,name=conditions"`
|
||||
|
||||
// AcceptedNames are the names that are actually being used to serve discovery
|
||||
// acceptedNames are the names that are actually being used to serve discovery.
|
||||
// They may be different than the names in spec.
|
||||
AcceptedNames CustomResourceDefinitionNames `json:"acceptedNames" protobuf:"bytes,2,opt,name=acceptedNames"`
|
||||
|
||||
// StoredVersions are all versions of CustomResources that were ever persisted. Tracking these
|
||||
// storedVersions lists all versions of CustomResources that were ever persisted. Tracking these
|
||||
// versions allows a migration path for stored versions in etcd. The field is mutable
|
||||
// so the migration controller can first finish a migration to another version (i.e.
|
||||
// that no old objects are left in the storage), and then remove the rest of the
|
||||
// so a migration controller can finish a migration to another version (ensuring
|
||||
// no old objects are left in storage), and then remove the rest of the
|
||||
// versions from this list.
|
||||
// None of the versions in this list can be removed from the spec.Versions field.
|
||||
// Versions may not be removed from `spec.versions` while they exist in this list.
|
||||
StoredVersions []string `json:"storedVersions" protobuf:"bytes,3,rep,name=storedVersions"`
|
||||
}
|
||||
|
||||
@ -368,9 +380,9 @@ type CustomResourceDefinition struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec describes how the user wants the resources to appear
|
||||
// spec describes how the user wants the resources to appear
|
||||
Spec CustomResourceDefinitionSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
||||
// Status indicates the actual state of the CustomResourceDefinition
|
||||
// status indicates the actual state of the CustomResourceDefinition
|
||||
// +optional
|
||||
Status CustomResourceDefinitionStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||
}
|
||||
@ -382,23 +394,26 @@ type CustomResourceDefinitionList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items individual CustomResourceDefinitions
|
||||
// items list individual CustomResourceDefinition objects
|
||||
Items []CustomResourceDefinition `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// CustomResourceValidation is a list of validation methods for CustomResources.
|
||||
type CustomResourceValidation struct {
|
||||
// OpenAPIV3Schema is the OpenAPI v3 schema to be validated against.
|
||||
// openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.
|
||||
// +optional
|
||||
OpenAPIV3Schema *JSONSchemaProps `json:"openAPIV3Schema,omitempty" protobuf:"bytes,1,opt,name=openAPIV3Schema"`
|
||||
}
|
||||
|
||||
// CustomResourceSubresources defines the status and scale subresources for CustomResources.
|
||||
type CustomResourceSubresources struct {
|
||||
// Status denotes the status subresource for CustomResources
|
||||
// status indicates the custom resource should serve a `/status` subresource.
|
||||
// When enabled:
|
||||
// 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object.
|
||||
// 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.
|
||||
// +optional
|
||||
Status *CustomResourceSubresourceStatus `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"`
|
||||
// Scale denotes the scale subresource for CustomResources
|
||||
// scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.
|
||||
// +optional
|
||||
Scale *CustomResourceSubresourceScale `json:"scale,omitempty" protobuf:"bytes,2,opt,name=scale"`
|
||||
}
|
||||
@ -412,25 +427,25 @@ type CustomResourceSubresourceStatus struct{}
|
||||
|
||||
// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.
|
||||
type CustomResourceSubresourceScale struct {
|
||||
// SpecReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Spec.Replicas.
|
||||
// specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`.
|
||||
// Only JSON paths without the array notation are allowed.
|
||||
// Must be a JSON Path under .spec.
|
||||
// If there is no value under the given path in the CustomResource, the /scale subresource will return an error on GET.
|
||||
// Must be a JSON Path under `.spec`.
|
||||
// If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.
|
||||
SpecReplicasPath string `json:"specReplicasPath" protobuf:"bytes,1,name=specReplicasPath"`
|
||||
// StatusReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Replicas.
|
||||
// statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`.
|
||||
// Only JSON paths without the array notation are allowed.
|
||||
// Must be a JSON Path under .status.
|
||||
// If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource
|
||||
// Must be a JSON Path under `.status`.
|
||||
// If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource
|
||||
// will default to 0.
|
||||
StatusReplicasPath string `json:"statusReplicasPath" protobuf:"bytes,2,opt,name=statusReplicasPath"`
|
||||
// LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector.
|
||||
// labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`.
|
||||
// Only JSON paths without the array notation are allowed.
|
||||
// Must be a JSON Path under .status or .spec.
|
||||
// Must be set to work with HPA.
|
||||
// Must be a JSON Path under `.status` or `.spec`.
|
||||
// Must be set to work with HorizontalPodAutoscaler.
|
||||
// The field pointed by this JSON path must be a string field (not a complex selector struct)
|
||||
// which contains a serialized label selector in string form.
|
||||
// More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource
|
||||
// If there is no value under the given path in the CustomResource, the status label selector value in the /scale
|
||||
// If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale`
|
||||
// subresource will default to the empty string.
|
||||
// +optional
|
||||
LabelSelectorPath *string `json:"labelSelectorPath,omitempty" protobuf:"bytes,3,opt,name=labelSelectorPath"`
|
||||
@ -441,39 +456,39 @@ type CustomResourceSubresourceScale struct {
|
||||
// ConversionReview describes a conversion request/response.
|
||||
type ConversionReview struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// `request` describes the attributes for the conversion request.
|
||||
// request describes the attributes for the conversion request.
|
||||
// +optional
|
||||
Request *ConversionRequest `json:"request,omitempty" protobuf:"bytes,1,opt,name=request"`
|
||||
// `response` describes the attributes for the conversion response.
|
||||
// response describes the attributes for the conversion response.
|
||||
// +optional
|
||||
Response *ConversionResponse `json:"response,omitempty" protobuf:"bytes,2,opt,name=response"`
|
||||
}
|
||||
|
||||
// ConversionRequest describes the conversion request parameters.
|
||||
type ConversionRequest struct {
|
||||
// `uid` is an identifier for the individual request/response. It allows us to distinguish instances of requests which are
|
||||
// otherwise identical (parallel requests, requests when earlier requests did not modify etc)
|
||||
// The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.
|
||||
// uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are
|
||||
// otherwise identical (parallel requests, etc).
|
||||
// The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request.
|
||||
// It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.
|
||||
UID types.UID `json:"uid" protobuf:"bytes,1,name=uid"`
|
||||
// `desiredAPIVersion` is the version to convert given objects to. e.g. "myapi.example.com/v1"
|
||||
// desiredAPIVersion is the version to convert given objects to. e.g. "myapi.example.com/v1"
|
||||
DesiredAPIVersion string `json:"desiredAPIVersion" protobuf:"bytes,2,name=desiredAPIVersion"`
|
||||
// `objects` is the list of CR objects to be converted.
|
||||
// objects is the list of custom resource objects to be converted.
|
||||
Objects []runtime.RawExtension `json:"objects" protobuf:"bytes,3,rep,name=objects"`
|
||||
}
|
||||
|
||||
// ConversionResponse describes a conversion response.
|
||||
type ConversionResponse struct {
|
||||
// `uid` is an identifier for the individual request/response.
|
||||
// This should be copied over from the corresponding ConversionRequest.
|
||||
// uid is an identifier for the individual request/response.
|
||||
// This should be copied over from the corresponding `request.uid`.
|
||||
UID types.UID `json:"uid" protobuf:"bytes,1,name=uid"`
|
||||
// `convertedObjects` is the list of converted version of `request.objects` if the `result` is successful otherwise empty.
|
||||
// The webhook is expected to set apiVersion of these objects to the ConversionRequest.desiredAPIVersion. The list
|
||||
// must also have the same size as the input list with the same objects in the same order (equal kind, UID, name and namespace).
|
||||
// convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty.
|
||||
// The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list
|
||||
// must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace).
|
||||
// The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored.
|
||||
ConvertedObjects []runtime.RawExtension `json:"convertedObjects" protobuf:"bytes,2,rep,name=convertedObjects"`
|
||||
// `result` contains the result of conversion with extra details if the conversion failed. `result.status` determines if
|
||||
// the conversion failed or succeeded. The `result.status` field is required and represent the success or failure of the
|
||||
// result contains the result of conversion with extra details if the conversion failed. `result.status` determines if
|
||||
// the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the
|
||||
// conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set
|
||||
// `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message`
|
||||
// will be used to construct an error message for the end user.
|
||||
|
@ -26,8 +26,8 @@ type JSONSchemaProps struct {
|
||||
Format string `json:"format,omitempty" protobuf:"bytes,6,opt,name=format"`
|
||||
Title string `json:"title,omitempty" protobuf:"bytes,7,opt,name=title"`
|
||||
// default is a default value for undefined object fields.
|
||||
// Defaulting is an alpha feature under the CustomResourceDefaulting feature gate.
|
||||
// Defaulting requires spec.preserveUnknownFields to be false.
|
||||
// Defaulting is a beta feature under the CustomResourceDefaulting feature gate.
|
||||
// CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API.
|
||||
Default *JSON `json:"default,omitempty" protobuf:"bytes,8,opt,name=default"`
|
||||
Maximum *float64 `json:"maximum,omitempty" protobuf:"bytes,9,opt,name=maximum"`
|
||||
ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty" protobuf:"bytes,10,opt,name=exclusiveMaximum"`
|
||||
|
Loading…
Reference in New Issue
Block a user