CustomResourceDefinition
CustomResourceDefinition (사용자 정의 리소스 정의)
CustomResourceDefinition은 API 서버에 노출되어야 하는 리소스를 나타냅니다. 직접 만든 리소스의 스키마와 API를 정의하는 방법을 알아볼게요.
본문
CustomResourceDefinition
apiVersion: apiextensions.k8s.io/v1
import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
CustomResourceDefinition
CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.
| Field | Description |
|---|---|
| apiVersion string |
APIVersion은 이 객체 표현의 버전이 붙은 스키마(versioned schema)를 정의합니다. 서버는 인식된 스키마를 최신 내부 값으로 변환해야 하며, 인식할 수 없는 값은 거부할 수 있습니다. 자세한 정보: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| kind string |
Kind는 이 객체가 나타내는 REST 리소스를 나타내는 문자열 값입니다. 서버는 클라이언트가 요청을 제출하는 엔드포인트에서 이를 유추할 수 있습니다. 업데이트할 수 없습니다. CamelCase를 사용합니다. 자세한 정보: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| metadata ObjectMeta |
표준 객체 메타데이터입니다. 자세한 정보: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
| spec * CustomResourceDefinitionSpec |
spec describes how the user wants the resources to appear |
| status CustomResourceDefinitionStatus |
status indicates the actual state of the CustomResourceDefinition |
CustomResourceDefinitionSpec
CustomResourceDefinitionSpec describes how a user wants their resource to appear
| Field | Description |
|---|---|
| conversion CustomResourceConversion |
conversion defines conversion settings for the CRD. |
| group * string |
group is the API group of the defined custom resource. The custom resources are served under /apis/\/.... Must match the name of the CustomResourceDefinition (in the form \.\). |
| names * CustomResourceDefinitionNames |
names specify the resource and kind names for the custom resource. |
| preserveUnknownFields boolean |
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/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning for details. |
| scope * string |
scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are Cluster and Namespaced. |
| versions * CustomResourceDefinitionVersion array |
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. |
CustomResourceDefinitionStatus
CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition
| Field | Description |
|---|---|
| acceptedNames CustomResourceDefinitionNames |
acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec. |
| conditions CustomResourceDefinitionCondition array |
conditions indicate state for particular aspects of a CustomResourceDefinition |
| observedGeneration integer |
The generation observed by the CRD controller. |
| storedVersions string array |
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. |
CustomResourceDefinitionList
CustomResourceDefinitionList is a list of CustomResourceDefinition objects.
| Field | Description |
|---|---|
| apiVersion string |
APIVersion은 이 객체 표현의 버전이 붙은 스키마(versioned schema)를 정의합니다. 서버는 인식된 스키마를 최신 내부 값으로 변환해야 하며, 인식할 수 없는 값은 거부할 수 있습니다. 자세한 정보: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| items * CustomResourceDefinition array |
items list individual CustomResourceDefinition objects |
| kind string |
Kind는 이 객체가 나타내는 REST 리소스를 나타내는 문자열 값입니다. 서버는 클라이언트가 요청을 제출하는 엔드포인트에서 이를 유추할 수 있습니다. 업데이트할 수 없습니다. CamelCase를 사용합니다. 자세한 정보: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| metadata ListMeta |
표준 객체 메타데이터입니다. 자세한 정보: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
CustomResourceColumnDefinition
CustomResourceColumnDefinition specifies a column for server side printing.
| Field | Description |
|---|---|
| description string |
description is a human readable description of this column. |
| format string |
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. |
| jsonPath * string |
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. |
| name * string |
name is a human readable name for the column. |
| priority integer |
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. |
| type * string |
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. |
CustomResourceConversion
CustomResourceConversion describes how to convert different versions of a CR.
| Field | Description |
|---|---|
| strategy * string |
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, and spec.conversion.webhook to be set. |
| webhook WebhookConversion |
webhook describes how to call the conversion webhook. Required when strategy is set to "Webhook". |
CustomResourceDefinitionCondition
CustomResourceDefinitionCondition contains details for the current condition of this pod.
| Field | Description |
|---|---|
| lastTransitionTime Time |
lastTransitionTime last time the condition transitioned from one status to another. |
| message string |
message is a human-readable message indicating details about last transition. |
| observedGeneration integer |
observedGeneration은 이 조건이 설정된 기준이 된 .metadata.generation을 나타냅니다. 예를 들어 .metadata.generation이 현재 12인데 .status.conditions[x].observedGeneration이 9라면, 이 조건은 해당 인스턴스의 현재 상태에 비해 오래된 것입니다. |
| reason string |
reason is a unique, one-word, CamelCase reason for the condition's last transition. |
| status * string |
status is the status of the condition. Can be True, False, Unknown. |
| type * string |
type is the type of the condition. Types include Established, NamesAccepted and Terminating. |
CustomResourceDefinitionNames
CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition
| Field | Description |
|---|---|
| categories string array |
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. |
| kind * string |
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. |
| listKind string |
listKind is the serialized kind of the list for this resource. Defaults to "kindList". |
| plural * string |
plural is the plural name of the resource to serve. The custom resources are served under /apis/\/\/.../\. Must match the name of the CustomResourceDefinition (in the form \.\). Must be all lowercase. |
| shortNames string array |
shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like kubectl get \. It must be all lowercase. |
| singular string |
singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased kind. |
CustomResourceDefinitionVersion
CustomResourceDefinitionVersion describes a version for CRD.
| Field | Description |
|---|---|
| additionalPrinterColumns CustomResourceColumnDefinition array |
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. |
| deprecated boolean |
deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false. |
| deprecationWarning string |
deprecationWarning overrides the default warning returned to API clients. May only be set when deprecated is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists. |
| name * string |
name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at /apis/\/\/... if served is true. |
| schema CustomResourceValidation |
schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource. |
| selectableFields SelectableField array |
selectableFields specifies paths to fields that may be used as field selectors. A maximum of 8 selectable fields are allowed. See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors |
| served * boolean |
served is a flag enabling/disabling this version from being served via REST APIs |
| storage * boolean |
storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true. |
| subresources CustomResourceSubresources |
subresources specify what subresources this version of the defined custom resource have. |
CustomResourceSubresourceScale
CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.
| Field | Description |
|---|---|
| labelSelectorPath string |
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. |
| specReplicasPath * string |
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. |
| statusReplicasPath * string |
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. |
CustomResourceSubresourceStatus
CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the .status JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza
CustomResourceSubresources
CustomResourceSubresources defines the status and scale subresources for CustomResources.
| Field | Description |
|---|---|
| scale CustomResourceSubresourceScale |
scale indicates the custom resource should serve a /scale subresource that returns an autoscaling/v1 Scale object. |
| status CustomResourceSubresourceStatus |
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. |
CustomResourceValidation
CustomResourceValidation is a list of validation methods for CustomResources.
| Field | Description |
|---|---|
| openAPIV3Schema JSONSchemaProps |
openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning. |
ExternalDocumentation
ExternalDocumentation allows referencing an external resource for extended documentation.
| Field | Description |
|---|---|
| description string |
|
| url string |
JSON
JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
JSONSchemaProps
JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).
| Field | Description |
|---|---|
| $ref string |
|
| $schema string |
|
| additionalItems JSONSchemaPropsOrBool |
|
| additionalProperties JSONSchemaPropsOrBool |
|
| allOf JSONSchemaProps array |
|
| anyOf JSONSchemaProps array |
|
| default JSON |
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 object |
|
| dependencies object |
|
| description string |
|
| enum JSON array |
|
| example JSON |
|
| exclusiveMaximum boolean |
|
| exclusiveMinimum boolean |
|
| externalDocs ExternalDocumentation |
|
| format string |
format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated: - bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041" - isbn10: an ISBN10 number string like "0321751043" - isbn13: an ISBN13 number string like "978-0321751041" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\d{3}[- ]?\d{2}[- ]?\d{4}$ - hexcolor: an hexadecimal color code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like "rgb(255,255,2559" - byte: base64 encoded binary data - password: any kind of string - date: a date string like "2006-01-02" as defined by full-date in RFC3339 - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339. |
| id string |
|
| items JSONSchemaPropsOrArray |
|
| maxItems integer |
|
| maxLength integer |
|
| maxProperties integer |
|
| maximum number |
|
| minItems integer |
|
| minLength integer |
|
| minProperties integer |
|
| minimum number |
|
| multipleOf number |
|
| not JSONSchemaProps |
|
| nullable boolean |
|
| oneOf JSONSchemaProps array |
|
| pattern string |
|
| patternProperties object |
|
| properties object |
|
| required string array |
|
| title string |
|
| type string |
|
| uniqueItems boolean |
|
| x-kubernetes-embedded-resource boolean |
x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata). |
| x-kubernetes-int-or-string boolean |
x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns: 1) anyOf: - type: integer - type: string 2) allOf: - anyOf: - type: integer - type: string - ... zero or more |
| x-kubernetes-list-map-keys string array |
x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type map by specifying the keys used as the index of the map. This tag MUST only be used on lists that have the "x-kubernetes-list-type" extension set to "map". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported). The properties specified must either be required or have a default value, to ensure those properties are present for all list items. |
| x-kubernetes-list-type string |
x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values: 1) atomic: the list is treated as a single entity, like a scalar. Atomic lists will be entirely replaced when updated. This extension may be used on any type of list (struct, scalar, ...). 2) set: Sets are lists that must not have multiple items with the same value. Each value must be a scalar, an object with x-kubernetes-map-type atomic or an array with x-kubernetes-list-type atomic. 3) map: These lists are like maps in that their elements have a non-index key used to identify them. Order is preserved upon merge. The map tag must only be used on a list with elements of type object. Defaults to atomic for arrays. |
| x-kubernetes-map-type string |
x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values: 1) granular: These maps are actual maps (key-value pairs) and each fields are independent from each other (they can each be manipulated by separate actors). This is the default behaviour for all maps. 2) atomic: the list is treated as a single entity, like a scalar. Atomic maps will be entirely replaced when updated. |
| x-kubernetes-preserve-unknown-fields boolean |
x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden. |
| x-kubernetes-validations ValidationRule array patch strategy: merge on key rule |
x-kubernetes-validations describes a list of validation rules written in the CEL expression language. |
JSONSchemaPropsOrArray
JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.
JSONSchemaPropsOrBool
JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.
SelectableField
SelectableField specifies the JSON path of a field that may be used with field selectors.
| Field | Description |
|---|---|
| jsonPath * string |
jsonPath is a simple JSON path which is evaluated against each custom resource to produce a field selector value. Only JSON paths without the array notation are allowed. Must point to a field of type string, boolean or integer. Types with enum values and strings with formats are allowed. If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. Must not point to metdata fields. Required. |
ServiceReference
ServiceReference holds a reference to Service.legacy.k8s.io
| Field | Description |
|---|---|
| name * string |
name is the name of the service. Required |
| namespace * string |
namespace is the namespace of the service. Required |
| path string |
path is an optional URL path at which the webhook will be contacted. |
| port integer |
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. |
ValidationRule
ValidationRule describes a validation rule written in the CEL expression language.
| Field | Description |
|---|---|
| fieldPath string |
fieldPath represents the field path returned when the validation fails. It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. e.g. when validation checks if a specific attribute foo under a map testMap, the fieldPath could be set to .testMap.foo If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. .testList It does not support list numeric index. It supports child operation to refer to an existing field currently. Refer to JSONPath support in Kubernetes for more info. Numeric index of array is not supported. For field name which contains special characters, use ['specialName'] to refer the field name. e.g. for attribute foo.34$ appears in a list testList, the fieldPath could be set to .testList['foo.34$'] |
| message string |
Message represents the message displayed when validation fails. The message is required if the Rule contains line breaks. The message must not contain line breaks. If unset, the message is "failed rule: {Rule}". e.g. "must be a URL with the host matching spec.host" |
| messageExpression string |
MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a rule, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the rule; the only difference is the return type. Example: "x must be less than max ("+string(self.max)+")" |
| optionalOldSelf boolean |
optionalOldSelf is used to opt a transition rule into evaluation even when the object is first created, or if the old object is missing the value. When enabled oldSelf will be a CEL optional whose value will be None if there is no old value, or when the object is initially created. You may check for presence of oldSelf using oldSelf.hasValue() and unwrap it after checking using oldSelf.value(). Check the CEL documentation for Optional types for more information: https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes May not be set unless oldSelf is used in rule. |
| reason string |
reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". If not set, default to use "FieldValueInvalid". All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. Possible enum values: - "FieldValueDuplicate" is used to report collisions of values that must be unique (e.g. unique IDs). - "FieldValueForbidden" is used to report valid (as per formatting rules) values which would be accepted under some conditions, but which are not permitted by the current conditions (such as security policy). - "FieldValueInvalid" is used to report malformed values (e.g. failed regex match, too long, out of bounds). - "FieldValueRequired" is used to report required values that are not provided (e.g. empty strings, null values, or empty arrays). |
| rule * string |
Rule represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The self variable in the CEL expression is bound to the scoped value. Example: - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual <= self.spec.maxDesired"} If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable via self.field and field presence can be checked via has(self.field). Null valued fields are treated as absent fields in CEL expressions. If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible via self[mapKey], map containment can be checked via mapKey in self and all entries of the map are accessible via CEL macros and functions such as self.all(...). If the Rule is scoped to an array, the elements of the array are accessible via self[i] and also by macros and functions. If the Rule is scoped to a scalar, self is bound to the scalar value. Examples: - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority < 10"} - Rule scoped to a list of integers: {"rule": "self.values.all(value, value >= 0 && value < 100)"} - Rule scoped to a string value: {"rule": "self.startsWith('kube')"} The apiVersion, kind, metadata.name and metadata.generateName are always accessible from the root of the object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible. Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL expressions. This includes: - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as: - A schema with no type and x-kubernetes-preserve-unknown-fields set to true - An array where the items schema is of an "unknown type" - An object where the additionalProperties schema is of an "unknown type" Only property names of the form [a-zA-Z_.-/][a-zA-Z0-9_.-/]* are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '' escapes to 'underscores' - '.' escapes to 'dot' - '-' escapes to 'dash' - '/' escapes to 'slash' - Property names that exactly match a CEL RESERVED keyword escape to '{keyword}__'. The keywords are: "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", "import", "let", "loop", "package", "namespace", "return". Examples: - Rule accessing a property named "namespace": {"rule": "self.namespace > 0"} - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop > 0"} - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d > 0"} Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - 'set': X + Y performs a union where the array positions of all elements in X are preserved and non-intersecting elements in Y are appended, retaining their partial order. - 'map': X + Y performs a merge where the array positions of all keys in X are preserved but the values are overwritten by values in Y when the key sets of X and Y intersect. Elements in Y with non-intersecting keys are appended, retaining their partial order. If rule makes use of the oldSelf variable it is implicitly a transition rule. By default, the oldSelf variable is the same type as self. When optionalOldSelf is true, the oldSelf variable is a CEL optional variable whose value() is the same type as self. See the documentation for the optionalOldSelf field for details. Transition rules by default are applied only on UPDATE requests and are skipped if an old value could not be found. You can opt a transition rule into unconditional evaluation by setting optionalOldSelf to true. |
WebhookClientConfig
WebhookClientConfig contains the information to make a TLS connection with the webhook.
| Field | Description |
|---|---|
| caBundle string |
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. |
| service ServiceReference |
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. |
| url string |
url gives the location of the webhook, in standard URL form (scheme://host:port/path). Exactly one of url or service must be specified. The 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. Please 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. The scheme must be "https"; the URL must begin with "https://". A 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. Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either. |
WebhookConversion
WebhookConversion describes how to call a conversion webhook
| Field | Description |
|---|---|
| clientConfig WebhookClientConfig |
clientConfig is the instructions for how to call the webhook if strategy is Webhook. |
| conversionReviewVersions * string array |
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. |
연산 (Operations)
post Create
HTTP 요청 (HTTP Request)
POST /apis/apiextensions.k8s.io/v1/customresourcedefinitions
쿼리 매개변수 (Query Parameters)
| Name | Type | Description |
|---|---|---|
| pretty | string | 값이 'true'이면 출력을 보기 좋게(pretty printed) 만듭니다. user-agent가 브라우저나 명령줄 HTTP 도구(curl, wget)를 나타내지 않는 한 기본값은 'false'입니다. |
| dryRun | string | 설정되면 수정 사항이 영속화(persist)되지 않아야 함을 나타냅니다. 유효하지 않거나 인식할 수 없는 dryRun 지시어는 오류 응답을 초래하며 요청을 더 이상 처리하지 않습니다. 허용 값: - All: 모든 dry run 단계가 처리됩니다. |
| fieldManager | string | fieldManager는 이러한 변경을 수행하는 주체(actor)나 엔터티와 연결된 이름입니다. 값은 128자 이하이어야 하며, https://golang.org/pkg/unicode/#IsPrint 에 정의된 대로 인쇄 가능한 문자만 포함해야 합니다. |
| fieldValidation | string | fieldValidation은 알 수 없는(unknown) 필드나 중복(duplicate) 필드를 포함하는 요청(POST/PUT/PATCH) 객체를 서버가 어떻게 처리할지 지시합니다. 허용 값: - Ignore: 객체에서 조용히 제거되는 모든 unknown 필드를 무시하고, 디코더가 만나는 중복 필드 중 마지막을 제외한 모든 필드를 무시합니다. v1.23 이전의 기본 동작입니다. - Warn: 객체에서 제거되는 각 unknown 필드와 만나는 각 중복 필드에 대해 표준 warning 응답 헤더로 경고를 보냅니다. 다른 오류가 없다면 요청은 여전히 성공하며 중복 필드 중 마지막 값만 영속화합니다. v1.23+의 기본 동작입니다. - Strict: 객체에서 unknown 필드가 제거되거나 중복 필드가 존재하면 BadRequest 오류로 요청을 실패시킵니다. 서버가 반환하는 오류에는 발견된 모든 unknown/duplicate 필드가 포함됩니다. |
본문 매개변수 (Body Parameters)
| Name | Type | Description |
|---|---|---|
| body | CustomResourceDefinition |
응답 (Response)
| Status | Description | Response |
|---|---|---|
| 200 | OK | CustomResourceDefinition |
| 201 | Created | CustomResourceDefinition |
| 202 | Accepted | CustomResourceDefinition |
patch Patch
HTTP 요청 (HTTP Request)
PATCH /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}
경로 매개변수 (Path Parameters)
| Name | Type | Description |
|---|---|---|
| name | string | CustomResourceDefinition의 이름입니다. |
쿼리 매개변수 (Query Parameters)
| Name | Type | Description |
|---|---|---|
| pretty | string | 값이 'true'이면 출력을 보기 좋게(pretty printed) 만듭니다. user-agent가 브라우저나 명령줄 HTTP 도구(curl, wget)를 나타내지 않는 한 기본값은 'false'입니다. |
| dryRun | string | 설정되면 수정 사항이 영속화(persist)되지 않아야 함을 나타냅니다. 유효하지 않거나 인식할 수 없는 dryRun 지시어는 오류 응답을 초래하며 요청을 더 이상 처리하지 않습니다. 허용 값: - All: 모든 dry run 단계가 처리됩니다. |
| fieldManager | string | fieldManager는 이러한 변경을 수행하는 주체(actor)나 엔터티와 연결된 이름입니다. 값은 128자 이하이어야 하며, https://golang.org/pkg/unicode/#IsPrint 에 정의된 대로 인쇄 가능한 문자만 포함해야 합니다. 이 필드는 apply 요청(application/apply-patch)에는 필수이며, apply가 아닌 patch 유형(JsonPatch, MergePatch, StrategicMergePatch)에는 선택 사항입니다. |
| fieldValidation | string | fieldValidation은 알 수 없는(unknown) 필드나 중복(duplicate) 필드를 포함하는 요청(POST/PUT/PATCH) 객체를 서버가 어떻게 처리할지 지시합니다. 허용 값: - Ignore: 객체에서 조용히 제거되는 모든 unknown 필드를 무시하고, 디코더가 만나는 중복 필드 중 마지막을 제외한 모든 필드를 무시합니다. v1.23 이전의 기본 동작입니다. - Warn: 객체에서 제거되는 각 unknown 필드와 만나는 각 중복 필드에 대해 표준 warning 응답 헤더로 경고를 보냅니다. 다른 오류가 없다면 요청은 여전히 성공하며 중복 필드 중 마지막 값만 영속화합니다. v1.23+의 기본 동작입니다. - Strict: 객체에서 unknown 필드가 제거되거나 중복 필드가 존재하면 BadRequest 오류로 요청을 실패시킵니다. 서버가 반환하는 오류에는 발견된 모든 unknown/duplicate 필드가 포함됩니다. |
| force | boolean | Force는 Apply 요청을 "강제(force)"하는 데 사용됩니다. 즉 사용자가 다른 사람이 소유한 충돌 필드를 다시 획득하게 됩니다. apply가 아닌 patch 요청에서는 Force 플래그가 설정되지 않은 상태여야 합니다. |
본문 매개변수 (Body Parameters)
| Name | Type | Description |
|---|---|---|
| body | Patch |
응답 (Response)
| Status | Description | Response |
|---|---|---|
| 200 | OK | CustomResourceDefinition |
| 201 | Created | CustomResourceDefinition |
put Replace
HTTP 요청 (HTTP Request)
PUT /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}
경로 매개변수 (Path Parameters)
| Name | Type | Description |
|---|---|---|
| name | string | CustomResourceDefinition의 이름입니다. |
쿼리 매개변수 (Query Parameters)
| Name | Type | Description |
|---|---|---|
| pretty | string | 값이 'true'이면 출력을 보기 좋게(pretty printed) 만듭니다. user-agent가 브라우저나 명령줄 HTTP 도구(curl, wget)를 나타내지 않는 한 기본값은 'false'입니다. |
| dryRun | string | 설정되면 수정 사항이 영속화(persist)되지 않아야 함을 나타냅니다. 유효하지 않거나 인식할 수 없는 dryRun 지시어는 오류 응답을 초래하며 요청을 더 이상 처리하지 않습니다. 허용 값: - All: 모든 dry run 단계가 처리됩니다. |
| fieldManager | string | fieldManager는 이러한 변경을 수행하는 주체(actor)나 엔터티와 연결된 이름입니다. 값은 128자 이하이어야 하며, https://golang.org/pkg/unicode/#IsPrint 에 정의된 대로 인쇄 가능한 문자만 포함해야 합니다. |
| fieldValidation | string | fieldValidation은 알 수 없는(unknown) 필드나 중복(duplicate) 필드를 포함하는 요청(POST/PUT/PATCH) 객체를 서버가 어떻게 처리할지 지시합니다. 허용 값: - Ignore: 객체에서 조용히 제거되는 모든 unknown 필드를 무시하고, 디코더가 만나는 중복 필드 중 마지막을 제외한 모든 필드를 무시합니다. v1.23 이전의 기본 동작입니다. - Warn: 객체에서 제거되는 각 unknown 필드와 만나는 각 중복 필드에 대해 표준 warning 응답 헤더로 경고를 보냅니다. 다른 오류가 없다면 요청은 여전히 성공하며 중복 필드 중 마지막 값만 영속화합니다. v1.23+의 기본 동작입니다. - Strict: 객체에서 unknown 필드가 제거되거나 중복 필드가 존재하면 BadRequest 오류로 요청을 실패시킵니다. 서버가 반환하는 오류에는 발견된 모든 unknown/duplicate 필드가 포함됩니다. |
본문 매개변수 (Body Parameters)
| Name | Type | Description |
|---|---|---|
| body | CustomResourceDefinition |
응답 (Response)
| Status | Description | Response |
|---|---|---|
| 200 | OK | CustomResourceDefinition |
| 201 | Created | CustomResourceDefinition |
delete Delete
HTTP 요청 (HTTP Request)
DELETE /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}
경로 매개변수 (Path Parameters)
| Name | Type | Description |
|---|---|---|
| name | string | CustomResourceDefinition의 이름입니다. |
쿼리 매개변수 (Query Parameters)
| Name | Type | Description |
|---|---|---|
| pretty | string | 값이 'true'이면 출력을 보기 좋게(pretty printed) 만듭니다. user-agent가 브라우저나 명령줄 HTTP 도구(curl, wget)를 나타내지 않는 한 기본값은 'false'입니다. |
| dryRun | string | 설정되면 수정 사항이 영속화(persist)되지 않아야 함을 나타냅니다. 유효하지 않거나 인식할 수 없는 dryRun 지시어는 오류 응답을 초래하며 요청을 더 이상 처리하지 않습니다. 허용 값: - All: 모든 dry run 단계가 처리됩니다. |
| gracePeriodSeconds | integer | 객체가 삭제되기까지의 시간(초)입니다. 값은 음이 아닌 정수여야 합니다. 값 0은 즉시 삭제를 의미합니다. 이 값이 nil이면 지정된 유형의 기본 유예 기간(grace period)이 사용됩니다. 지정하지 않으면 객체별 기본값이 적용됩니다. 0은 즉시 삭제를 의미합니다. |
| ignoreStoreReadErrorWithClusterBreakingPotential | boolean | true로 설정하면 일반 삭제 흐름이 손상된 객체(corrupt) 오류로 실패할 때 리소스의 비안전 삭제(unsafe deletion)를 트리거합니다. 리소스는 a) 데이터를 변환할 수 없거나[예: 복호화 실패] b) 객체로 디코딩에 실패하는 등, 기본 스토리지에서 성공적으로 검색할 수 없을 때 손상된 것으로 간주합니다. 참고: 비안전 삭제는 finalizer 제약을 무시하고, 사전 조건(precondition) 검사를 건너뛰며, 스토리지에서 객체를 제거합니다. 경고: 비안전 삭제되는 리소스와 연관된 워크로드가 일반 삭제 흐름에 의존한다면 클러스터가 손상될 수 있습니다. 정말로 잘 알고 있을 때만 사용하세요. 기본값은 false이며 사용자가 명시적으로 활성화해야 합니다. |
| orphanDependents | boolean | 사용 중단(Deprecated): PropagationPolicy를 사용하세요. 이 필드는 1.7에서 폐기 예정입니다. 종속 객체를 고아(orphan)로 만들지 여부입니다. true/false이면 객체의 finalizers 목록에서 "orphan" finalizer가 추가/제거됩니다. 이 필드 또는 PropagationPolicy 중 하나만 설정할 수 있으며 둘 다는 안 됩니다. |
| propagationPolicy | string | 가비지 컬렉션을 수행할지, 어떻게 수행할지입니다. 이 필드 또는 OrphanDependents 중 하나만 설정할 수 있으며 둘 다는 안 됩니다. 기본 정책은 metadata.finalizers에 설정된 기존 finalizer와 리소스별 기본 정책에 따라 결정됩니다. 허용 값: 'Orphan' - 종속 객체를 고아로 만듦; 'Background' - 가비지 컬렉터가 백그라운드에서 종속 객체를 삭제하도록 허용; 'Foreground' - 포그라운드에서 모든 종속 객체를 삭제하는 계단식(cascading) 정책. |
본문 매개변수 (Body Parameters)
| Name | Type | Description |
|---|---|---|
| body | DeleteOptions |
응답 (Response)
| Status | Description | Response |
|---|---|---|
| 200 | OK | Status |
| 202 | Accepted | Status |
delete Delete Collection
HTTP 요청 (HTTP Request)
DELETE /apis/apiextensions.k8s.io/v1/customresourcedefinitions
쿼리 매개변수 (Query Parameters)
| Name | Type | Description |
|---|---|---|
| pretty | string | 값이 'true'이면 출력을 보기 좋게(pretty printed) 만듭니다. user-agent가 브라우저나 명령줄 HTTP 도구(curl, wget)를 나타내지 않는 한 기본값은 'false'입니다. |
| continue | string | 서버에서 더 많은 결과를 가져올 때는 continue 옵션을 설정해야 합니다. 이 값은 서버가 정의하므로 클라이언트는 continue 값 자체를 제외하고 동일한 쿼리 매개변수를 사용한 이전 쿼리 결과의 continue 값만 사용할 수 있으며, 서버는 인식하지 못하는 continue 값을 거부할 수 있습니다. 지정된 continue 값이 만료(보통 5~15분)되거나 서버의 구성 변경으로 더 이상 유효하지 않으면, 서버는 continue 토큰과 함께 410 ResourceExpired 오류로 응답합니다. 클라이언트가 일관된 목록을 원한다면 continue 필드 없이 목록을 다시 시작해야 합니다. 그렇지 않으면 클라이언트는 410 오류로 받은 토큰으로 다른 목록 요청을 보낼 수 있으며, 서버는 다음 키부터 시작하되 최신 스냅샷 기준의 목록으로 응답하는데, 이는 이전 목록 결과와 일치하지 않을 수 있습니다(첫 목록 요청 이후 생성/수정/삭제된 객체는 키가 "다음 키" 이후라면 응답에 포함됩니다). watch가 true일 때는 이 필드가 지원되지 않습니다. 클라이언트는 서버가 반환한 마지막 resourceVersion 값부터 watch를 시작하여 변경 사항을 놓치지 않을 수 있습니다. |
| dryRun | string | 설정되면 수정 사항이 영속화(persist)되지 않아야 함을 나타냅니다. 유효하지 않거나 인식할 수 없는 dryRun 지시어는 오류 응답을 초래하며 요청을 더 이상 처리하지 않습니다. 허용 값: - All: 모든 dry run 단계가 처리됩니다. |
| fieldSelector | string | 반환되는 객체 목록을 필드 기준으로 제한하는 선택자(selector)입니다. 기본값은 모든 것을 대상으로 합니다. |
| gracePeriodSeconds | integer | 객체가 삭제되기까지의 시간(초)입니다. 값은 음이 아닌 정수여야 합니다. 값 0은 즉시 삭제를 의미합니다. 이 값이 nil이면 지정된 유형의 기본 유예 기간(grace period)이 사용됩니다. 지정하지 않으면 객체별 기본값이 적용됩니다. 0은 즉시 삭제를 의미합니다. |
| ignoreStoreReadErrorWithClusterBreakingPotential | boolean | true로 설정하면 일반 삭제 흐름이 손상된 객체(corrupt) 오류로 실패할 때 리소스의 비안전 삭제(unsafe deletion)를 트리거합니다. 리소스는 a) 데이터를 변환할 수 없거나[예: 복호화 실패] b) 객체로 디코딩에 실패하는 등, 기본 스토리지에서 성공적으로 검색할 수 없을 때 손상된 것으로 간주합니다. 참고: 비안전 삭제는 finalizer 제약을 무시하고, 사전 조건(precondition) 검사를 건너뛰며, 스토리지에서 객체를 제거합니다. 경고: 비안전 삭제되는 리소스와 연관된 워크로드가 일반 삭제 흐름에 의존한다면 클러스터가 손상될 수 있습니다. 정말로 잘 알고 있을 때만 사용하세요. 기본값은 false이며 사용자가 명시적으로 활성화해야 합니다. |
| labelSelector | string | 반환되는 객체 목록을 라벨 기준으로 제한하는 선택자(selector)입니다. 기본값은 모든 것을 대상으로 합니다. |
| limit | integer | limit은 목록 호출에서 반환할 최대 응답 수입니다. 더 많은 항목이 존재하면 서버는 목록 메타데이터의 continue 필드에 동일한 초기 쿼리로 다음 결과 집합을 가져오는 데 사용할 수 있는 값을 설정합니다. limit을 설정하면 요청된 모든 객체가 필터링되는 경우 요청한 수보다 적게(최대 0개까지) 반환될 수 있으며, 클라이언트는 더 많은 결과가 있는지 여부를 판단할 때 continue 필드의 존재만 사용해야 합니다. 서버는 limit 인자를 지원하지 않기로 선택하고 사용 가능한 모든 결과를 반환할 수 있습니다. limit이 지정되고 continue 필드가 비어 있으면 클라이언트는 더 이상 사용 가능한 결과가 없다고 가정할 수 있습니다. watch가 true이면 이 필드는 지원되지 않습니다. 서버는 continue를 사용할 때 반환되는 객체가 limit 없이 한 번의 목록 호출을 수행한 것과 동일함을 보장합니다. 즉 첫 요청 이후 생성/수정/삭제된 객체는 이후의 지속 요청에 포함되지 않습니다. 이를 일관된 스냅샷(consistent snapshot)이라고도 하며, limit으로 매우 큰 결과를 작은 조각으로 나누어 받는 클라이언트가 모든 가능한 객체를 볼 수 있도록 보장합니다. 청크 목록 중 객체가 업데이트되면 첫 목록 결과가 계산된 시점에 존재했던 객체 버전이 반환됩니다. |
| orphanDependents | boolean | 사용 중단(Deprecated): PropagationPolicy를 사용하세요. 이 필드는 1.7에서 폐기 예정입니다. 종속 객체를 고아(orphan)로 만들지 여부입니다. true/false이면 객체의 finalizers 목록에서 "orphan" finalizer가 추가/제거됩니다. 이 필드 또는 PropagationPolicy 중 하나만 설정할 수 있으며 둘 다는 안 됩니다. |
| propagationPolicy | string | 가비지 컬렉션을 수행할지, 어떻게 수행할지입니다. 이 필드 또는 OrphanDependents 중 하나만 설정할 수 있으며 둘 다는 안 됩니다. 기본 정책은 metadata.finalizers에 설정된 기존 finalizer와 리소스별 기본 정책에 따라 결정됩니다. 허용 값: 'Orphan' - 종속 객체를 고아로 만듦; 'Background' - 가비지 컬렉터가 백그라운드에서 종속 객체를 삭제하도록 허용; 'Foreground' - 포그라운드에서 모든 종속 객체를 삭제하는 계단식(cascading) 정책. |
| resourceVersion | string | resourceVersion은 요청이 제공될 수 있는 리소스 버전에 대한 제약을 설정합니다. 자세한 내용은 https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions 를 참조하세요. 기본값은 설정되지 않은 상태(unset)입니다. |
| resourceVersionMatch | string | resourceVersionMatch는 resourceVersion이 목록 호출에 어떻게 적용되는지 결정합니다. resourceVersion이 설정된 목록 호출에서는 resourceVersionMatch를 설정하는 것이 매우 권장됩니다. 자세한 내용은 https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions 를 참조하세요. 기본값은 설정되지 않은 상태(unset)입니다. |
| sendInitialEvents | boolean | sendInitialEvents=true는 watch=true와 함께 설정할 수 있습니다. 이 경우 watch 스트림은 현재 컬렉션에 있는 객체들의 상태를 만들어 내는 합성(synthetic) 이벤트로 시작합니다. 그러한 이벤트가 모두 전송되면 합성 "Bookmark" 이벤트가 전송됩니다. 이 bookmark는 객체 집합에 해당하는 ResourceVersion(RV)을 보고하며 "k8s.io/initial-events-end": "true" 어노테이션으로 표시됩니다. 이후 watch 스트림은 평소처럼 진행되며, 감시 대상 객체의 변경(RV 이후)에 해당하는 이벤트를 보냅니다. sendInitialEvents 옵션을 설정할 때는 resourceVersionMatch 옵션도 반드시 설정해야 합니다. watch 요청의 의미는 다음과 같습니다: |
| shardSelector | string | shardSelector는 CEL 기반 샤드 선택자(shard selector) 표현식을 사용하여 반환되는 객체 목록을 제한합니다. 형식은 shardRange() 함수와 ||(논리 OR)을 결합하여 하나 이상의 해시 범위를 지정합니다: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 필드 경로는 CEL 스타일의 객체 루트 구문(예: "object.metadata.uid")을 사용하며, fieldSelector 형식("metadata.uid")이 아닙니다. 현재 지원되는 경로: - object.metadata.uid - object.metadata.namespace hexStart와 hexEnd는 '0x' 접두사가 붙은 단일 인용 CEL 문자열 리터럴로, 64비트 FNV-1a 해시 공간의 포함하는 하한과 배타적 상한을 정의합니다. 전체 범위는 [0x0, 0x10000000000000000)이며, 배타적 상한은 2^64와 같습니다. 예: 2-샤드 분할: 샤드 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') 샤드 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-샤드 분할: 샤드 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') 샤드 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') 샤드 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') 샤드 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') 이는 알파 필드이며 ShardedListAndWatch 기능 게이트(feature gate)를 활성화해야 합니다. |
| timeoutSeconds | integer | list/watch 호출의 타임아웃입니다. 활동 여부와 관계없이 호출 시간을 제한합니다. |
본문 매개변수 (Body Parameters)
| Name | Type | Description |
|---|---|---|
| body | DeleteOptions |
응답 (Response)
| Status | Description | Response |
|---|---|---|
| 200 | OK | Status |
get Read
HTTP 요청 (HTTP Request)
GET /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}
경로 매개변수 (Path Parameters)
| Name | Type | Description |
|---|---|---|
| name | string | CustomResourceDefinition의 이름입니다. |
쿼리 매개변수 (Query Parameters)
| Name | Type | Description |
|---|---|---|
| pretty | string | 값이 'true'이면 출력을 보기 좋게(pretty printed) 만듭니다. user-agent가 브라우저나 명령줄 HTTP 도구(curl, wget)를 나타내지 않는 한 기본값은 'false'입니다. |
응답 (Response)
| Status | Description | Response |
|---|---|---|
| 200 | OK | CustomResourceDefinition |
get List
HTTP 요청 (HTTP Request)
GET /apis/apiextensions.k8s.io/v1/customresourcedefinitions
쿼리 매개변수 (Query Parameters)
| Name | Type | Description |
|---|---|---|
| pretty | string | 값이 'true'이면 출력을 보기 좋게(pretty printed) 만듭니다. user-agent가 브라우저나 명령줄 HTTP 도구(curl, wget)를 나타내지 않는 한 기본값은 'false'입니다. |
| allowWatchBookmarks | boolean | allowWatchBookmarks는 "BOOKMARK" 타입의 watch 이벤트를 요청합니다. 북마크를 구현하지 않은 서버는 이 플래그를 무시할 수 있으며, 북마크 전송은 서버의 판단에 따릅니다. 클라이언트는 북마크가 특정 간격으로 반환된다고 가정해서는 안 되며, 세션 중 서버가 BOOKMARK 이벤트를 보낼 것이라고 가정해서도 안 됩니다. 이 요청이 watch가 아니라면 이 필드는 무시됩니다. |
| continue | string | 서버에서 더 많은 결과를 가져올 때는 continue 옵션을 설정해야 합니다. 이 값은 서버가 정의하므로 클라이언트는 continue 값 자체를 제외하고 동일한 쿼리 매개변수를 사용한 이전 쿼리 결과의 continue 값만 사용할 수 있으며, 서버는 인식하지 못하는 continue 값을 거부할 수 있습니다. 지정된 continue 값이 만료(보통 5~15분)되거나 서버의 구성 변경으로 더 이상 유효하지 않으면, 서버는 continue 토큰과 함께 410 ResourceExpired 오류로 응답합니다. 클라이언트가 일관된 목록을 원한다면 continue 필드 없이 목록을 다시 시작해야 합니다. 그렇지 않으면 클라이언트는 410 오류로 받은 토큰으로 다른 목록 요청을 보낼 수 있으며, 서버는 다음 키부터 시작하되 최신 스냅샷 기준의 목록으로 응답하는데, 이는 이전 목록 결과와 일치하지 않을 수 있습니다(첫 목록 요청 이후 생성/수정/삭제된 객체는 키가 "다음 키" 이후라면 응답에 포함됩니다). watch가 true일 때는 이 필드가 지원되지 않습니다. 클라이언트는 서버가 반환한 마지막 resourceVersion 값부터 watch를 시작하여 변경 사항을 놓치지 않을 수 있습니다. |
| fieldSelector | string | 반환되는 객체 목록을 필드 기준으로 제한하는 선택자(selector)입니다. 기본값은 모든 것을 대상으로 합니다. |
| labelSelector | string | 반환되는 객체 목록을 라벨 기준으로 제한하는 선택자(selector)입니다. 기본값은 모든 것을 대상으로 합니다. |
| limit | integer | limit은 목록 호출에서 반환할 최대 응답 수입니다. 더 많은 항목이 존재하면 서버는 목록 메타데이터의 continue 필드에 동일한 초기 쿼리로 다음 결과 집합을 가져오는 데 사용할 수 있는 값을 설정합니다. limit을 설정하면 요청된 모든 객체가 필터링되는 경우 요청한 수보다 적게(최대 0개까지) 반환될 수 있으며, 클라이언트는 더 많은 결과가 있는지 여부를 판단할 때 continue 필드의 존재만 사용해야 합니다. 서버는 limit 인자를 지원하지 않기로 선택하고 사용 가능한 모든 결과를 반환할 수 있습니다. limit이 지정되고 continue 필드가 비어 있으면 클라이언트는 더 이상 사용 가능한 결과가 없다고 가정할 수 있습니다. watch가 true이면 이 필드는 지원되지 않습니다. 서버는 continue를 사용할 때 반환되는 객체가 limit 없이 한 번의 목록 호출을 수행한 것과 동일함을 보장합니다. 즉 첫 요청 이후 생성/수정/삭제된 객체는 이후의 지속 요청에 포함되지 않습니다. 이를 일관된 스냅샷(consistent snapshot)이라고도 하며, limit으로 매우 큰 결과를 작은 조각으로 나누어 받는 클라이언트가 모든 가능한 객체를 볼 수 있도록 보장합니다. 청크 목록 중 객체가 업데이트되면 첫 목록 결과가 계산된 시점에 존재했던 객체 버전이 반환됩니다. |
| resourceVersion | string | resourceVersion은 요청이 제공될 수 있는 리소스 버전에 대한 제약을 설정합니다. 자세한 내용은 https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions 를 참조하세요. 기본값은 설정되지 않은 상태(unset)입니다. |
| resourceVersionMatch | string | resourceVersionMatch는 resourceVersion이 목록 호출에 어떻게 적용되는지 결정합니다. resourceVersion이 설정된 목록 호출에서는 resourceVersionMatch를 설정하는 것이 매우 권장됩니다. 자세한 내용은 https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions 를 참조하세요. 기본값은 설정되지 않은 상태(unset)입니다. |
| sendInitialEvents | boolean | sendInitialEvents=true는 watch=true와 함께 설정할 수 있습니다. 이 경우 watch 스트림은 현재 컬렉션에 있는 객체들의 상태를 만들어 내는 합성(synthetic) 이벤트로 시작합니다. 그러한 이벤트가 모두 전송되면 합성 "Bookmark" 이벤트가 전송됩니다. 이 bookmark는 객체 집합에 해당하는 ResourceVersion(RV)을 보고하며 "k8s.io/initial-events-end": "true" 어노테이션으로 표시됩니다. 이후 watch 스트림은 평소처럼 진행되며, 감시 대상 객체의 변경(RV 이후)에 해당하는 이벤트를 보냅니다. sendInitialEvents 옵션을 설정할 때는 resourceVersionMatch 옵션도 반드시 설정해야 합니다. watch 요청의 의미는 다음과 같습니다: |
| shardSelector | string | shardSelector는 CEL 기반 샤드 선택자(shard selector) 표현식을 사용하여 반환되는 객체 목록을 제한합니다. 형식은 shardRange() 함수와 ||(논리 OR)을 결합하여 하나 이상의 해시 범위를 지정합니다: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 필드 경로는 CEL 스타일의 객체 루트 구문(예: "object.metadata.uid")을 사용하며, fieldSelector 형식("metadata.uid")이 아닙니다. 현재 지원되는 경로: - object.metadata.uid - object.metadata.namespace hexStart와 hexEnd는 '0x' 접두사가 붙은 단일 인용 CEL 문자열 리터럴로, 64비트 FNV-1a 해시 공간의 포함하는 하한과 배타적 상한을 정의합니다. 전체 범위는 [0x0, 0x10000000000000000)이며, 배타적 상한은 2^64와 같습니다. 예: 2-샤드 분할: 샤드 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') 샤드 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-샤드 분할: 샤드 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') 샤드 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') 샤드 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') 샤드 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') 이는 알파 필드이며 ShardedListAndWatch 기능 게이트(feature gate)를 활성화해야 합니다. |
| timeoutSeconds | integer | list/watch 호출의 타임아웃입니다. 활동 여부와 관계없이 호출 시간을 제한합니다. |
| watch | boolean | 설명된 리소스의 변경 사항을 감시(watch)하여 add, update, remove 알림의 스트림으로 반환합니다. resourceVersion을 지정하세요. |
응답 (Response)
| Status | Description | Response |
|---|---|---|
| 200 | OK | CustomResourceDefinitionList |
get Watch
HTTP 요청 (HTTP Request)
GET /apis/apiextensions.k8s.io/v1/watch/customresourcedefinitions/{name}
경로 매개변수 (Path Parameters)
| Name | Type | Description |
|---|---|---|
| name | string | CustomResourceDefinition의 이름입니다. |
쿼리 매개변수 (Query Parameters)
| Name | Type | Description |
|---|---|---|
| allowWatchBookmarks | boolean | allowWatchBookmarks는 "BOOKMARK" 타입의 watch 이벤트를 요청합니다. 북마크를 구현하지 않은 서버는 이 플래그를 무시할 수 있으며, 북마크 전송은 서버의 판단에 따릅니다. 클라이언트는 북마크가 특정 간격으로 반환된다고 가정해서는 안 되며, 세션 중 서버가 BOOKMARK 이벤트를 보낼 것이라고 가정해서도 안 됩니다. 이 요청이 watch가 아니라면 이 필드는 무시됩니다. |
| continue | string | 서버에서 더 많은 결과를 가져올 때는 continue 옵션을 설정해야 합니다. 이 값은 서버가 정의하므로 클라이언트는 continue 값 자체를 제외하고 동일한 쿼리 매개변수를 사용한 이전 쿼리 결과의 continue 값만 사용할 수 있으며, 서버는 인식하지 못하는 continue 값을 거부할 수 있습니다. 지정된 continue 값이 만료(보통 5~15분)되거나 서버의 구성 변경으로 더 이상 유효하지 않으면, 서버는 continue 토큰과 함께 410 ResourceExpired 오류로 응답합니다. 클라이언트가 일관된 목록을 원한다면 continue 필드 없이 목록을 다시 시작해야 합니다. 그렇지 않으면 클라이언트는 410 오류로 받은 토큰으로 다른 목록 요청을 보낼 수 있으며, 서버는 다음 키부터 시작하되 최신 스냅샷 기준의 목록으로 응답하는데, 이는 이전 목록 결과와 일치하지 않을 수 있습니다(첫 목록 요청 이후 생성/수정/삭제된 객체는 키가 "다음 키" 이후라면 응답에 포함됩니다). watch가 true일 때는 이 필드가 지원되지 않습니다. 클라이언트는 서버가 반환한 마지막 resourceVersion 값부터 watch를 시작하여 변경 사항을 놓치지 않을 수 있습니다. |
| fieldSelector | string | 반환되는 객체 목록을 필드 기준으로 제한하는 선택자(selector)입니다. 기본값은 모든 것을 대상으로 합니다. |
| labelSelector | string | 반환되는 객체 목록을 라벨 기준으로 제한하는 선택자(selector)입니다. 기본값은 모든 것을 대상으로 합니다. |
| limit | integer | limit은 목록 호출에서 반환할 최대 응답 수입니다. 더 많은 항목이 존재하면 서버는 목록 메타데이터의 continue 필드에 동일한 초기 쿼리로 다음 결과 집합을 가져오는 데 사용할 수 있는 값을 설정합니다. limit을 설정하면 요청된 모든 객체가 필터링되는 경우 요청한 수보다 적게(최대 0개까지) 반환될 수 있으며, 클라이언트는 더 많은 결과가 있는지 여부를 판단할 때 continue 필드의 존재만 사용해야 합니다. 서버는 limit 인자를 지원하지 않기로 선택하고 사용 가능한 모든 결과를 반환할 수 있습니다. limit이 지정되고 continue 필드가 비어 있으면 클라이언트는 더 이상 사용 가능한 결과가 없다고 가정할 수 있습니다. watch가 true이면 이 필드는 지원되지 않습니다. 서버는 continue를 사용할 때 반환되는 객체가 limit 없이 한 번의 목록 호출을 수행한 것과 동일함을 보장합니다. 즉 첫 요청 이후 생성/수정/삭제된 객체는 이후의 지속 요청에 포함되지 않습니다. 이를 일관된 스냅샷(consistent snapshot)이라고도 하며, limit으로 매우 큰 결과를 작은 조각으로 나누어 받는 클라이언트가 모든 가능한 객체를 볼 수 있도록 보장합니다. 청크 목록 중 객체가 업데이트되면 첫 목록 결과가 계산된 시점에 존재했던 객체 버전이 반환됩니다. |
| pretty | string | 값이 'true'이면 출력을 보기 좋게(pretty printed) 만듭니다. user-agent가 브라우저나 명령줄 HTTP 도구(curl, wget)를 나타내지 않는 한 기본값은 'false'입니다. |
| resourceVersion | string | resourceVersion은 요청이 제공될 수 있는 리소스 버전에 대한 제약을 설정합니다. 자세한 내용은 https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions 를 참조하세요. 기본값은 설정되지 않은 상태(unset)입니다. |
| resourceVersionMatch | string | resourceVersionMatch는 resourceVersion이 목록 호출에 어떻게 적용되는지 결정합니다. resourceVersion이 설정된 목록 호출에서는 resourceVersionMatch를 설정하는 것이 매우 권장됩니다. 자세한 내용은 https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions 를 참조하세요. 기본값은 설정되지 않은 상태(unset)입니다. |
| sendInitialEvents | boolean | sendInitialEvents=true는 watch=true와 함께 설정할 수 있습니다. 이 경우 watch 스트림은 현재 컬렉션에 있는 객체들의 상태를 만들어 내는 합성(synthetic) 이벤트로 시작합니다. 그러한 이벤트가 모두 전송되면 합성 "Bookmark" 이벤트가 전송됩니다. 이 bookmark는 객체 집합에 해당하는 ResourceVersion(RV)을 보고하며 "k8s.io/initial-events-end": "true" 어노테이션으로 표시됩니다. 이후 watch 스트림은 평소처럼 진행되며, 감시 대상 객체의 변경(RV 이후)에 해당하는 이벤트를 보냅니다. sendInitialEvents 옵션을 설정할 때는 resourceVersionMatch 옵션도 반드시 설정해야 합니다. watch 요청의 의미는 다음과 같습니다: |
| shardSelector | string | shardSelector는 CEL 기반 샤드 선택자(shard selector) 표현식을 사용하여 반환되는 객체 목록을 제한합니다. 형식은 shardRange() 함수와 ||(논리 OR)을 결합하여 하나 이상의 해시 범위를 지정합니다: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 필드 경로는 CEL 스타일의 객체 루트 구문(예: "object.metadata.uid")을 사용하며, fieldSelector 형식("metadata.uid")이 아닙니다. 현재 지원되는 경로: - object.metadata.uid - object.metadata.namespace hexStart와 hexEnd는 '0x' 접두사가 붙은 단일 인용 CEL 문자열 리터럴로, 64비트 FNV-1a 해시 공간의 포함하는 하한과 배타적 상한을 정의합니다. 전체 범위는 [0x0, 0x10000000000000000)이며, 배타적 상한은 2^64와 같습니다. 예: 2-샤드 분할: 샤드 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') 샤드 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-샤드 분할: 샤드 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') 샤드 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') 샤드 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') 샤드 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') 이는 알파 필드이며 ShardedListAndWatch 기능 게이트(feature gate)를 활성화해야 합니다. |
| timeoutSeconds | integer | list/watch 호출의 타임아웃입니다. 활동 여부와 관계없이 호출 시간을 제한합니다. |
| watch | boolean | 설명된 리소스의 변경 사항을 감시(watch)하여 add, update, remove 알림의 스트림으로 반환합니다. resourceVersion을 지정하세요. |
응답 (Response)
| Status | Description | Response |
|---|---|---|
| 200 | OK | WatchEvent |
get Watch List
HTTP 요청 (HTTP Request)
GET /apis/apiextensions.k8s.io/v1/watch/customresourcedefinitions
쿼리 매개변수 (Query Parameters)
| Name | Type | Description |
|---|---|---|
| allowWatchBookmarks | boolean | allowWatchBookmarks는 "BOOKMARK" 타입의 watch 이벤트를 요청합니다. 북마크를 구현하지 않은 서버는 이 플래그를 무시할 수 있으며, 북마크 전송은 서버의 판단에 따릅니다. 클라이언트는 북마크가 특정 간격으로 반환된다고 가정해서는 안 되며, 세션 중 서버가 BOOKMARK 이벤트를 보낼 것이라고 가정해서도 안 됩니다. 이 요청이 watch가 아니라면 이 필드는 무시됩니다. |
| continue | string | 서버에서 더 많은 결과를 가져올 때는 continue 옵션을 설정해야 합니다. 이 값은 서버가 정의하므로 클라이언트는 continue 값 자체를 제외하고 동일한 쿼리 매개변수를 사용한 이전 쿼리 결과의 continue 값만 사용할 수 있으며, 서버는 인식하지 못하는 continue 값을 거부할 수 있습니다. 지정된 continue 값이 만료(보통 5~15분)되거나 서버의 구성 변경으로 더 이상 유효하지 않으면, 서버는 continue 토큰과 함께 410 ResourceExpired 오류로 응답합니다. 클라이언트가 일관된 목록을 원한다면 continue 필드 없이 목록을 다시 시작해야 합니다. 그렇지 않으면 클라이언트는 410 오류로 받은 토큰으로 다른 목록 요청을 보낼 수 있으며, 서버는 다음 키부터 시작하되 최신 스냅샷 기준의 목록으로 응답하는데, 이는 이전 목록 결과와 일치하지 않을 수 있습니다(첫 목록 요청 이후 생성/수정/삭제된 객체는 키가 "다음 키" 이후라면 응답에 포함됩니다). watch가 true일 때는 이 필드가 지원되지 않습니다. 클라이언트는 서버가 반환한 마지막 resourceVersion 값부터 watch를 시작하여 변경 사항을 놓치지 않을 수 있습니다. |
| fieldSelector | string | 반환되는 객체 목록을 필드 기준으로 제한하는 선택자(selector)입니다. 기본값은 모든 것을 대상으로 합니다. |
| labelSelector | string | 반환되는 객체 목록을 라벨 기준으로 제한하는 선택자(selector)입니다. 기본값은 모든 것을 대상으로 합니다. |
| limit | integer | limit은 목록 호출에서 반환할 최대 응답 수입니다. 더 많은 항목이 존재하면 서버는 목록 메타데이터의 continue 필드에 동일한 초기 쿼리로 다음 결과 집합을 가져오는 데 사용할 수 있는 값을 설정합니다. limit을 설정하면 요청된 모든 객체가 필터링되는 경우 요청한 수보다 적게(최대 0개까지) 반환될 수 있으며, 클라이언트는 더 많은 결과가 있는지 여부를 판단할 때 continue 필드의 존재만 사용해야 합니다. 서버는 limit 인자를 지원하지 않기로 선택하고 사용 가능한 모든 결과를 반환할 수 있습니다. limit이 지정되고 continue 필드가 비어 있으면 클라이언트는 더 이상 사용 가능한 결과가 없다고 가정할 수 있습니다. watch가 true이면 이 필드는 지원되지 않습니다. 서버는 continue를 사용할 때 반환되는 객체가 limit 없이 한 번의 목록 호출을 수행한 것과 동일함을 보장합니다. 즉 첫 요청 이후 생성/수정/삭제된 객체는 이후의 지속 요청에 포함되지 않습니다. 이를 일관된 스냅샷(consistent snapshot)이라고도 하며, limit으로 매우 큰 결과를 작은 조각으로 나누어 받는 클라이언트가 모든 가능한 객체를 볼 수 있도록 보장합니다. 청크 목록 중 객체가 업데이트되면 첫 목록 결과가 계산된 시점에 존재했던 객체 버전이 반환됩니다. |
| pretty | string | 값이 'true'이면 출력을 보기 좋게(pretty printed) 만듭니다. user-agent가 브라우저나 명령줄 HTTP 도구(curl, wget)를 나타내지 않는 한 기본값은 'false'입니다. |
| resourceVersion | string | resourceVersion은 요청이 제공될 수 있는 리소스 버전에 대한 제약을 설정합니다. 자세한 내용은 https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions 를 참조하세요. 기본값은 설정되지 않은 상태(unset)입니다. |
| resourceVersionMatch | string | resourceVersionMatch는 resourceVersion이 목록 호출에 어떻게 적용되는지 결정합니다. resourceVersion이 설정된 목록 호출에서는 resourceVersionMatch를 설정하는 것이 매우 권장됩니다. 자세한 내용은 https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions 를 참조하세요. 기본값은 설정되지 않은 상태(unset)입니다. |
| sendInitialEvents | boolean | sendInitialEvents=true는 watch=true와 함께 설정할 수 있습니다. 이 경우 watch 스트림은 현재 컬렉션에 있는 객체들의 상태를 만들어 내는 합성(synthetic) 이벤트로 시작합니다. 그러한 이벤트가 모두 전송되면 합성 "Bookmark" 이벤트가 전송됩니다. 이 bookmark는 객체 집합에 해당하는 ResourceVersion(RV)을 보고하며 "k8s.io/initial-events-end": "true" 어노테이션으로 표시됩니다. 이후 watch 스트림은 평소처럼 진행되며, 감시 대상 객체의 변경(RV 이후)에 해당하는 이벤트를 보냅니다. sendInitialEvents 옵션을 설정할 때는 resourceVersionMatch 옵션도 반드시 설정해야 합니다. watch 요청의 의미는 다음과 같습니다: |
| shardSelector | string | shardSelector는 CEL 기반 샤드 선택자(shard selector) 표현식을 사용하여 반환되는 객체 목록을 제한합니다. 형식은 shardRange() 함수와 ||(논리 OR)을 결합하여 하나 이상의 해시 범위를 지정합니다: shardRange(object.metadata.uid, '0x0', '0x8000000000000000') shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 필드 경로는 CEL 스타일의 객체 루트 구문(예: "object.metadata.uid")을 사용하며, fieldSelector 형식("metadata.uid")이 아닙니다. 현재 지원되는 경로: - object.metadata.uid - object.metadata.namespace hexStart와 hexEnd는 '0x' 접두사가 붙은 단일 인용 CEL 문자열 리터럴로, 64비트 FNV-1a 해시 공간의 포함하는 하한과 배타적 상한을 정의합니다. 전체 범위는 [0x0, 0x10000000000000000)이며, 배타적 상한은 2^64와 같습니다. 예: 2-샤드 분할: 샤드 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000') 샤드 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000') 4-샤드 분할: 샤드 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000') 샤드 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000') 샤드 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000') 샤드 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000') 이는 알파 필드이며 ShardedListAndWatch 기능 게이트(feature gate)를 활성화해야 합니다. |
| timeoutSeconds | integer | list/watch 호출의 타임아웃입니다. 활동 여부와 관계없이 호출 시간을 제한합니다. |
| watch | boolean | 설명된 리소스의 변경 사항을 감시(watch)하여 add, update, remove 알림의 스트림으로 반환합니다. resourceVersion을 지정하세요. |
응답 (Response)
| Status | Description | Response |
|---|---|---|
| 200 | OK | WatchEvent |
patch Patch Status
HTTP 요청 (HTTP Request)
PATCH /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status
경로 매개변수 (Path Parameters)
| Name | Type | Description |
|---|---|---|
| name | string | CustomResourceDefinition의 이름입니다. |
쿼리 매개변수 (Query Parameters)
| Name | Type | Description |
|---|---|---|
| pretty | string | 값이 'true'이면 출력을 보기 좋게(pretty printed) 만듭니다. user-agent가 브라우저나 명령줄 HTTP 도구(curl, wget)를 나타내지 않는 한 기본값은 'false'입니다. |
| dryRun | string | 설정되면 수정 사항이 영속화(persist)되지 않아야 함을 나타냅니다. 유효하지 않거나 인식할 수 없는 dryRun 지시어는 오류 응답을 초래하며 요청을 더 이상 처리하지 않습니다. 허용 값: - All: 모든 dry run 단계가 처리됩니다. |
| fieldManager | string | fieldManager는 이러한 변경을 수행하는 주체(actor)나 엔터티와 연결된 이름입니다. 값은 128자 이하이어야 하며, https://golang.org/pkg/unicode/#IsPrint 에 정의된 대로 인쇄 가능한 문자만 포함해야 합니다. 이 필드는 apply 요청(application/apply-patch)에는 필수이며, apply가 아닌 patch 유형(JsonPatch, MergePatch, StrategicMergePatch)에는 선택 사항입니다. |
| fieldValidation | string | fieldValidation은 알 수 없는(unknown) 필드나 중복(duplicate) 필드를 포함하는 요청(POST/PUT/PATCH) 객체를 서버가 어떻게 처리할지 지시합니다. 허용 값: - Ignore: 객체에서 조용히 제거되는 모든 unknown 필드를 무시하고, 디코더가 만나는 중복 필드 중 마지막을 제외한 모든 필드를 무시합니다. v1.23 이전의 기본 동작입니다. - Warn: 객체에서 제거되는 각 unknown 필드와 만나는 각 중복 필드에 대해 표준 warning 응답 헤더로 경고를 보냅니다. 다른 오류가 없다면 요청은 여전히 성공하며 중복 필드 중 마지막 값만 영속화합니다. v1.23+의 기본 동작입니다. - Strict: 객체에서 unknown 필드가 제거되거나 중복 필드가 존재하면 BadRequest 오류로 요청을 실패시킵니다. 서버가 반환하는 오류에는 발견된 모든 unknown/duplicate 필드가 포함됩니다. |
| force | boolean | Force는 Apply 요청을 "강제(force)"하는 데 사용됩니다. 즉 사용자가 다른 사람이 소유한 충돌 필드를 다시 획득하게 됩니다. apply가 아닌 patch 요청에서는 Force 플래그가 설정되지 않은 상태여야 합니다. |
본문 매개변수 (Body Parameters)
| Name | Type | Description |
|---|---|---|
| body | Patch |
응답 (Response)
| Status | Description | Response |
|---|---|---|
| 200 | OK | CustomResourceDefinition |
| 201 | Created | CustomResourceDefinition |
get Read Status
HTTP 요청 (HTTP Request)
GET /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status
경로 매개변수 (Path Parameters)
| Name | Type | Description |
|---|---|---|
| name | string | CustomResourceDefinition의 이름입니다. |
쿼리 매개변수 (Query Parameters)
| Name | Type | Description |
|---|---|---|
| pretty | string | 값이 'true'이면 출력을 보기 좋게(pretty printed) 만듭니다. user-agent가 브라우저나 명령줄 HTTP 도구(curl, wget)를 나타내지 않는 한 기본값은 'false'입니다. |
응답 (Response)
| Status | Description | Response |
|---|---|---|
| 200 | OK | CustomResourceDefinition |
put Replace Status
HTTP 요청 (HTTP Request)
PUT /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status
경로 매개변수 (Path Parameters)
| Name | Type | Description |
|---|---|---|
| name | string | CustomResourceDefinition의 이름입니다. |
쿼리 매개변수 (Query Parameters)
| Name | Type | Description |
|---|---|---|
| pretty | string | 값이 'true'이면 출력을 보기 좋게(pretty printed) 만듭니다. user-agent가 브라우저나 명령줄 HTTP 도구(curl, wget)를 나타내지 않는 한 기본값은 'false'입니다. |
| dryRun | string | 설정되면 수정 사항이 영속화(persist)되지 않아야 함을 나타냅니다. 유효하지 않거나 인식할 수 없는 dryRun 지시어는 오류 응답을 초래하며 요청을 더 이상 처리하지 않습니다. 허용 값: - All: 모든 dry run 단계가 처리됩니다. |
| fieldManager | string | fieldManager는 이러한 변경을 수행하는 주체(actor)나 엔터티와 연결된 이름입니다. 값은 128자 이하이어야 하며, https://golang.org/pkg/unicode/#IsPrint 에 정의된 대로 인쇄 가능한 문자만 포함해야 합니다. |
| fieldValidation | string | fieldValidation은 알 수 없는(unknown) 필드나 중복(duplicate) 필드를 포함하는 요청(POST/PUT/PATCH) 객체를 서버가 어떻게 처리할지 지시합니다. 허용 값: - Ignore: 객체에서 조용히 제거되는 모든 unknown 필드를 무시하고, 디코더가 만나는 중복 필드 중 마지막을 제외한 모든 필드를 무시합니다. v1.23 이전의 기본 동작입니다. - Warn: 객체에서 제거되는 각 unknown 필드와 만나는 각 중복 필드에 대해 표준 warning 응답 헤더로 경고를 보냅니다. 다른 오류가 없다면 요청은 여전히 성공하며 중복 필드 중 마지막 값만 영속화합니다. v1.23+의 기본 동작입니다. - Strict: 객체에서 unknown 필드가 제거되거나 중복 필드가 존재하면 BadRequest 오류로 요청을 실패시킵니다. 서버가 반환하는 오류에는 발견된 모든 unknown/duplicate 필드가 포함됩니다. |
본문 매개변수 (Body Parameters)
| Name | Type | Description |
|---|---|---|
| body | CustomResourceDefinition |
응답 (Response)
| Status | Description | Response |
|---|---|---|
| 200 | OK | CustomResourceDefinition |
| 201 | Created | CustomResourceDefinition |