Skip to content

Commit 7e213db

Browse files
committed
Update the vm-operator API to the new repo location
Signed-off-by: Chirayu Kapoor <[email protected]>
1 parent 5e5920c commit 7e213db

34 files changed

+696
-50
lines changed

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ generate-manifests: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc.
302302
output:crd:dir=$(SUPERVISOR_CRD_ROOT)
303303
# vm-operator crds are loaded to be used for integration tests.
304304
$(CONTROLLER_GEN) \
305-
paths=github.com/vmware-tanzu/vm-operator-api/api/... \
305+
paths=github.com/vmware-tanzu/vm-operator/api/... \
306306
crd:crdVersions=v1 \
307307
output:crd:dir=$(VMOP_CRD_ROOT)
308308

Diff for: apis/v1beta1/vspheremachine_webhook.go

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ func (m *VSphereMachine) ValidateCreate() error {
6969
}
7070

7171
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
72+
//
7273
//nolint:forcetypeassert
7374
func (m *VSphereMachine) ValidateUpdate(old runtime.Object) error {
7475
newVSphereMachine, err := runtime.DefaultUnstructuredConverter.ToUnstructured(m)

Diff for: apis/v1beta1/vspherevm_webhook.go

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ func (r *VSphereVM) ValidateCreate() error {
7575
}
7676

7777
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
78+
//
7879
//nolint:forcetypeassert
7980
func (r *VSphereVM) ValidateUpdate(old runtime.Object) error {
8081
newVSphereVM, err := runtime.DefaultUnstructuredConverter.ToUnstructured(r)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,284 @@
1+
2+
---
3+
apiVersion: apiextensions.k8s.io/v1
4+
kind: CustomResourceDefinition
5+
metadata:
6+
annotations:
7+
controller-gen.kubebuilder.io/version: v0.7.0
8+
creationTimestamp: null
9+
name: clustervirtualmachineimages.vmoperator.vmware.com
10+
spec:
11+
group: vmoperator.vmware.com
12+
names:
13+
kind: ClusterVirtualMachineImage
14+
listKind: ClusterVirtualMachineImageList
15+
plural: clustervirtualmachineimages
16+
shortNames:
17+
- cvmi
18+
- cvmimage
19+
- clustervmimage
20+
singular: clustervirtualmachineimage
21+
scope: Cluster
22+
versions:
23+
- additionalPrinterColumns:
24+
- jsonPath: .spec.providerRef.name
25+
name: Provider-Name
26+
type: string
27+
- jsonPath: .status.contentLibraryRef.name
28+
name: Content-Library-Name
29+
type: string
30+
- jsonPath: .status.imageName
31+
name: Image-Name
32+
type: string
33+
- jsonPath: .spec.productInfo.version
34+
name: Version
35+
type: string
36+
- jsonPath: .spec.osInfo.type
37+
name: Os-Type
38+
type: string
39+
- jsonPath: .spec.type
40+
name: Format
41+
type: string
42+
- jsonPath: .status.imageSupported
43+
name: Image-Supported
44+
priority: 1
45+
type: boolean
46+
- jsonPath: .metadata.creationTimestamp
47+
name: Age
48+
type: date
49+
name: v1alpha1
50+
schema:
51+
openAPIV3Schema:
52+
description: ClusterVirtualMachineImage is the schema for the clustervirtualmachineimage
53+
API A ClusterVirtualMachineImage represents the desired specification and
54+
the observed status of a ClusterVirtualMachineImage instance.
55+
properties:
56+
apiVersion:
57+
description: 'APIVersion defines the versioned schema of this representation
58+
of an object. Servers should convert recognized schemas to the latest
59+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
60+
type: string
61+
kind:
62+
description: 'Kind is a string value representing the REST resource this
63+
object represents. Servers may infer this from the endpoint the client
64+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
65+
type: string
66+
metadata:
67+
type: object
68+
spec:
69+
description: VirtualMachineImageSpec defines the desired state of VirtualMachineImage.
70+
properties:
71+
hwVersion:
72+
description: HardwareVersion describes the virtual hardware version
73+
of the image
74+
format: int32
75+
type: integer
76+
imageID:
77+
description: ImageID is a unique identifier exposed by the provider
78+
of this VirtualMachineImage.
79+
type: string
80+
imageSourceType:
81+
description: ImageSourceType describes the type of content source
82+
of the VirtualMachineImage. The only Content Source supported currently
83+
is the vSphere Content Library.
84+
type: string
85+
osInfo:
86+
description: OSInfo describes the attributes of the VirtualMachineImage
87+
relating to the Operating System contained in the image.
88+
properties:
89+
type:
90+
description: Type typically describes the type of the guest operating
91+
system.
92+
type: string
93+
version:
94+
description: Version typically describes the version of the guest
95+
operating system.
96+
type: string
97+
type: object
98+
ovfEnv:
99+
additionalProperties:
100+
description: OvfProperty describes information related to a user
101+
configurable property element that is supported by VirtualMachineImage
102+
and can be customized during VirtualMachine creation.
103+
properties:
104+
default:
105+
description: Default describes the default value of the ovf
106+
key.
107+
type: string
108+
description:
109+
description: Description contains the value of the OVF property's
110+
optional "Description" element.
111+
type: string
112+
key:
113+
description: Key describes the key of the ovf property.
114+
type: string
115+
label:
116+
description: Label contains the value of the OVF property's
117+
optional "Label" element.
118+
type: string
119+
type:
120+
description: Type describes the type of the ovf property.
121+
type: string
122+
required:
123+
- key
124+
- type
125+
type: object
126+
description: OVFEnv describes the user configurable customization
127+
parameters of the VirtualMachineImage.
128+
type: object
129+
productInfo:
130+
description: ProductInfo describes the attributes of the VirtualMachineImage
131+
relating to the product contained in the image.
132+
properties:
133+
fullVersion:
134+
description: FullVersion typically describes a long-form version
135+
of the image.
136+
type: string
137+
product:
138+
description: Product typically describes the type of product contained
139+
in the image.
140+
type: string
141+
vendor:
142+
description: Vendor typically describes the name of the vendor
143+
that is producing the image.
144+
type: string
145+
version:
146+
description: Version typically describes a short-form version
147+
of the image.
148+
type: string
149+
type: object
150+
providerRef:
151+
description: ProviderRef is a reference to a content provider object
152+
that describes a provider.
153+
properties:
154+
apiVersion:
155+
description: API version of the referent.
156+
type: string
157+
kind:
158+
description: Kind is the type of resource being referenced.
159+
type: string
160+
name:
161+
description: Name is the name of resource being referenced.
162+
type: string
163+
namespace:
164+
description: Namespace of the resource being referenced. If empty,
165+
cluster scoped resource is assumed.
166+
type: string
167+
required:
168+
- kind
169+
- name
170+
type: object
171+
type:
172+
description: Type describes the type of the VirtualMachineImage. Currently,
173+
the only supported image is "OVF"
174+
type: string
175+
required:
176+
- imageID
177+
- providerRef
178+
- type
179+
type: object
180+
status:
181+
description: VirtualMachineImageStatus defines the observed state of VirtualMachineImage.
182+
properties:
183+
conditions:
184+
description: Conditions describes the current condition information
185+
of the VirtualMachineImage object. e.g. if the OS type is supported
186+
or image is supported by VMService
187+
items:
188+
description: Condition defines an observation of a VM Operator API
189+
resource operational state.
190+
properties:
191+
lastTransitionTime:
192+
description: Last time the condition transitioned from one status
193+
to another. This should be when the underlying condition changed.
194+
If that is not known, then using the time when the API field
195+
changed is acceptable.
196+
format: date-time
197+
type: string
198+
message:
199+
description: A human readable message indicating details about
200+
the transition. This field may be empty.
201+
type: string
202+
reason:
203+
description: The reason for the condition's last transition
204+
in CamelCase. The specific API may choose whether or not this
205+
field is considered a guaranteed API. This field may not be
206+
empty.
207+
type: string
208+
severity:
209+
description: Severity provides an explicit classification of
210+
Reason code, so the users or machines can immediately understand
211+
the current situation and act accordingly. The Severity field
212+
MUST be set only when Status=False.
213+
type: string
214+
status:
215+
description: Status of the condition, one of True, False, Unknown.
216+
type: string
217+
type:
218+
description: Type of condition in CamelCase or in foo.example.com/CamelCase.
219+
Many .condition.type values are consistent across resources
220+
like Available, but because arbitrary conditions can be useful
221+
(see .node.status.conditions), the ability to disambiguate
222+
is important.
223+
type: string
224+
required:
225+
- status
226+
- type
227+
type: object
228+
type: array
229+
contentLibraryRef:
230+
description: ContentLibraryRef is a reference to the source ContentLibrary/ClusterContentLibrary
231+
resource.
232+
properties:
233+
apiGroup:
234+
description: APIGroup is the group for the resource being referenced.
235+
If APIGroup is not specified, the specified Kind must be in
236+
the core API group. For any other third-party types, APIGroup
237+
is required.
238+
type: string
239+
kind:
240+
description: Kind is the type of resource being referenced
241+
type: string
242+
name:
243+
description: Name is the name of resource being referenced
244+
type: string
245+
required:
246+
- kind
247+
- name
248+
type: object
249+
contentVersion:
250+
description: ContentVersion describes the observed content version
251+
of this VirtualMachineImage that was last successfully synced with
252+
the vSphere content library item.
253+
type: string
254+
imageName:
255+
description: ImageName describes the display name of this VirtualMachineImage.
256+
type: string
257+
imageSupported:
258+
description: 'ImageSupported indicates whether the VirtualMachineImage
259+
is supported by VMService. A VirtualMachineImage is supported by
260+
VMService if the following conditions are true: - VirtualMachineImageV1Alpha1CompatibleCondition'
261+
type: boolean
262+
internalId:
263+
description: Deprecated
264+
type: string
265+
powerState:
266+
description: Deprecated
267+
type: string
268+
uuid:
269+
description: Deprecated
270+
type: string
271+
required:
272+
- internalId
273+
type: object
274+
type: object
275+
served: true
276+
storage: true
277+
subresources:
278+
status: {}
279+
status:
280+
acceptedNames:
281+
kind: ""
282+
plural: ""
283+
conditions: []
284+
storedVersions: []

Diff for: config/deployments/integration-tests/crds/vmoperator.vmware.com_contentlibraryproviders.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ spec:
1919
- additionalPrinterColumns:
2020
- description: UUID of the vSphere content library
2121
jsonPath: .spec.uuid
22-
name: Content Library UUID
22+
name: Content-Library-UUID
2323
type: string
2424
name: v1alpha1
2525
schema:
2626
openAPIV3Schema:
2727
description: ContentLibraryProvider is the Schema for the contentlibraryproviders
28-
API
28+
API.
2929
properties:
3030
apiVersion:
3131
description: 'APIVersion defines the versioned schema of this representation
@@ -40,7 +40,7 @@ spec:
4040
metadata:
4141
type: object
4242
spec:
43-
description: ContentLibraryProviderSpec defines the desired state of ContentLibraryProvider
43+
description: ContentLibraryProviderSpec defines the desired state of ContentLibraryProvider.
4444
properties:
4545
uuid:
4646
description: UUID describes the UUID of a vSphere content library.
@@ -50,7 +50,7 @@ spec:
5050
status:
5151
description: ContentLibraryProviderStatus defines the observed state of
5252
ContentLibraryProvider Can include fields indicating when was the last
53-
time VM images were updated from a library
53+
time VM images were updated from a library.
5454
type: object
5555
type: object
5656
served: true

Diff for: config/deployments/integration-tests/crds/vmoperator.vmware.com_contentsources.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ spec:
3636
metadata:
3737
type: object
3838
spec:
39-
description: ContentSourceSpec defines the desired state of ContentSource
39+
description: ContentSourceSpec defines the desired state of ContentSource.
4040
properties:
4141
providerRef:
4242
description: ProviderRef is a reference to a content provider object
@@ -61,7 +61,7 @@ spec:
6161
type: object
6262
type: object
6363
status:
64-
description: ContentSourceStatus defines the observed state of ContentSource
64+
description: ContentSourceStatus defines the observed state of ContentSource.
6565
type: object
6666
type: object
6767
served: true

Diff for: config/deployments/integration-tests/crds/vmoperator.vmware.com_virtualmachineclassbindings.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
schema:
2727
openAPIV3Schema:
2828
description: VirtualMachineClassBinding is a binding object responsible for
29-
defining a VirtualMachineClass and a Namespace associated with it
29+
defining a VirtualMachineClass and a Namespace associated with it.
3030
properties:
3131
apiVersion:
3232
description: 'APIVersion defines the versioned schema of this representation

0 commit comments

Comments
 (0)