Skip to content

Commit 92c873a

Browse files
Fix storage versions for api increment (#266)
This fixes the `storage` parameters issue in the CRDs. It should be `true` for the newest version and `false` for all others.
1 parent a658119 commit 92c873a

20 files changed

+51
-18
lines changed

api/v1beta1/ocicluster_types.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ type OCIClusterStatus struct {
9090

9191
//+kubebuilder:object:root=true
9292
//+kubebuilder:subresource:status
93-
// +kubebuilder:storageversion
9493

9594
// OCICluster is the Schema for the ociclusters API.
9695
type OCICluster struct {
@@ -102,7 +101,6 @@ type OCICluster struct {
102101
}
103102

104103
//+kubebuilder:object:root=true
105-
// +kubebuilder:storageversion
106104

107105
// OCIClusterList contains a list of OCICluster.
108106
type OCIClusterList struct {

api/v1beta2/doc.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
Copyright (c) 2023 Oracle and/or its affiliates.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1beta2

api/v1beta2/ocicluster_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ type OCIClusterStatus struct {
9696

9797
//+kubebuilder:object:root=true
9898
//+kubebuilder:subresource:status
99+
// +kubebuilder:storageversion
99100

100101
// OCICluster is the Schema for the ociclusters API.
101102
type OCICluster struct {

config/crd/bases/infrastructure.cluster.x-k8s.io_ociclusters.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ spec:
10821082
type: object
10831083
type: object
10841084
served: true
1085-
storage: true
1085+
storage: false
10861086
subresources:
10871087
status: {}
10881088
- name: v1beta2
@@ -2265,6 +2265,6 @@ spec:
22652265
type: object
22662266
type: object
22672267
served: true
2268-
storage: false
2268+
storage: true
22692269
subresources:
22702270
status: {}

config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinepools.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ spec:
729729
type: object
730730
type: object
731731
served: true
732-
storage: true
732+
storage: false
733733
subresources:
734734
status: {}
735735
- name: v1beta2
@@ -1437,6 +1437,6 @@ spec:
14371437
type: object
14381438
type: object
14391439
served: true
1440-
storage: false
1440+
storage: true
14411441
subresources:
14421442
status: {}

config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedclustertemplates.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ spec:
11311131
type: object
11321132
type: object
11331133
served: true
1134-
storage: true
1134+
storage: false
11351135
- name: v1beta2
11361136
schema:
11371137
openAPIV3Schema:

config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedcontrolplanes.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ spec:
187187
type: object
188188
type: object
189189
served: true
190-
storage: true
190+
storage: false
191191
subresources:
192192
status: {}
193193
- name: v1beta2
@@ -362,6 +362,6 @@ spec:
362362
type: object
363363
type: object
364364
served: true
365-
storage: false
365+
storage: true
366366
subresources:
367367
status: {}

config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedcontrolplanetemplates.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ spec:
151151
type: object
152152
type: object
153153
served: true
154-
storage: true
154+
storage: false
155155
- name: v1beta2
156156
schema:
157157
openAPIV3Schema:

config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedmachinepooltemplates.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ spec:
234234
type: object
235235
type: object
236236
served: true
237-
storage: true
237+
storage: false
238238
- name: v1beta2
239239
schema:
240240
openAPIV3Schema:

config/crd/kustomization.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ resources:
1212
- bases/infrastructure.cluster.x-k8s.io_ocimachinetemplates.yaml
1313
- bases/infrastructure.cluster.x-k8s.io_ociclustertemplates.yaml
1414
- bases/infrastructure.cluster.x-k8s.io_ocimanagedmachinepools.yaml
15+
- bases/infrastructure.cluster.x-k8s.io_ocimanagedmachinepooltemplates.yaml
1516
- bases/infrastructure.cluster.x-k8s.io_ocimanagedcontrolplanes.yaml
17+
- bases/infrastructure.cluster.x-k8s.io_ocimanagedcontrolplanetemplates.yaml
1618
- bases/infrastructure.cluster.x-k8s.io_ocimanagedclusters.yaml
19+
- bases/infrastructure.cluster.x-k8s.io_ocimanagedclustertemplates.yaml
1720
- bases/infrastructure.cluster.x-k8s.io_ociclusteridentities.yaml
1821
#+kubebuilder:scaffold:crdkustomizeresource
1922

0 commit comments

Comments
 (0)