Skip to content

Commit cb08ad4

Browse files
perdasilvaPer Goncalves da Silvajoelanfordeverettraven
authored
⚠️ Bump ClusterExtension API to v1 (#1228)
* ⚠️ bump ClusterExtension API to v1 Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com> * CE API updates - Regenerate CRD - Fixup import in conditionsets package Signed-off-by: Joe Lanford <joe.lanford@gmail.com> * update imports to drop alpha1 suffix and other minor version changes that were missed when bumping API versions to v1. Signed-off-by: everettraven <everettraven@gmail.com> --------- Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com> Signed-off-by: Joe Lanford <joe.lanford@gmail.com> Signed-off-by: everettraven <everettraven@gmail.com> Co-authored-by: Per Goncalves da Silva <pegoncal@redhat.com> Co-authored-by: Joe Lanford <joe.lanford@gmail.com> Co-authored-by: everettraven <everettraven@gmail.com>
1 parent 046c3df commit cb08ad4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+620
-620
lines changed

PROJECT

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ resources:
1111
domain: operatorframework.io
1212
group: olm
1313
kind: ClusterExtension
14-
path: github.com/operator-framework/operator-controller/api/v1alpha1
15-
version: v1alpha1
14+
path: github.com/operator-framework/operator-controller/api/v1
15+
version: v1
1616
- api:
1717
crdVersion: v1
1818
namespaced: true
1919
controller: true
2020
domain: operatorframework.io
2121
group: olm
2222
kind: Extension
23-
path: github.com/operator-framework/operator-controller/api/v1alpha1
24-
version: v1alpha1
23+
path: github.com/operator-framework/operator-controller/api/v1
24+
version: v1
2525
version: "3"

api/v1alpha1/clusterextension_types.go renamed to api/v1/clusterextension_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package v1alpha1
17+
package v1
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

api/v1alpha1/clusterextension_types_test.go renamed to api/v1/clusterextension_types_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package v1alpha1_test
1+
package v1_test
22

33
import (
44
"fmt"

api/v1alpha1/groupversion_info.go renamed to api/v1/groupversion_info.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
// Package v1alpha1 contains API Schema definitions for the olm v1alpha1 API group
1818
// +kubebuilder:object:generate=true
1919
// +groupName=olm.operatorframework.io
20-
package v1alpha1
20+
package v1
2121

2222
import (
2323
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -26,7 +26,7 @@ import (
2626

2727
var (
2828
// GroupVersion is group version used to register these objects
29-
GroupVersion = schema.GroupVersion{Group: "olm.operatorframework.io", Version: "v1alpha1"}
29+
GroupVersion = schema.GroupVersion{Group: "olm.operatorframework.io", Version: "v1"}
3030

3131
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
3232
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

api/v1alpha1/zz_generated.deepcopy.go renamed to api/v1/zz_generated.deepcopy.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/manager/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import (
4949
catalogd "github.com/operator-framework/catalogd/api/core/v1alpha1"
5050
helmclient "github.com/operator-framework/helm-operator-plugins/pkg/client"
5151

52-
ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1alpha1"
52+
ocv1 "github.com/operator-framework/operator-controller/api/v1"
5353
"github.com/operator-framework/operator-controller/internal/action"
5454
"github.com/operator-framework/operator-controller/internal/applier"
5555
"github.com/operator-framework/operator-controller/internal/authentication"
@@ -141,8 +141,8 @@ func main() {
141141
setupLog.Info("set up manager")
142142
cacheOptions := crcache.Options{
143143
ByObject: map[client.Object]crcache.ByObject{
144-
&ocv1alpha1.ClusterExtension{}: {Label: k8slabels.Everything()},
145-
&catalogd.ClusterCatalog{}: {Label: k8slabels.Everything()},
144+
&ocv1.ClusterExtension{}: {Label: k8slabels.Everything()},
145+
&catalogd.ClusterCatalog{}: {Label: k8slabels.Everything()},
146146
},
147147
DefaultNamespaces: map[string]crcache.Config{
148148
systemNamespace: {LabelSelector: k8slabels.Everything()},
@@ -196,7 +196,7 @@ func main() {
196196
cfgGetter, err := helmclient.NewActionConfigGetter(mgr.GetConfig(), mgr.GetRESTMapper(),
197197
helmclient.StorageDriverMapper(action.ChunkedStorageDriverMapper(coreClient, mgr.GetAPIReader(), systemNamespace)),
198198
helmclient.ClientNamespaceMapper(func(obj client.Object) (string, error) {
199-
ext := obj.(*ocv1alpha1.ClusterExtension)
199+
ext := obj.(*ocv1.ClusterExtension)
200200
return ext.Spec.Namespace, nil
201201
}),
202202
helmclient.ClientRestConfigMapper(clientRestConfigMapper),
@@ -291,7 +291,7 @@ func main() {
291291

292292
cm := contentmanager.NewManager(clientRestConfigMapper, mgr.GetConfig(), mgr.GetRESTMapper())
293293
err = clusterExtensionFinalizers.Register(controllers.ClusterExtensionCleanupContentManagerCacheFinalizer, finalizers.FinalizerFunc(func(ctx context.Context, obj client.Object) (crfinalizer.Result, error) {
294-
ext := obj.(*ocv1alpha1.ClusterExtension)
294+
ext := obj.(*ocv1.ClusterExtension)
295295
err := cm.Delete(ext)
296296
return crfinalizer.Result{}, err
297297
}))

config/base/crd/bases/olm.operatorframework.io_clusterextensions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ spec:
3030
- jsonPath: .metadata.creationTimestamp
3131
name: Age
3232
type: date
33-
name: v1alpha1
33+
name: v1
3434
schema:
3535
openAPIV3Schema:
3636
description: ClusterExtension is the Schema for the clusterextensions API

config/samples/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Append samples of your project ##
22
resources:
3-
- olm_v1alpha1_clusterextension.yaml
3+
- olm_v1_clusterextension.yaml
44
- olm_v1alpha1_extension.yaml
55
#+kubebuilder:scaffold:manifestskustomizesamples

config/samples/olm_v1alpha1_clusterextension.yaml renamed to config/samples/olm_v1_clusterextension.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ subjects:
267267
name: argocd-installer
268268
namespace: argocd
269269
---
270-
apiVersion: olm.operatorframework.io/v1alpha1
270+
apiVersion: olm.operatorframework.io/v1
271271
kind: ClusterExtension
272272
metadata:
273273
name: argocd

docs/api-reference/operator-controller-api-reference.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# API Reference
22

33
## Packages
4-
- [olm.operatorframework.io/v1alpha1](#olmoperatorframeworkiov1alpha1)
4+
- [olm.operatorframework.io/v1](#olmoperatorframeworkiov1)
55

66

7-
## olm.operatorframework.io/v1alpha1
7+
## olm.operatorframework.io/v1
88

99
Package v1alpha1 contains API Schema definitions for the olm v1alpha1 API group
1010

@@ -97,7 +97,7 @@ _Appears in:_
9797

9898
| Field | Description | Default | Validation |
9999
| --- | --- | --- | --- |
100-
| `apiVersion` _string_ | `olm.operatorframework.io/v1alpha1` | | |
100+
| `apiVersion` _string_ | `olm.operatorframework.io/v1` | | |
101101
| `kind` _string_ | `ClusterExtension` | | |
102102
| `kind` _string_ | Kind is a string value representing the REST resource this object represents.<br />Servers may infer this from the endpoint the client submits requests to.<br />Cannot be updated.<br />In CamelCase.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | | |
103103
| `apiVersion` _string_ | APIVersion defines the versioned schema of this representation of an object.<br />Servers should convert recognized schemas to the latest internal value, and<br />may reject unrecognized values.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | | |
@@ -151,7 +151,7 @@ ClusterExtensionList contains a list of ClusterExtension
151151

152152
| Field | Description | Default | Validation |
153153
| --- | --- | --- | --- |
154-
| `apiVersion` _string_ | `olm.operatorframework.io/v1alpha1` | | |
154+
| `apiVersion` _string_ | `olm.operatorframework.io/v1` | | |
155155
| `kind` _string_ | `ClusterExtensionList` | | |
156156
| `kind` _string_ | Kind is a string value representing the REST resource this object represents.<br />Servers may infer this from the endpoint the client submits requests to.<br />Cannot be updated.<br />In CamelCase.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | | |
157157
| `apiVersion` _string_ | APIVersion defines the versioned schema of this representation of an object.<br />Servers should convert recognized schemas to the latest internal value, and<br />may reject unrecognized values.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | | |

0 commit comments

Comments
 (0)