Skip to content

Commit

Permalink
Fix storage versions for api increment (#266)
Browse files Browse the repository at this point in the history
This fixes the `storage` parameters issue in the CRDs. It should be `true` for the newest version and `false` for all others.
  • Loading branch information
shyamradhakrishnan committed May 12, 2023
1 parent a658119 commit 92c873a
Show file tree
Hide file tree
Showing 20 changed files with 51 additions and 18 deletions.
2 changes: 0 additions & 2 deletions api/v1beta1/ocicluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ type OCIClusterStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
// +kubebuilder:storageversion

// OCICluster is the Schema for the ociclusters API.
type OCICluster struct {
Expand All @@ -102,7 +101,6 @@ type OCICluster struct {
}

//+kubebuilder:object:root=true
// +kubebuilder:storageversion

// OCIClusterList contains a list of OCICluster.
type OCIClusterList struct {
Expand Down
17 changes: 17 additions & 0 deletions api/v1beta2/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
Copyright (c) 2023 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta2
1 change: 1 addition & 0 deletions api/v1beta2/ocicluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ type OCIClusterStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
// +kubebuilder:storageversion

// OCICluster is the Schema for the ociclusters API.
type OCICluster struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ spec:
type: object
type: object
served: true
storage: true
storage: false
subresources:
status: {}
- name: v1beta2
Expand Down Expand Up @@ -2265,6 +2265,6 @@ spec:
type: object
type: object
served: true
storage: false
storage: true
subresources:
status: {}
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ spec:
type: object
type: object
served: true
storage: true
storage: false
subresources:
status: {}
- name: v1beta2
Expand Down Expand Up @@ -1437,6 +1437,6 @@ spec:
type: object
type: object
served: true
storage: false
storage: true
subresources:
status: {}
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ spec:
type: object
type: object
served: true
storage: true
storage: false
- name: v1beta2
schema:
openAPIV3Schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ spec:
type: object
type: object
served: true
storage: true
storage: false
subresources:
status: {}
- name: v1beta2
Expand Down Expand Up @@ -362,6 +362,6 @@ spec:
type: object
type: object
served: true
storage: false
storage: true
subresources:
status: {}
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ spec:
type: object
type: object
served: true
storage: true
storage: false
- name: v1beta2
schema:
openAPIV3Schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ spec:
type: object
type: object
served: true
storage: true
storage: false
- name: v1beta2
schema:
openAPIV3Schema:
Expand Down
3 changes: 3 additions & 0 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ resources:
- bases/infrastructure.cluster.x-k8s.io_ocimachinetemplates.yaml
- bases/infrastructure.cluster.x-k8s.io_ociclustertemplates.yaml
- bases/infrastructure.cluster.x-k8s.io_ocimanagedmachinepools.yaml
- bases/infrastructure.cluster.x-k8s.io_ocimanagedmachinepooltemplates.yaml
- bases/infrastructure.cluster.x-k8s.io_ocimanagedcontrolplanes.yaml
- bases/infrastructure.cluster.x-k8s.io_ocimanagedcontrolplanetemplates.yaml
- bases/infrastructure.cluster.x-k8s.io_ocimanagedclusters.yaml
- bases/infrastructure.cluster.x-k8s.io_ocimanagedclustertemplates.yaml
- bases/infrastructure.cluster.x-k8s.io_ociclusteridentities.yaml
#+kubebuilder:scaffold:crdkustomizeresource

Expand Down
2 changes: 0 additions & 2 deletions exp/api/v1beta1/ocimachinepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ type OCIMachinePoolStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
// +kubebuilder:storageversion

type OCIMachinePool struct {
metav1.TypeMeta `json:",inline"`
Expand All @@ -222,7 +221,6 @@ type OCIMachinePool struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:storageversion

// OCIMachinePoolList contains a list of OCIMachinePool.
type OCIMachinePoolList struct {
Expand Down
1 change: 0 additions & 1 deletion exp/api/v1beta1/ocimanagedclustertemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ type OCIManagedClusterTemplateSpec struct {

// +kubebuilder:object:root=true
// +kubebuilder:resource:path=ocimanagedclustertemplates,scope=Namespaced,categories=cluster-api
// +kubebuilder:storageversion

// OCIManagedClusterTemplate is the Schema for the ocimanagedclustertemplates API.
type OCIManagedClusterTemplate struct {
Expand Down
2 changes: 0 additions & 2 deletions exp/api/v1beta1/ocimanagedcontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ type OCIManagedControlPlaneStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
// +kubebuilder:storageversion

// OCIManagedControlPlane is the Schema for the ocimanagedcontrolplane API.
type OCIManagedControlPlane struct {
Expand All @@ -168,7 +167,6 @@ type OCIManagedControlPlane struct {
}

//+kubebuilder:object:root=true
// +kubebuilder:storageversion

// OCIManagedControlPlaneList contains a list of OCIManagedControlPlane.
type OCIManagedControlPlaneList struct {
Expand Down
1 change: 0 additions & 1 deletion exp/api/v1beta1/ocimanagedcontrolplanetemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ type OCIManagedControlPlaneTemplateSpec struct {

// +kubebuilder:object:root=true
// +kubebuilder:resource:path=ocimanagedcontrolplanetemplates,scope=Namespaced,categories=cluster-api
// +kubebuilder:storageversion

// OCIManagedControlPlaneTemplate is the Schema for the OCIManagedControlPlaneTemplates API.
type OCIManagedControlPlaneTemplate struct {
Expand Down
1 change: 0 additions & 1 deletion exp/api/v1beta1/ocimanagedmachinepooltemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ type OCIManagedMachinePoolTemplateSpec struct {

// +kubebuilder:object:root=true
// +kubebuilder:resource:path=ocimanagedmachinepooltemplates,scope=Namespaced,categories=cluster-api
// +kubebuilder:storageversion

// OCIManagedMachinePoolTemplate is the Schema for the OCIManagedMachinePoolTemplates API.
type OCIManagedMachinePoolTemplate struct {
Expand Down
17 changes: 17 additions & 0 deletions exp/api/v1beta2/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
Copyright (c) 2023 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta2
1 change: 1 addition & 0 deletions exp/api/v1beta2/ocimachinepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ type OCIMachinePoolStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
// +kubebuilder:storageversion

type OCIMachinePool struct {
metav1.TypeMeta `json:",inline"`
Expand Down
1 change: 1 addition & 0 deletions exp/api/v1beta2/ocimanagedcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ type OCIManagedCluster struct {
}

//+kubebuilder:object:root=true
// +kubebuilder:storageversion

// OCIManagedClusterList contains a list of OCIManagedCluster.
type OCIManagedClusterList struct {
Expand Down
1 change: 1 addition & 0 deletions exp/api/v1beta2/ocimanagedcontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ type OCIManagedControlPlaneStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
// +kubebuilder:storageversion

// OCIManagedControlPlane is the Schema for the ocimanagedcontrolplane API.
type OCIManagedControlPlane struct {
Expand Down
1 change: 1 addition & 0 deletions exp/api/v1beta2/ocimanagedmachinepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ type OCIManagedMachinePool struct {
}

//+kubebuilder:object:root=true
// +kubebuilder:storageversion

// OCIManagedMachinePoolList contains a list of OCIManagedMachinePool.
type OCIManagedMachinePoolList struct {
Expand Down

0 comments on commit 92c873a

Please sign in to comment.