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 <[email protected]> * CE API updates - Regenerate CRD - Fixup import in conditionsets package Signed-off-by: Joe Lanford <[email protected]> * update imports to drop alpha1 suffix and other minor version changes that were missed when bumping API versions to v1. Signed-off-by: everettraven <[email protected]> --------- Signed-off-by: Per Goncalves da Silva <[email protected]> Signed-off-by: Joe Lanford <[email protected]> Signed-off-by: everettraven <[email protected]> Co-authored-by: Per Goncalves da Silva <[email protected]> Co-authored-by: Joe Lanford <[email protected]> Co-authored-by: everettraven <[email protected]>
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

+4-4
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 api/v1/clusterextension_types.go

+1-1
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 api/v1/clusterextension_types_test.go

+1-1
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 api/v1/groupversion_info.go

+2-2
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 api/v1/zz_generated.deepcopy.go

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/manager/main.go

+5-5
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

+1-1
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

+1-1
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 config/samples/olm_v1_clusterextension.yaml

+1-1
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

+4-4
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 | | |

docs/concepts/controlling-catalog-selection.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To select a specific catalog by name, you can use the `matchLabels` field in you
1818
#### Example
1919

2020
```yaml
21-
apiVersion: olm.operatorframework.io/v1alpha1
21+
apiVersion: olm.operatorframework.io/v1
2222
kind: ClusterExtension
2323
metadata:
2424
name: my-extension
@@ -39,7 +39,7 @@ If you have catalogs labeled with specific metadata, you can select them using `
3939
#### Using `matchLabels`
4040

4141
```yaml
42-
apiVersion: olm.operatorframework.io/v1alpha1
42+
apiVersion: olm.operatorframework.io/v1
4343
kind: ClusterExtension
4444
metadata:
4545
name: my-extension
@@ -56,7 +56,7 @@ This selects catalogs labeled with `example.com/support: "true"`.
5656
#### Using `matchExpressions`
5757

5858
```yaml
59-
apiVersion: olm.operatorframework.io/v1alpha1
59+
apiVersion: olm.operatorframework.io/v1
6060
kind: ClusterExtension
6161
metadata:
6262
name: my-extension
@@ -81,7 +81,7 @@ You can exclude catalogs by using the `NotIn` or `DoesNotExist` operators in `ma
8181
#### Example: Exclude Specific Catalogs
8282

8383
```yaml
84-
apiVersion: olm.operatorframework.io/v1alpha1
84+
apiVersion: olm.operatorframework.io/v1
8585
kind: ClusterExtension
8686
metadata:
8787
name: my-extension
@@ -101,7 +101,7 @@ This excludes the catalog named `unwanted-catalog` from consideration.
101101
#### Example: Exclude Catalogs with a Specific Label
102102

103103
```yaml
104-
apiVersion: olm.operatorframework.io/v1alpha1
104+
apiVersion: olm.operatorframework.io/v1
105105
kind: ClusterExtension
106106
metadata:
107107
name: my-extension
@@ -194,7 +194,7 @@ If the system cannot resolve to a single bundle due to ambiguity, it will genera
194194
2. **Create a `ClusterExtension` with Catalog Selection**
195195

196196
```yaml
197-
apiVersion: olm.operatorframework.io/v1alpha1
197+
apiVersion: olm.operatorframework.io/v1
198198
kind: ClusterExtension
199199
metadata:
200200
name: install-my-operator

docs/concepts/crd-upgrade-safety.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The CRD Upgrade Safety preflight check can be entirely disabled by adding the
5656
`preflight.crdUpgradeSafety.disabled` field with a value of "true" to the ClusterExtension of the CRD.
5757

5858
```yaml
59-
apiVersion: olm.operatorframework.io/v1alpha1
59+
apiVersion: olm.operatorframework.io/v1
6060
kind: ClusterExtension
6161
metadata:
6262
name: clusterextension-sample

docs/concepts/upgrade-support.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ If `1.0.0` is installed, OLM v1 behavior differs in the following ways:
3838
You can change the default behavior of the upgrade constraints by setting the `upgradeConstraintPolicy` parameter in your cluster extension's custom resource (CR).
3939

4040
``` yaml hl_lines="10"
41-
apiVersion: olm.operatorframework.io/v1alpha1
41+
apiVersion: olm.operatorframework.io/v1
4242
kind: ClusterExtension
4343
metadata:
4444
name: <extension_name>
@@ -86,7 +86,7 @@ If you set the field to `SelfCertified`, no upgrade constraints are set on the p
8686
Example `ClusterExtension` with `.spec.upgradeConstraintPolicy` field set to `SelfCertified`:
8787

8888
```yaml
89-
apiVersion: olm.operatorframework.io/v1alpha1
89+
apiVersion: olm.operatorframework.io/v1
9090
kind: ClusterExtension
9191
metadata:
9292
name: extension-sample

docs/howto/how-to-channel-based-upgrades.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A "channel" is a package author defined stream of updates for an extension. A se
55
Example:
66

77
```yaml
8-
apiVersion: olm.operatorframework.io/v1alpha1
8+
apiVersion: olm.operatorframework.io/v1
99
kind: ClusterExtension
1010
metadata:
1111
name: argocd
@@ -27,7 +27,7 @@ Note that the `version` field also accepts a version range to further restrict t
2727
Example:
2828

