Skip to content

Commit f5ee8f8

Browse files
author
Per Goncalves da Silva
committed
⚠️ Bump CatalogExtension API to v1
Signed-off-by: Per Goncalves da Silva <[email protected]>
1 parent de0a41e commit f5ee8f8

Some content is hidden

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

46 files changed

+705
-705
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"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ kubectl wait --for=condition=Unpacked=True clustercatalog/operatorhubio --timeou
6868
```bash
6969
# Apply the sample ClusterExtension. Manifest already includes
7070
# namespace and adequately privileged service account
71-
kubectl apply -f config/samples/olm_v1alpha1_clusterextension.yaml
71+
kubectl apply -f config/samples/olm_v1_clusterextension.yaml
7272
```
7373

7474
#### Upgrade/Downgrade
@@ -87,7 +87,7 @@ kubectl delete clusterextension/argocd && kubectl delete namespace argocd
8787

8888
```bash
8989
# Delete cluster-scoped resources
90-
kubectl delete --ignore-not-found=true -f config/samples/olm_v1alpha1_clusterextension.yaml
90+
kubectl delete --ignore-not-found=true -f config/samples/olm_v1_clusterextension.yaml
9191
```
9292

9393
### Advanced Usage
@@ -133,7 +133,7 @@ kubectl create clusterrolebinding "argocd-operator-installer-cluster-admin" \
133133
```bash
134134
# Apply ClusterExtension
135135
cat <<EOF
136-
apiVersion: olm.operatorframework.io/v1alpha1
136+
apiVersion: olm.operatorframework.io/v1
137137
kind: ClusterExtension
138138
metadata:
139139
name: argocd

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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
// Package v1alpha1 contains API Schema definitions for the olm v1alpha1 API group
17+
// Package v1 contains API Schema definitions for the olm v1 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: 3 additions & 3 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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import (
4343
catalogd "github.com/operator-framework/catalogd/api/core/v1alpha1"
4444
helmclient "github.com/operator-framework/helm-operator-plugins/pkg/client"
4545

46-
ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1alpha1"
46+
ocv1 "github.com/operator-framework/operator-controller/api/v1"
4747
"github.com/operator-framework/operator-controller/internal/action"
4848
"github.com/operator-framework/operator-controller/internal/applier"
4949
"github.com/operator-framework/operator-controller/internal/authentication"
@@ -119,7 +119,7 @@ func main() {
119119
systemNamespace = podNamespace()
120120
}
121121

122-
dependentRequirement, err := k8slabels.NewRequirement(labels.OwnerKindKey, selection.In, []string{ocv1alpha1.ClusterExtensionKind})
122+
dependentRequirement, err := k8slabels.NewRequirement(labels.OwnerKindKey, selection.In, []string{ocv1.ClusterExtensionKind})
123123
if err != nil {
124124
setupLog.Error(err, "unable to create dependent label selector for cache")
125125
os.Exit(1)
@@ -135,8 +135,8 @@ func main() {
135135
LeaderElectionID: "9c4404e7.operatorframework.io",
136136
Cache: crcache.Options{
137137
ByObject: map[client.Object]crcache.ByObject{
138-
&ocv1alpha1.ClusterExtension{}: {Label: k8slabels.Everything()},
139-
&catalogd.ClusterCatalog{}: {Label: k8slabels.Everything()},
138+
&ocv1.ClusterExtension{}: {Label: k8slabels.Everything()},
139+
&catalogd.ClusterCatalog{}: {Label: k8slabels.Everything()},
140140
},
141141
DefaultNamespaces: map[string]crcache.Config{
142142
systemNamespace: {LabelSelector: k8slabels.Everything()},
@@ -171,7 +171,7 @@ func main() {
171171
cfgGetter, err := helmclient.NewActionConfigGetter(mgr.GetConfig(), mgr.GetRESTMapper(),
172172
helmclient.StorageDriverMapper(action.ChunkedStorageDriverMapper(coreClient, mgr.GetAPIReader(), systemNamespace)),
173173
helmclient.ClientNamespaceMapper(func(obj client.Object) (string, error) {
174-
ext := obj.(*ocv1alpha1.ClusterExtension)
174+
ext := obj.(*ocv1.ClusterExtension)
175175
return ext.Spec.Install.Namespace, nil
176176
}),
177177
helmclient.ClientRestConfigMapper(clientRestConfigMapper),
@@ -251,7 +251,7 @@ func main() {
251251

252252
cm := contentmanager.NewManager(clientRestConfigMapper, mgr.GetConfig(), mgr.GetRESTMapper())
253253
err = clusterExtensionFinalizers.Register(controllers.ClusterExtensionCleanupContentManagerCacheFinalizer, finalizerFunc(func(ctx context.Context, obj client.Object) (crfinalizer.Result, error) {
254-
ext := obj.(*ocv1alpha1.ClusterExtension)
254+
ext := obj.(*ocv1.ClusterExtension)
255255
err := cm.Delete(ext)
256256
return crfinalizer.Result{}, err
257257
}))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ spec:
1414
singular: clusterextension
1515
scope: Cluster
1616
versions:
17-
- name: v1alpha1
17+
- name: v1
1818
schema:
1919
openAPIV3Schema:
2020
description: ClusterExtension is the Schema for the clusterextensions API

config/samples/catalogd_operatorcatalog.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: olm.operatorframework.io/v1alpha1
1+
apiVersion: olm.operatorframework.io/v1
22
kind: ClusterCatalog
33
metadata:
44
name: operatorhubio

config/samples/kustomization.yaml

Lines changed: 2 additions & 2 deletions
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
4-
- olm_v1alpha1_extension.yaml
3+
- olm_v1_clusterextension.yaml
4+
- olm_v1_extension.yaml
55
#+kubebuilder:scaffold:manifestskustomizesamples

0 commit comments

Comments
 (0)