Skip to content

Commit

Permalink
✨ vm-operator: migrate to v1alpha2 (kubernetes-sigs#3029)
Browse files Browse the repository at this point in the history
* vm-operator: migrate to v1alpha2

* config: bump vm-operator crds

* review fixes

* review fixes
  • Loading branch information
chrischdi authored Jun 28, 2024
1 parent 2572b21 commit 41f52b8
Show file tree
Hide file tree
Showing 38 changed files with 5,209 additions and 841 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ linters-settings:
- pkg: sigs.k8s.io/cluster-api-provider-vsphere/apis/vmware/v1beta1
alias: vmwarev1
# VMware Operator
- pkg: "github.com/vmware-tanzu/vm-operator/api/v1alpha1"
- pkg: "github.com/vmware-tanzu/vm-operator/api/v1alpha2"
alias: vmoprv1
# CABPK
- pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1
Expand Down
15 changes: 15 additions & 0 deletions config/deployments/integration-tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Integration tests

The [crds](./crds/) are copied from the vm-operators version which is consumed as go module.

These should get updated when bumping the vm-operator dependency.

To sync the new CRD's use the following script **and** update `kustomization.yaml` accordingly.

```sh
make clean-vm-operator checkout-vm-operator
rm -r config/deployments/integration-tests/crds
cp -r test/infrastructure/vm-operator/vm-operator.tmp/config/crd/bases config/deployments/integration-tests/crds

make clean-vm-operator
```

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
controller-gen.kubebuilder.io/version: v0.14.0
name: contentlibraryproviders.vmoperator.vmware.com
spec:
group: vmoperator.vmware.com
Expand All @@ -26,29 +26,35 @@ spec:
API.
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'
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'
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: ContentLibraryProviderSpec defines the desired state of ContentLibraryProvider.
properties:
uuid:
description: UUID describes the UUID of a vSphere content library.
It is the unique identifier for a vSphere content library.
description: |-
UUID describes the UUID of a vSphere content library. It is the unique identifier for a
vSphere content library.
type: string
type: object
status:
description: ContentLibraryProviderStatus defines the observed state of
ContentLibraryProvider Can include fields indicating when was the last
time VM images were updated from a library.
description: |-
ContentLibraryProviderStatus defines the observed state of ContentLibraryProvider
Can include fields indicating when was the last time VM images were updated from a library.
type: object
type: object
served: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
controller-gen.kubebuilder.io/version: v0.14.0
name: contentsourcebindings.vmoperator.vmware.com
spec:
group: vmoperator.vmware.com
Expand All @@ -21,9 +21,11 @@ spec:
to Namespace mapping.
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'
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
contentSourceRef:
description: ContentSourceRef is a reference to a ContentSource object.
Expand All @@ -41,9 +43,12 @@ spec:
- name
type: object
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'
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
controller-gen.kubebuilder.io/version: v0.14.0
name: contentsources.vmoperator.vmware.com
spec:
group: vmoperator.vmware.com
Expand All @@ -17,19 +17,24 @@ spec:
- name: v1alpha1
schema:
openAPIV3Schema:
description: ContentSource is the Schema for the contentsources API. A ContentSource
represents the desired specification and the observed status of a ContentSource
instance.
description: |-
ContentSource is the Schema for the contentsources API.
A ContentSource represents the desired specification and the observed status of a ContentSource instance.
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'
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'
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
controller-gen.kubebuilder.io/version: v0.14.0
name: virtualmachineclassbindings.vmoperator.vmware.com
spec:
group: vmoperator.vmware.com
Expand All @@ -23,13 +23,16 @@ spec:
name: v1alpha1
schema:
openAPIV3Schema:
description: VirtualMachineClassBinding is a binding object responsible for
description: |-
VirtualMachineClassBinding is a binding object responsible for
defining a VirtualMachineClass and a Namespace associated with it.
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'
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
classRef:
description: ClassReference is a reference to a VirtualMachineClass object
Expand All @@ -47,9 +50,12 @@ spec:
- name
type: object
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'
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
Expand Down
Loading

0 comments on commit 41f52b8

Please sign in to comment.