2929
```yaml
30-
apiVersion: olm.operatorframework.io/v1alpha1
30+
apiVersion: olm.operatorframework.io/v1
3131
kind: ClusterExtension
3232
metadata:
3333
name: argocd

docs/howto/how-to-pin-version.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ To disable automatic updates, and pin the version of an extension, set `version`
55
Example:
66

77
```yaml
8-
apiVersion: olm.operatorframework.io/v1alpha1
8+
apiVersion: olm.operatorframework.io/v1
99
kind: ClusterExtension
1010
metadata:
1111
name: argocd

docs/howto/how-to-version-range-upgrades.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Set the version for the desired package in the Catalog source to a comparison st
55
Example:
66

77
```yaml
8-
apiVersion: olm.operatorframework.io/v1alpha1
8+
apiVersion: olm.operatorframework.io/v1
99
kind: ClusterExtension
1010
metadata:
1111
name: argocd

docs/howto/how-to-z-stream-upgrades.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ To restrict automatic updates to only z-stream patches and avoid breaking change
55
Example:
66

77
```yaml
8-
apiVersion: olm.operatorframework.io/v1alpha1
8+
apiVersion: olm.operatorframework.io/v1
99
kind: ClusterExtension
1010
metadata:
1111
name: argocd

docs/tutorials/downgrade-extension.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Add the `crdUpgradeSafety` field and set its `policy` to `Disabled` in the `Clus
3131
**Example:**
3232

3333
```yaml
34-
apiVersion: olm.operatorframework.io/v1alpha1
34+
apiVersion: olm.operatorframework.io/v1
3535
kind: ClusterExtension
3636
metadata:
3737
name: example-extension
@@ -71,7 +71,7 @@ Set the `upgradeConstraintPolicy` to `SelfCertified` in the `ClusterExtension` r
7171
**Example:**
7272

7373
```yaml
74-
apiVersion: olm.operatorframework.io/v1alpha1
74+
apiVersion: olm.operatorframework.io/v1
7575
kind: ClusterExtension
7676
metadata:
7777
name: example-extension
@@ -113,7 +113,7 @@ Once the CRD safety checks are disabled and upgrade constraints are set, you can
113113
Within the YAML editor, update the `spec` section as follows:
114114

115115
```yaml
116-
apiVersion: olm.operatorframework.io/v1alpha1
116+
apiVersion: olm.operatorframework.io/v1
117117
kind: ClusterExtension
118118
metadata:
119119
name: <extension_name>

docs/tutorials/install-extension.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ For information on determining the ServiceAccount's permission, please see [Deri
3434
1. Create a CR for the Kubernetes extension you want to install:
3535

3636
``` yaml title="Example CR"
37-
apiVersion: olm.operatorframework.io/v1alpha1
37+
apiVersion: olm.operatorframework.io/v1
3838
kind: ClusterExtension
3939
metadata:
4040
name: <extension_name>
@@ -107,7 +107,7 @@ For information on determining the ServiceAccount's permission, please see [Deri
107107
Namespace:
108108
Labels: <none>
109109
Annotations: <none>
110-
API Version: olm.operatorframework.io/v1alpha1
110+
API Version: olm.operatorframework.io/v1
111111
Kind: ClusterExtension
112112
Metadata:
113113
Creation Timestamp: 2024-10-03T16:02:40Z

docs/tutorials/upgrade-extension.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ For more detailed information see [Upgrade Support](../concepts/upgrade-support.
2323
Suppose we have successfully created and installed v0.5.0 of the ArgoCD operator with the following `ClusterExtension`:
2424

2525
``` yaml title="Example CR"
26-
apiVersion: olm.operatorframework.io/v1alpha1
26+
apiVersion: olm.operatorframework.io/v1
2727
kind: ClusterExtension
2828
metadata:
2929
name: argocd
@@ -43,7 +43,7 @@ spec:
4343
4444
``` terminal
4545
kubectl apply -f - <<EOF
46-
apiVersion: olm.operatorframework.io/v1alpha1
46+
apiVersion: olm.operatorframework.io/v1
4747
kind: ClusterExtension
4848
metadata:
4949
name: argocd
@@ -92,12 +92,12 @@ spec:
9292

9393
??? success
9494
``` text title="Example output"
95-
apiVersion: olm.operatorframework.io/v1alpha1
95+
apiVersion: olm.operatorframework.io/v1
9696
kind: ClusterExtension
9797
metadata:
9898
annotations:
9999
kubectl.kubernetes.io/last-applied-configuration: |
100-
{"apiVersion":"olm.operatorframework.io/v1alpha1","kind":"ClusterExtension","metadata":{"annotations":{},"name":"argocd"},"spec":{"install":{"namespace":"argocd","serviceAccount":{"name":"argocd-installer"}},"source":{"catalog":{"packageName":"argocd-operator","version":"0.6.0"},"sourceType":"Catalog"}}}
100+
{"apiVersion":"olm.operatorframework.io/v1","kind":"ClusterExtension","metadata":{"annotations":{},"name":"argocd"},"spec":{"install":{"namespace":"argocd","serviceAccount":{"name":"argocd-installer"}},"source":{"catalog":{"packageName":"argocd-operator","version":"0.6.0"},"sourceType":"Catalog"}}}
101101
creationTimestamp: "2024-10-03T16:02:40Z"
102102
finalizers:
103103
- olm.operatorframework.io/cleanup-unpack-cache

hack/tools/catalogs/lib/manifests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ EOF
8585
generate_cluster_extension() {
8686
cat <<EOF
8787
---
88-
apiVersion: olm.operatorframework.io/v1alpha1
88+
apiVersion: olm.operatorframework.io/v1
8989
kind: ClusterExtension
9090
metadata:
9191
name: \${EXTENSION_NAME}

0 commit comments

Comments
 (0)