Expand description
Types and traits necessary for interacting with the Kubernetes API
This crate provides the minimal apimachinery necessary to make requests to the kubernetes API.
It does not export export a client, but it also has almost no dependencies.
Everything in this crate is re-exported from kube
(even with zero features) under kube::core
.
Modules§
- admission
- Contains types for implementing admission controllers.
- cel
- CEL validation for CRDs
- conversion
- Contains types useful for implementing custom resource conversion webhooks.
- crd
- Traits and tyes for CustomResources
- discovery
- Type information structs for API discovery
- duration
- Kubernetes
Duration
s. - dynamic
- Contains types for using resource kinds not known at compile-time.
- error_
boundary - Types for isolating deserialization failures. See
DeserializeGuard
. - gvk
- Type information structs for dynamic resources.
- labels
- Type safe label selector logic
- metadata
- Metadata structs used in traits, lists, and dynamic objects.
- object
- Generic object and objectlist wrappers.
- params
- A port of request parameter *Optionals from apimachinery/types.go
- request
- Request builder type for arbitrary api types
- response
- Generic api response types
- schema
- Utilities for managing
CustomResourceDefinition
schemas - subresource
- Request builder types and parameters for subresources
- util
- Utils and helpers
- watch
- Types for the watch api
Structs§
- ApiResource
- Information about a Kubernetes API resource
- Cluster
Resource Scope - Indicates that a
Resource
is cluster-scoped. - Deserialize
Guard - A wrapper type for K that lets deserializing the parent object succeed, even if the K is invalid.
- Duration
- A Kubernetes duration.
- Dynamic
Object - A dynamic representation of a kubernetes object
- Dynamic
Resource Scope - Indicates that a
Resource
is of an indeterminate dynamic scope. - Error
Response - An error response from the API.
- Group
Version - Core information about a family of API Resources
- Group
Version Kind - Core information about an API Resource.
- Group
Version Resource - Represents a type-erased object resource.
- List
Meta - ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
- Namespace
Resource Scope - Indicates that a
Resource
is namespace-scoped. - NotUsed
- Empty struct for when data should be discarded
- Object
- A standard Kubernetes object with
.spec
and.status
. - Object
List - A generic Kubernetes object list
- Object
Meta - ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
- Parse
Expression Error - Indicates failure of conversion to Expression
- Partial
Object Meta - A generic representation of any object with
ObjectMeta
. - Request
- A Kubernetes request builder
- Rule
- Rule is a CEL validation rule for the CRD field
- Selector
- Perform selection on a list of expressions
- Status
- A Kubernetes status object
- SubResource
Scope - Indicates that a
Resource
is neither cluster-scoped nor namespace-scoped. - Type
Meta - Type information that is flattened into every kubernetes object
Enums§
- Expression
- A selector expression with existing operations
- List
Merge - ListType represents x-kubernetes merge strategy for list.
- MapMerge
- MapMerge represents x-kubernetes merge strategy for map.
- Message
- Message represents CEL validation message for the provided type
- Reason
- Reason is a machine-readable value providing more detail about why a field failed the validation.
- Struct
Merge - StructMerge represents x-kubernetes merge strategy for struct.
- Version
- Version parser for Kubernetes version patterns
- Watch
Event - A raw event returned from a watch query
Traits§
- Custom
Resource Ext - Extension trait that is implemented by kube-derive
- Partial
Object Meta Ext - Helper trait for converting
ObjectMeta
into usefulPartialObjectMeta
variants - Resource
- An accessor trait for a kubernetes Resource.
- Resource
Ext - Helper methods for resources.
- Resource
Scope - The scope of a
Resource
. - Selector
Ext - Selector extension trait for querying selector-like objects
Functions§
- api_
version_ from_ group_ version - Helper function that creates the
apiVersion
field from the group and version strings. - merge_
properties - Merge schema properties in order to pass overrides or extension properties from the other schema.
- merge_
strategy - Merge strategy takes schema and applies a set of merge strategy x-kubernetes rules to it, such as “x-kubernetes-list-type” and “x-kubernetes-list-map-keys”.
- merge_
strategy_ property - Merge strategy property mutates property under property_index of the schema with the provided set of merge strategy rules.
- validate
- Validate takes schema and applies a set of validation rules to it. The rules are stored on the top level under the “x-kubernetes-validations”.
- validate_
property - Validate property mutates property under property_index of the schema with the provided set of validation rules.