This is the multi-page printable view of this section. Click here to print.
Definitions
- 1: APIGroup
- 2: APIResource
- 3: APIVersions
- 4: BasicDevice
- 5: Binding
- 6: Condition
- 7: DeleteOptions
- 8: EventSource
- 9: Eviction
- 10: FieldSelectorAttributes
- 11: FieldSelectorRequirement
- 12: FieldsV1
- 13: GroupResource
- 14: GroupVersionForDiscovery
- 15: LabelSelector
- 16: LabelSelectorAttributes
- 17: LabelSelectorRequirement
- 18: ListMeta
- 19: LocalObjectReference
- 20: LocalSubjectAccessReview
- 21: ManagedFieldsEntry
- 22: MatchCondition
- 23: MatchResources
- 24: MicroTime
- 25: NamedRuleWithOperations
- 26: NodeSelector
- 27: NodeSelectorTerm
- 28: NonResourceAttributes
- 29: NonResourceRule
- 30: ObjectMeta
- 31: ObjectReference
- 32: OwnerReference
- 33: ParamKind
- 34: ParamRef
- 35: Patch
- 36: PolicyRule
- 37: Preconditions
- 38: Quantity
- 39: ResourceAttributes
- 40: ResourceRule
- 41: RoleRef
- 42: RuleWithOperations
- 43: Scale
- 44: SelfSubjectAccessReview
- 45: SelfSubjectReview
- 46: SelfSubjectRulesReview
- 47: ServerAddressByClientCIDR
- 48: ServiceReference
- 49: ShardInfo
- 50: Status
- 51: StatusCause
- 52: StatusDetails
- 53: Subject
- 54: SubjectAccessReview
- 55: SubjectRulesReviewStatus
- 56: Time
- 57: TokenReview
- 58: Toleration
- 59: TypedLocalObjectReference
- 60: TypedLocalObjectReference
- 61: UserInfo
- 62: Variable
- 63: WatchEvent
- 64: WebhookClientConfig
1 - APIGroup
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
APIGroup
APIGroup contains the name, the supported versions, and the preferred version of a group.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
name *string |
name is the name of the group. |
preferredVersionGroupVersionForDiscovery |
preferredVersion is the version preferred by the API server, which probably is the storage version. |
serverAddressByClientCIDRsServerAddressByClientCIDR array |
a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. |
versions *GroupVersionForDiscovery array |
versions are the versions supported in this group. |
APIGroupList
APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
groups *APIGroup array |
groups is a list of APIGroup. |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
2 - APIResource
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
APIResource
APIResource specifies the name of a resource and whether it is namespaced.
| Field | Description |
|---|---|
categoriesstring array |
categories is a list of the grouped resources this resource belongs to (e.g. 'all') |
groupstring |
group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale". |
kind *string |
kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo') |
name *string |
name is the plural name of the resource. |
namespaced *boolean |
namespaced indicates if a resource is namespaced or not. |
shortNamesstring array |
shortNames is a list of suggested short names of the resource. |
singularName *string |
singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface. |
storageVersionHashstring |
The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates. |
verbs *string array |
verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) |
versionstring |
version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)". |
APIResourceList
APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
groupVersion *string |
groupVersion is the group and version this APIResourceList is for. |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
resources *APIResource array |
resources contains the name of the resources and if they are namespaced. |
3 - APIVersions
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
APIVersions
APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
serverAddressByClientCIDRs *ServerAddressByClientCIDR array |
a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. |
versions *string array |
versions are the api versions that are available. |
4 - BasicDevice
apiVersion: resource.k8s.io/v1beta1
import "k8s.io/api/resource/v1beta1"
BasicDevice
BasicDevice defines one device instance.
| Field | Description |
|---|---|
allNodesboolean |
AllNodes indicates that all nodes have access to the device. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. |
allowMultipleAllocationsboolean |
AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests. If AllowMultipleAllocations is set to true, the device can be allocated more than once, and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not. |
attributesobject |
Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set. The maximum number of attributes and capacities combined is 32. |
bindingConditionsstring array |
BindingConditions defines the conditions for proceeding with binding. All of these conditions must be set in the per-device status conditions with a value of True to proceed with binding the pod to the node while scheduling the pod. The maximum number of binding conditions is 4. The conditions must be a valid condition type string. This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. |
bindingFailureConditionsstring array |
BindingFailureConditions defines the conditions for binding failure. They may be set in the per-device status conditions. If any is true, a binding failure occurred. The maximum number of binding failure conditions is 4. The conditions must be a valid condition type string. This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. |
bindsToNodeboolean |
BindsToNode indicates if the usage of an allocation involving this device has to be limited to exactly the node that was chosen when allocating the claim. If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector to match the node where the allocation was made. This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. |
capacityobject |
Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set. The maximum number of attributes and capacities combined is 32. |
consumesCountersDeviceCounterConsumption array |
ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets. There can only be a single entry per counterSet. The maximum number of device counter consumptions per device is 2. |
nodeAllocatableResourceMappingsobject |
NodeAllocatableResourceMappings defines the mapping of node resources that are managed by the DRA driver exposing this device. This includes resources currently reported in v1.Node `status.allocatable` that are not extended resources (see https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#extended-resources). Examples include "cpu", "memory", "ephemeral-storage", and hugepages. In addition to standard requests made through the Pod `spec`, these resources can also be requested through claims and allocated by the DRA driver. For example, a CPU DRA driver might allocate exclusive CPUs or auxiliary node memory dependencies of an accelerator device. The keys of this map are the node-allocatable resource names (e.g., "cpu", "memory"). Extended resource names are not permitted as keys. |
nodeNamestring |
NodeName identifies the node where the device is available. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. |
nodeSelectorNodeSelector |
NodeSelector defines the nodes where the device is available. Must use exactly one term. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. |
taintsDeviceTaint array |
If specified, these are the driver-defined taints. The maximum number of taints is 16. If taints are set for any device in a ResourceSlice, then the maximum number of allowed devices per ResourceSlice is 64 instead of 128. This is a beta field and requires enabling the DRADeviceTaints feature gate. |
5 - Binding
apiVersion: v1
import "k8s.io/api/core/v1"
Binding
Binding ties one object to another; for example, a pod is bound to a node by a scheduler.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
metadataObjectMeta |
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
target *ObjectReference |
The target object that you want to bind to the standard object. |
6 - Condition
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
Condition
Condition contains details for one aspect of the current state of this API Resource.
| Field | Description |
|---|---|
lastTransitionTime *Time |
lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. |
message *string |
message is a human readable message indicating details about the transition. This may be an empty string. |
observedGenerationinteger |
observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. |
reason *string |
reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. |
status *string |
status of the condition, one of True, False, Unknown. |
type *string |
type of condition in CamelCase or in foo.example.com/CamelCase. |
7 - DeleteOptions
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
DeleteOptions
DeleteOptions may be provided when deleting an API object.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
dryRunstring array |
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
gracePeriodSecondsinteger |
The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. |
ignoreStoreReadErrorWithClusterBreakingPotentialboolean |
if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
orphanDependentsboolean |
Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. |
preconditionsPreconditions |
Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. |
propagationPolicystring |
Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. |
8 - EventSource
apiVersion: v1
import "k8s.io/api/core/v1"
EventSource
EventSource contains information for an event.
| Field | Description |
|---|---|
componentstring |
Component from which the event is generated. |
hoststring |
Node name on which the event is generated. |
9 - Eviction
apiVersion: policy/v1
import "k8s.io/api/policy/v1"
Eviction
Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods/<pod name>/evictions.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
deleteOptionsDeleteOptions |
DeleteOptions may be provided |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
metadataObjectMeta |
ObjectMeta describes the pod that is being evicted. |
10 - FieldSelectorAttributes
apiVersion: authorization.k8s.io/v1
import "k8s.io/api/authorization/v1"
FieldSelectorAttributes
FieldSelectorAttributes indicates a field limited access. Webhook authors are encouraged to * ensure rawSelector and requirements are not both set * consider the requirements field if set * not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the *SubjectAccessReview endpoints of the kube-apiserver: * If rawSelector is empty and requirements are empty, the request is not limited. * If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. * If rawSelector is empty and requirements are present, the requirements should be honored * If rawSelector is present and requirements are present, the request is invalid.
| Field | Description |
|---|---|
rawSelectorstring |
rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver's *SubjectAccessReview will parse the rawSelector as long as the requirements are not present. |
requirementsFieldSelectorRequirement array |
requirements is the parsed interpretation of a field selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood. |
11 - FieldSelectorRequirement
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
FieldSelectorRequirement
FieldSelectorRequirement is a selector that contains values, a key, and an operator that relates the key and values.
| Field | Description |
|---|---|
key *string |
key is the field selector key that the requirement applies to. |
operator *string |
operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. The list of operators may grow in the future. |
valuesstring array |
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. |
12 - FieldsV1
FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.
Each key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:<name>', where <name> is the name of a field in a struct, or key in a map 'v:<value>', where <value> is the exact json formatted value of a list item 'i:<index>', where <index> is position of a item in a list 'k:<keys>', where <keys> is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.
The exact format is defined in sigs.k8s.io/structured-merge-diff
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
FieldsV1
FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.
Each key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:<name>', where <name> is the name of a field in a struct, or key in a map 'v:<value>', where <value> is the exact json formatted value of a list item 'i:<index>', where <index> is position of a item in a list 'k:<keys>', where <keys> is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.
The exact format is defined in sigs.k8s.io/structured-merge-diff
13 - GroupResource
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
GroupResource
GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types
| Field | Description |
|---|---|
group *string |
|
resource *string |
14 - GroupVersionForDiscovery
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
GroupVersionForDiscovery
GroupVersion contains the "group/version" and "version" string of a version. It is made a struct to keep extensibility.
| Field | Description |
|---|---|
groupVersion *string |
groupVersion specifies the API group and version in the form "group/version" |
version *string |
version specifies the version in the form of "version". This is to save the clients the trouble of splitting the GroupVersion. |
15 - LabelSelector
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
LabelSelector
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
| Field | Description |
|---|---|
matchExpressionsLabelSelectorRequirement array |
matchExpressions is a list of label selector requirements. The requirements are ANDed. |
matchLabelsobject |
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. |
16 - LabelSelectorAttributes
apiVersion: authorization.k8s.io/v1
import "k8s.io/api/authorization/v1"
LabelSelectorAttributes
LabelSelectorAttributes indicates a label limited access. Webhook authors are encouraged to * ensure rawSelector and requirements are not both set * consider the requirements field if set * not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the *SubjectAccessReview endpoints of the kube-apiserver: * If rawSelector is empty and requirements are empty, the request is not limited. * If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. * If rawSelector is empty and requirements are present, the requirements should be honored * If rawSelector is present and requirements are present, the request is invalid.
| Field | Description |
|---|---|
rawSelectorstring |
rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver's *SubjectAccessReview will parse the rawSelector as long as the requirements are not present. |
requirementsLabelSelectorRequirement array |
requirements is the parsed interpretation of a label selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood. |
17 - LabelSelectorRequirement
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
LabelSelectorRequirement
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
| Field | Description |
|---|---|
key *string |
key is the label key that the selector applies to. |
operator *string |
operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. |
valuesstring array |
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. |
18 - ListMeta
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
ListMeta
ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
| Field | Description |
|---|---|
continuestring |
continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message. |
remainingItemCountinteger |
remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact. |
resourceVersionstring |
String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency |
selfLinkstring |
Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. |
shardInfoShardInfo |
shardInfo is set when the list is a filtered subset of the full collection, as selected by a shard selector on the request. It echoes back the selector so clients can verify which shard they received and merge sharded responses. Clients should not cache sharded list responses as a full representation of the collection. This is an alpha field and requires enabling the ShardedListAndWatch feature gate. |
19 - LocalObjectReference
apiVersion: v1
import "k8s.io/api/core/v1"
LocalObjectReference
LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
| Field | Description |
|---|---|
namestring |
Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
20 - LocalSubjectAccessReview
apiVersion: authorization.k8s.io/v1
import "k8s.io/api/authorization/v1"
LocalSubjectAccessReview
LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
metadataObjectMeta |
metadata is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
spec *SubjectAccessReviewSpec |
spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted. |
statusSubjectAccessReviewStatus |
status is filled in by the server and indicates whether the request is allowed or not |
21 - ManagedFieldsEntry
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
ManagedFieldsEntry
ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the version of this resource that this field set applies to. The format is "group/version" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted. |
fieldsTypestring |
FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: "FieldsV1" |
fieldsV1FieldsV1 |
FieldsV1 holds the first JSON version format as described in the "FieldsV1" type. |
managerstring |
Manager is an identifier of the workflow managing these fields. |
operationstring |
Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'. |
subresourcestring |
Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource. |
timeTime |
Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over. |
22 - MatchCondition
apiVersion: admissionregistration.k8s.io/v1
import "k8s.io/api/admissionregistration/v1"
MatchCondition
MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.
| Field | Description |
|---|---|
expression *string |
expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables: 'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/ Required. |
name *string |
name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName') Required. |
23 - MatchResources
apiVersion: admissionregistration.k8s.io/v1
import "k8s.io/api/admissionregistration/v1"
MatchResources
MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
| Field | Description |
|---|---|
excludeResourceRulesNamedRuleWithOperations array |
excludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) |
matchPolicystring |
matchPolicy defines how the "MatchResources" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. Defaults to "Equivalent" Possible enum values: - `"Equivalent"` means requests should be sent to the webhook if they modify a resource listed in rules via another API group or version. - `"Exact"` means requests should only be sent to the webhook if they exactly match a given rule. |
namespaceSelectorLabelSelector |
namespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy. For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "runlevel", "operator": "NotIn", "values": [ "0", "1" ] } ] } If instead you want to only run the policy on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { "matchExpressions": [ { "key": "environment", "operator": "In", "values": [ "prod", "staging" ] } ] } See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors. Default to the empty LabelSelector, which matches everything. |
objectSelectorLabelSelector |
objectSelector decides whether to run the validation based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. |
resourceRulesNamedRuleWithOperations array |
resourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule. |
24 - MicroTime
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
MicroTime
MicroTime is version of Time with microsecond level precision.
25 - NamedRuleWithOperations
apiVersion: admissionregistration.k8s.io/v1
import "k8s.io/api/admissionregistration/v1"
NamedRuleWithOperations
NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
| Field | Description |
|---|---|
apiGroupsstring array |
apiGroups is the API groups the resources belong to. '\*' is all groups. If '\*' is present, the length of the slice must be one. Required. |
apiVersionsstring array |
apiVersions is the API versions the resources belong to. '\*' is all versions. If '\*' is present, the length of the slice must be one. Required. |
operationsstring array |
operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '\*' is present, the length of the slice must be one. Required. |
resourceNamesstring array |
resourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. |
resourcesstring array |
resources is a list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '\*' means all resources, but not subresources. 'pods/\*' means all subresources of pods. '\*/scale' means all scale subresources. '\*/\*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. Required. |
scopestring |
scope specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*". Possible enum values: - `"*"` means that all scopes are included. - `"Cluster"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped. - `"Namespaced"` means that scope is limited to namespaced objects. |
26 - NodeSelector
apiVersion: v1
import "k8s.io/api/core/v1"
NodeSelector
A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.
| Field | Description |
|---|---|
nodeSelectorTerms *NodeSelectorTerm array |
Required. A list of node selector terms. The terms are ORed. |
27 - NodeSelectorTerm
apiVersion: v1
import "k8s.io/api/core/v1"
NodeSelectorTerm
A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
| Field | Description |
|---|---|
matchExpressionsNodeSelectorRequirement array |
A list of node selector requirements by node's labels. |
matchFieldsNodeSelectorRequirement array |
A list of node selector requirements by node's fields. |
28 - NonResourceAttributes
apiVersion: authorization.k8s.io/v1
import "k8s.io/api/authorization/v1"
NonResourceAttributes
NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
| Field | Description |
|---|---|
pathstring |
path is the URL path of the request |
verbstring |
verb is the standard HTTP verb |
29 - NonResourceRule
apiVersion: authorization.k8s.io/v1
import "k8s.io/api/authorization/v1"
NonResourceRule
NonResourceRule holds information that describes a rule for the non-resource
| Field | Description |
|---|---|
nonResourceURLsstring array |
nonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path. "*" means all. |
verbs *string array |
verbs is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all. |
30 - ObjectMeta
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
ObjectMeta
ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
| Field | Description |
|---|---|
annotationsobject |
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations |
creationTimestampTime |
CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
deletionGracePeriodSecondsinteger |
Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only. |
deletionTimestampTime |
DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested. Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
finalizersstring array patch strategy: merge |
Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list. |
generateNamestring |
GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. If this field is specified and the generated name exists, the server will return a 409. Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency |
generationinteger |
A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. |
labelsobject |
Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels |
managedFieldsManagedFieldsEntry array |
ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like "ci-cd". The set of fields is always in the version that the workflow used when modifying the object. |
namestring |
Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names |
namespacestring |
Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. Must be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces |
ownerReferencesOwnerReference array patch strategy: merge on key uid |
List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller. |
resourceVersionstring |
An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency |
selfLinkstring |
Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. |
uidstring |
UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids |
31 - ObjectReference
apiVersion: v1
import "k8s.io/api/core/v1"
ObjectReference
ObjectReference contains enough information to let you inspect or modify the referred object.
| Field | Description |
|---|---|
apiVersionstring |
API version of the referent. |
fieldPathstring |
If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. |
kindstring |
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
namestring |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
namespacestring |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
resourceVersionstring |
Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency |
uidstring |
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids |
32 - OwnerReference
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
OwnerReference
OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.
| Field | Description |
|---|---|
apiVersion *string |
API version of the referent. |
blockOwnerDeletionboolean |
If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. |
controllerboolean |
If true, this reference points to the managing controller. |
kind *string |
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
name *string |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names |
uid *string |
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids |
33 - ParamKind
apiVersion: admissionregistration.k8s.io/v1
import "k8s.io/api/admissionregistration/v1"
ParamKind
ParamKind is a tuple of Group Kind and Version.
| Field | Description |
|---|---|
apiVersionstring |
apiVersion is the API group version the resources belong to. In format of "group/version". Required. |
kindstring |
kind is the API kind the resources belong to. Required. |
34 - ParamRef
apiVersion: admissionregistration.k8s.io/v1
import "k8s.io/api/admissionregistration/v1"
ParamRef
ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.
| Field | Description |
|---|---|
namestring |
name is the name of the resource being referenced. One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. A single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped. |
namespacestring |
namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields. A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty. - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. - If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error. |
parameterNotFoundActionstring |
parameterNotFoundAction controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy. Allowed values are `Allow` or `Deny` Required |
selectorLabelSelector |
selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind. If multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together. One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. |
35 - Patch
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
Patch
Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.
36 - PolicyRule
apiVersion: rbac.authorization.k8s.io/v1
import "k8s.io/api/rbac/v1"
PolicyRule
PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.
| Field | Description |
|---|---|
apiGroupsstring array |
APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. "" represents the core API group and "*" represents all API groups. |
nonResourceURLsstring array |
NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. |
resourceNamesstring array |
ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. |
resourcesstring array |
Resources is a list of resources this rule applies to. '\*' represents all resources. |
verbs *string array |
Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '\*' represents all verbs. |
37 - Preconditions
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
Preconditions
Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
| Field | Description |
|---|---|
resourceVersionstring |
Specifies the target ResourceVersion |
uidstring |
Specifies the target UID. |
38 - Quantity
Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.
The serialization format is:
(Note that <suffix> may be empty, from the "" case in <decimalSI>.)
<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= "+" | "-" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei
(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)
<decimalSI> ::= m | "" | k | M | G | T | P | E
(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)
<decimalExponent> ::= "e" <signedNumber> | "E" <signedNumber> ```
No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.
When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.
Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:
- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.
The sign will be omitted unless the number is negative.
Examples:
- 1.5 will be serialized as "1500m" - 1.5Gi will be serialized as "1536Mi"
Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.
Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)
This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.
apiVersion: resource
import "k8s.io/apimachinery/pkg/api/resource"
Quantity
Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.
The serialization format is:
(Note that <suffix> may be empty, from the "" case in <decimalSI>.)
<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= "+" | "-" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei
(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)
<decimalSI> ::= m | "" | k | M | G | T | P | E
(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)
<decimalExponent> ::= "e" <signedNumber> | "E" <signedNumber> ```
No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.
When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.
Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:
- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.
The sign will be omitted unless the number is negative.
Examples:
- 1.5 will be serialized as "1500m" - 1.5Gi will be serialized as "1536Mi"
Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.
Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)
This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.
<hr>
39 - ResourceAttributes
apiVersion: authorization.k8s.io/v1
import "k8s.io/api/authorization/v1"
ResourceAttributes
ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
| Field | Description |
|---|---|
fieldSelectorFieldSelectorAttributes |
fieldSelector describes the limitation on access based on field. It can only limit access, not broaden it. |
groupstring |
group is the API Group of the Resource. "*" means all. |
labelSelectorLabelSelectorAttributes |
labelSelector describes the limitation on access based on labels. It can only limit access, not broaden it. |
namestring |
name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. |
namespacestring |
namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview |
resourcestring |
resource is one of the existing resource types. "*" means all. |
subresourcestring |
subresource is one of the existing resource types. "" means none. |
verbstring |
verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. |
versionstring |
version is the API Version of the Resource. "*" means all. |
40 - ResourceRule
apiVersion: authorization.k8s.io/v1
import "k8s.io/api/authorization/v1"
ResourceRule
ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
| Field | Description |
|---|---|
apiGroupsstring array |
apiGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. "*" means all. |
resourceNamesstring array |
resourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all. |
resourcesstring array |
resources is a list of resources this rule applies to. "*" means all in the specified apiGroups. "*/foo" represents the subresource 'foo' for all resources in the specified apiGroups. |
verbs *string array |
verbs is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. |
41 - RoleRef
apiVersion: rbac.authorization.k8s.io/v1
import "k8s.io/api/rbac/v1"
RoleRef
RoleRef contains information that points to the role being used
| Field | Description |
|---|---|
apiGroupstring |
APIGroup is the group for the resource being referenced |
kind *string |
Kind is the type of resource being referenced |
name *string |
Name is the name of resource being referenced |
42 - RuleWithOperations
apiVersion: admissionregistration.k8s.io/v1
import "k8s.io/api/admissionregistration/v1"
RuleWithOperations
RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.
| Field | Description |
|---|---|
apiGroupsstring array |
apiGroups is the API groups the resources belong to. '\*' is all groups. If '\*' is present, the length of the slice must be one. Required. |
apiVersionsstring array |
apiVersions is the API versions the resources belong to. '\*' is all versions. If '\*' is present, the length of the slice must be one. Required. |
operationsstring array |
operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '\*' is present, the length of the slice must be one. Required. |
resourcesstring array |
resources is a list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '\*' means all resources, but not subresources. 'pods/\*' means all subresources of pods. '\*/scale' means all scale subresources. '\*/\*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. Required. |
scopestring |
scope specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*". Possible enum values: - `"*"` means that all scopes are included. - `"Cluster"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped. - `"Namespaced"` means that scope is limited to namespaced objects. |
43 - Scale
apiVersion: autoscaling/v1
import "k8s.io/api/autoscaling/v1"
Scale
Scale represents a scaling request for a resource.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
metadataObjectMeta |
Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
specScaleSpec |
spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. |
statusScaleStatus |
status is the current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only. |
ScaleSpec
ScaleSpec describes the attributes of a scale subresource.
| Field | Description |
|---|---|
replicasinteger |
replicas is the desired number of instances for the scaled object. |
ScaleStatus
ScaleStatus represents the current status of a scale subresource.
| Field | Description |
|---|---|
replicas *integer |
replicas is the actual number of observed instances of the scaled object. |
selectorstring |
selector is the label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ |
44 - SelfSubjectAccessReview
apiVersion: authorization.k8s.io/v1
import "k8s.io/api/authorization/v1"
SelfSubjectAccessReview
SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means "in all namespaces". Self is a special case, because users should always be able to check whether they can perform an action
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
metadataObjectMeta |
metadata is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
spec *SelfSubjectAccessReviewSpec |
spec holds information about the request being evaluated. user and groups must be empty |
statusSubjectAccessReviewStatus |
status is filled in by the server and indicates whether the request is allowed or not |
SelfSubjectAccessReviewSpec
SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of resourceAttributes and nonResourceAttributes must be set
| Field | Description |
|---|---|
nonResourceAttributesNonResourceAttributes |
nonResourceAttributes describes information for a non-resource access request |
resourceAttributesResourceAttributes |
resourceAttributes describes information for a resource access request |
45 - SelfSubjectReview
apiVersion: authentication.k8s.io/v1
import "k8s.io/api/authentication/v1"
SelfSubjectReview
SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
metadataObjectMeta |
metadata is standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
statusSelfSubjectReviewStatus |
status is filled in by the server with the user attributes. |
SelfSubjectReviewStatus
SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user.
| Field | Description |
|---|---|
userInfoUserInfo |
userInfo is a set of attributes belonging to the user making this request. |
46 - SelfSubjectRulesReview
apiVersion: authorization.k8s.io/v1
import "k8s.io/api/authorization/v1"
SelfSubjectRulesReview
SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
metadataObjectMeta |
metadata is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
spec *SelfSubjectRulesReviewSpec |
spec holds information about the request being evaluated. |
statusSubjectRulesReviewStatus |
status is filled in by the server and indicates the set of actions a user can perform. |
SelfSubjectRulesReviewSpec
SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview.
| Field | Description |
|---|---|
namespacestring |
namespace to evaluate rules for. Required. |
47 - ServerAddressByClientCIDR
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
ServerAddressByClientCIDR
ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.
| Field | Description |
|---|---|
clientCIDR *string |
The CIDR with which clients can match their IP to figure out the server address that they should use. |
serverAddress *string |
Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port. |
48 - ServiceReference
apiVersion: admissionregistration.k8s.io/v1
import "k8s.io/api/admissionregistration/v1"
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 |
pathstring |
path is an optional URL path which will be sent in any request to this service. |
portinteger |
port is the port on the service that hosts the webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). |
49 - ShardInfo
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
ShardInfo
ShardInfo describes the shard selector that was applied to produce a list response. Its presence on a list response indicates the list is a filtered subset.
| Field | Description |
|---|---|
selector *string |
selector is the shard selector string from the request, echoed back so clients can verify which shard they received and merge responses from multiple shards. |
50 - Status
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
Status
Status is a return value for calls that don't return other objects.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
codeinteger |
Suggested HTTP return code for this status, 0 if not set. |
detailsStatusDetails |
Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type. |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
messagestring |
A human-readable description of the status of this operation. |
metadataListMeta |
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
reasonstring |
A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. |
statusstring |
Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status |
51 - StatusCause
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
StatusCause
StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.
| Field | Description |
|---|---|
fieldstring |
The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. Examples: "name" - the field "name" on the current resource "items[0].name" - the field "name" on the first array entry in "items" |
messagestring |
A human-readable description of the cause of the error. This field may be presented as-is to a reader. |
reasonstring |
A machine-readable description of the cause of the error. If this value is empty there is no information available. |
52 - StatusDetails
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
StatusDetails
StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.
| Field | Description |
|---|---|
causesStatusCause array |
The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. |
groupstring |
The group attribute of the resource associated with the status StatusReason. |
kindstring |
The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
namestring |
The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). |
retryAfterSecondsinteger |
If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action. |
uidstring |
UID of the resource. (when there is a single resource which can be described). More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids |
53 - Subject
apiVersion: rbac.authorization.k8s.io/v1
import "k8s.io/api/rbac/v1"
Subject
Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.
| Field | Description |
|---|---|
apiGroupstring |
APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects. |
kind *string |
Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error. |
name *string |
Name of the object being referenced. |
namespacestring |
Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error. |
54 - SubjectAccessReview
apiVersion: authorization.k8s.io/v1
import "k8s.io/api/authorization/v1"
SubjectAccessReview
SubjectAccessReview checks whether or not a user or group can perform an action.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
metadataObjectMeta |
metadata is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
spec *SubjectAccessReviewSpec |
spec holds information about the request being evaluated |
statusSubjectAccessReviewStatus |
status is filled in by the server and indicates whether the request is allowed or not |
SubjectAccessReviewSpec
SubjectAccessReviewSpec is a description of the access request. Exactly one of resourceAttributes and nonResourceAttributes must be set
| Field | Description |
|---|---|
extraobject |
extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. |
groupsstring array |
groups is the groups you're testing for. |
nonResourceAttributesNonResourceAttributes |
nonResourceAttributes describes information for a non-resource access request |
resourceAttributesResourceAttributes |
resourceAttributes describes information for a resource access request |
uidstring |
uid information about the requesting user. |
userstring |
user is the user you're testing for. If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups |
SubjectAccessReviewStatus
SubjectAccessReviewStatus
| Field | Description |
|---|---|
allowed *boolean |
allowed is required. True if the action would be allowed, false otherwise. |
deniedboolean |
denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true. |
evaluationErrorstring |
evaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. |
reasonstring |
reason is optional. It indicates why a request was allowed or denied. |
55 - SubjectRulesReviewStatus
apiVersion: authorization.k8s.io/v1
import "k8s.io/api/authorization/v1"
SubjectRulesReviewStatus
SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.
| Field | Description |
|---|---|
evaluationErrorstring |
evaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete. |
incomplete *boolean |
incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation. |
nonResourceRules *NonResourceRule array |
nonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. |
resourceRules *ResourceRule array |
resourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. |
56 - Time
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
Time
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
57 - TokenReview
apiVersion: authentication.k8s.io/v1
import "k8s.io/api/authentication/v1"
TokenReview
TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
metadataObjectMeta |
metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
spec *TokenReviewSpec |
spec holds information about the request being evaluated |
statusTokenReviewStatus |
status is filled in by the server and indicates whether the request can be authenticated. |
TokenReviewSpec
TokenReviewSpec is a description of the token authentication request.
| Field | Description |
|---|---|
audiencesstring array |
audiences is a list of the identifiers that the resource server presented with the token identifies as. Audience-aware token authenticators will verify that the token was intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver. |
token *string |
token is the opaque bearer token. |
TokenReviewStatus
TokenReviewStatus is the result of the token authentication request.
| Field | Description |
|---|---|
audiencesstring array |
audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is "true", the token is valid against the audience of the Kubernetes API server. |
authenticatedboolean |
authenticated indicates that the token was associated with a known user. |
errorstring |
error indicates that the token couldn't be checked |
userUserInfo |
user is the UserInfo associated with the provided token. |
58 - Toleration
apiVersion: v1
import "k8s.io/api/core/v1"
Toleration
The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.
| Field | Description |
|---|---|
effectstring |
Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. Possible enum values: - `"NoExecute"` Evict any already-running pods that do not tolerate the taint. Currently enforced by NodeController. - `"NoSchedule"` Do not allow new pods to schedule onto the node unless they tolerate the taint, but allow all pods submitted to Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. Enforced by the scheduler. - `"PreferNoSchedule"` Like TaintEffectNoSchedule, but the scheduler tries not to schedule new pods onto the node, rather than prohibiting new pods from scheduling onto the node entirely. Enforced by the scheduler. |
keystring |
Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. |
operatorstring |
Operator represents a key's relationship to the value. Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). Possible enum values: - `"Equal"` - `"Exists"` - `"Gt"` - `"Lt"` |
tolerationSecondsinteger |
TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. |
valuestring |
Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. |
59 - TypedLocalObjectReference
apiVersion: v1
import "k8s.io/api/core/v1"
TypedLocalObjectReference
TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.
| Field | Description |
|---|---|
apiGroupstring |
APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. |
kind *string |
Kind is the type of resource being referenced |
name *string |
Name is the name of resource being referenced |
60 - TypedLocalObjectReference
apiVersion: scheduling.k8s.io/v1alpha2
import "k8s.io/api/scheduling/v1alpha2"
TypedLocalObjectReference
TypedLocalObjectReference allows to reference typed object inside the same namespace.
| Field | Description |
|---|---|
apiGroupstring |
APIGroup is the group for the resource being referenced. If APIGroup is empty, the specified Kind must be in the core API group. For any other third-party types, setting APIGroup is required. It must be a DNS subdomain. |
kind *string |
Kind is the type of resource being referenced. It must be a path segment name. |
name *string |
Name is the name of resource being referenced. It must be a path segment name. |
61 - UserInfo
apiVersion: authentication.k8s.io/v1
import "k8s.io/api/authentication/v1"
UserInfo
UserInfo holds the information about the user needed to implement the user.Info interface.
| Field | Description |
|---|---|
extraobject |
extra is any additional information provided by the authenticator. |
groupsstring array |
groups is the names of groups this user is a part of. |
uidstring |
uid is a unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. |
usernamestring |
username is the name that uniquely identifies this user among all active users. |
62 - Variable
apiVersion: admissionregistration.k8s.io/v1
import "k8s.io/api/admissionregistration/v1"
Variable
Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.
| Field | Description |
|---|---|
expression *string |
expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation. |
name *string |
name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is "foo", the variable will be available as `variables.foo` |
63 - WatchEvent
apiVersion: meta/v1
import "k8s.io/apimachinery/pkg/apis/meta/v1"
WatchEvent
Event represents a single event to a watched resource.
| Field | Description |
|---|---|
object * |
Object is: * If Type is Added or Modified: the new state of the object. * If Type is Deleted: the state of the object immediately before deletion. * If Type is Error: *Status is recommended; other types may make sense depending on context. |
type *string |
64 - WebhookClientConfig
apiVersion: admissionregistration.k8s.io/v1
import "k8s.io/api/admissionregistration/v1"
WebhookClientConfig
WebhookClientConfig contains the information to make a TLS connection with the webhook
| Field | Description |
|---|---|
caBundlestring |
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. |
serviceServiceReference |
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`. |
urlstring |
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. |