-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
- Loading branch information
Showing
33 changed files
with
2,265 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.10.0 | ||
creationTimestamp: null | ||
name: apiconversions.apis.kcp.dev | ||
spec: | ||
group: apis.kcp.dev | ||
names: | ||
categories: | ||
- kcp | ||
kind: APIConversion | ||
listKind: APIConversionList | ||
plural: apiconversions | ||
singular: apiconversion | ||
scope: Cluster | ||
versions: | ||
- additionalPrinterColumns: | ||
- jsonPath: .metadata.creationTimestamp | ||
name: Age | ||
type: date | ||
name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: 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. | ||
properties: | ||
apiVersion: | ||
description: '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' | ||
type: string | ||
kind: | ||
description: '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' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: Spec holds the desired state. | ||
properties: | ||
conversions: | ||
description: conversions specify rules to convert between different | ||
API versions in an APIResourceSchema. | ||
items: | ||
description: 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). | ||
properties: | ||
from: | ||
description: from is the source version. | ||
minLength: 1 | ||
pattern: ^v[1-9][0-9]*([a-z]+[1-9][0-9]*)?$ | ||
type: string | ||
preserve: | ||
description: preserve contains a list of JSONPath expressions | ||
to fields to preserve in the originating version of the object, | ||
relative to its, such as '.spec.name.first'. | ||
items: | ||
type: string | ||
type: array | ||
rules: | ||
description: rules contains field-specific conversion expressions. | ||
items: | ||
description: APIConversionRule specifies how to convert a | ||
single field. | ||
properties: | ||
destination: | ||
description: destination is a JSONPath expression to the | ||
field in the target version of the object, relative | ||
to its root, such as '.spec.name.first'. | ||
type: string | ||
field: | ||
description: field is a JSONPath expression to the field | ||
in the originating version of the object, relative to | ||
its root, such as '.spec.name.first'. | ||
type: string | ||
transformation: | ||
description: transformation is an optional CEL expression | ||
used to execute user-specified rules to transform the | ||
originating field -- identified by 'self' -- to the | ||
destination field. | ||
type: string | ||
required: | ||
- destination | ||
- field | ||
type: object | ||
type: array | ||
x-kubernetes-list-map-keys: | ||
- destination | ||
x-kubernetes-list-type: map | ||
to: | ||
description: to is the target version. | ||
minLength: 1 | ||
pattern: ^v[1-9][0-9]*([a-z]+[1-9][0-9]*)?$ | ||
type: string | ||
required: | ||
- from | ||
- rules | ||
- to | ||
type: object | ||
type: array | ||
x-kubernetes-list-map-keys: | ||
- from | ||
- to | ||
x-kubernetes-list-type: map | ||
required: | ||
- conversions | ||
type: object | ||
required: | ||
- metadata | ||
- spec | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.