Skip to content

APIConversion

APIConversion CRD schema reference (group apis.kcp.io)

APIConversion contains rules to convert between different API versions in an APIResourceSchema. The name must match the name of the APIResourceSchema for the conversions to take effect.
Full name:
apiconversions.apis.kcp.io
Group:
apis.kcp.io
Singular name:
apiconversion
Plural name:
apiconversions
Scope:
Cluster
Versions:
v1alpha1

Version v1alpha1

Properties

.apiVersion

string

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

.kind

string

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

.metadata

object Required

.spec

object Required

Spec holds the desired state.

.spec.conversions

array Required

conversions specify rules to convert between different API versions in an APIResourceSchema.

.spec.conversions[*]

object

APIVersionConversion contains rules to convert between two specific API versions in an APIResourceSchema. Additionally, to avoid data loss when round-tripping from a version that contains a new field to one that doesn’t and back again, you can specify a list of fields to preserve (these are stored in annotations).

.spec.conversions[*].from

string Required

from is the source version.

.spec.conversions[*].preserve

array

preserve contains a list of JSONPath expressions to fields to preserve in the originating version of the object, relative to its root, such as ‘.spec.name.first’.

.spec.conversions[*].preserve[*]

string

.spec.conversions[*].rules

array Required

rules contains field-specific conversion expressions.

.spec.conversions[*].rules[*]

object

APIConversionRule specifies how to convert a single field.

.spec.conversions[*].rules[*].destination

string Required

destination is a JSONPath expression to the field in the target version of the object, relative to its root, such as ‘.spec.name.first’.

.spec.conversions[*].rules[*].field

string Required

field is a JSONPath expression to the field in the originating version of the object, relative to its root, such as ‘.spec.name.first’.

.spec.conversions[*].rules[*].transformation

string

transformation is an optional CEL expression used to execute user-specified rules to transform the originating field – identified by ‘self’ – to the destination field.

.spec.conversions[*].to

string Required

to is the target version.