Skip to content

Commit

Permalink
⚠️ bump ClusterExtension API to v1
Browse files Browse the repository at this point in the history
Signed-off-by: Per Goncalves da Silva <[email protected]>
  • Loading branch information
Per Goncalves da Silva committed Oct 8, 2024
1 parent 5097435 commit 88f4d40
Show file tree
Hide file tree
Showing 42 changed files with 68 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1
package v1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1alpha1_test
package v1_test

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
// Package v1alpha1 contains API Schema definitions for the olm v1alpha1 API group
// +kubebuilder:object:generate=true
// +groupName=olm.operatorframework.io
package v1alpha1
package v1

import (
"k8s.io/apimachinery/pkg/runtime/schema"
Expand All @@ -26,7 +26,7 @@ import (

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

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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import (
catalogd "github.com/operator-framework/catalogd/api/core/v1alpha1"
helmclient "github.com/operator-framework/helm-operator-plugins/pkg/client"

ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1alpha1"
ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1"
"github.com/operator-framework/operator-controller/internal/action"
"github.com/operator-framework/operator-controller/internal/applier"
"github.com/operator-framework/operator-controller/internal/authentication"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
singular: clusterextension
scope: Cluster
versions:
- name: v1alpha1
- name: v1
schema:
openAPIV3Schema:
description: ClusterExtension is the Schema for the clusterextensions API
Expand Down
2 changes: 1 addition & 1 deletion config/samples/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Append samples of your project ##
resources:
- olm_v1alpha1_clusterextension.yaml
- olm_v1_clusterextension.yaml
- olm_v1alpha1_extension.yaml
#+kubebuilder:scaffold:manifestskustomizesamples
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ subjects:
name: argocd-installer
namespace: argocd
---
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
name: argocd
Expand Down
8 changes: 4 additions & 4 deletions docs/api-reference/operator-controller-api-reference.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# API Reference

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


## olm.operatorframework.io/v1alpha1
## olm.operatorframework.io/v1

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

Expand Down Expand Up @@ -97,7 +97,7 @@ _Appears in:_

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `apiVersion` _string_ | `olm.operatorframework.io/v1alpha1` | | |
| `apiVersion` _string_ | `olm.operatorframework.io/v1` | | |
| `kind` _string_ | `ClusterExtension` | | |
| `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 | | |
| `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 | | |
Expand Down Expand Up @@ -153,7 +153,7 @@ ClusterExtensionList contains a list of ClusterExtension

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `apiVersion` _string_ | `olm.operatorframework.io/v1alpha1` | | |
| `apiVersion` _string_ | `olm.operatorframework.io/v1` | | |
| `kind` _string_ | `ClusterExtensionList` | | |
| `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 | | |
| `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 | | |
Expand Down
12 changes: 6 additions & 6 deletions docs/concepts/controlling-catalog-selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To select a specific catalog by name, you can use the `matchLabels` field in you
#### Example

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

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

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

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

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

```yaml
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
name: install-my-operator
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/crd-upgrade-safety.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The CRD Upgrade Safety preflight check can be entirely disabled by adding the
`preflight.crdUpgradeSafety.disabled` field with a value of "true" to the ClusterExtension of the CRD.

```yaml
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
name: clusterextension-sample
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/upgrade-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ If `1.0.0` is installed, OLM v1 behavior differs in the following ways:
You can change the default behavior of the upgrade constraints by setting the `upgradeConstraintPolicy` parameter in your cluster extension's custom resource (CR).

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

```yaml
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
name: extension-sample
Expand Down
4 changes: 2 additions & 2 deletions docs/howto/how-to-channel-based-upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A "channel" is a package author defined stream of updates for an extension. A se
Example:

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

```yaml
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
name: argocd
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/how-to-pin-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ To disable automatic updates, and pin the version of an extension, set `version`
Example:

```yaml
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
name: argocd
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/how-to-version-range-upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Set the version for the desired package in the Catalog source to a comparison st
Example:

```yaml
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
name: argocd
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/how-to-z-stream-upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ To restrict automatic updates to only z-stream patches and avoid breaking change
Example:

```yaml
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
name: argocd
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/downgrade-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Add the `crdUpgradeSafety` field and set its `policy` to `Disabled` in the `Clus
**Example:**

```yaml
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
name: example-extension
Expand Down Expand Up @@ -71,7 +71,7 @@ Set the `upgradeConstraintPolicy` to `SelfCertified` in the `ClusterExtension` r
**Example:**

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

```yaml
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
name: <extension_name>
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/install-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ For information on determining the ServiceAccount's permission, please see [Deri
1. Create a CR for the Kubernetes extension you want to install:

``` yaml title="Example CR"
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
name: <extension_name>
Expand Down Expand Up @@ -107,7 +107,7 @@ For information on determining the ServiceAccount's permission, please see [Deri
Namespace:
Labels: <none>
Annotations: <none>
API Version: olm.operatorframework.io/v1alpha1
API Version: olm.operatorframework.io/v1
Kind: ClusterExtension
Metadata:
Creation Timestamp: 2024-10-03T16:02:40Z
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/upgrade-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ For more detailed information see [Upgrade Support](../concepts/upgrade-support.
Suppose we have successfully created and installed v0.5.0 of the ArgoCD operator with the following `ClusterExtension`:

``` yaml title="Example CR"
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
name: argocd
Expand All @@ -43,7 +43,7 @@ spec:
``` terminal
kubectl apply -f - <<EOF
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
name: argocd
Expand Down Expand Up @@ -92,12 +92,12 @@ spec:

??? success
``` text title="Example output"
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"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"}}}
{"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"}}}
creationTimestamp: "2024-10-03T16:02:40Z"
finalizers:
- olm.operatorframework.io/cleanup-unpack-cache
Expand Down
2 changes: 1 addition & 1 deletion hack/tools/catalogs/lib/manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ EOF
generate_cluster_extension() {
cat <<EOF
---
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
name: \${EXTENSION_NAME}
Expand Down
2 changes: 1 addition & 1 deletion internal/action/restconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/client"

ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1alpha1"
ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1"
"github.com/operator-framework/operator-controller/internal/authentication"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/applier/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

helmclient "github.com/operator-framework/helm-operator-plugins/pkg/client"

ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1alpha1"
ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1"
"github.com/operator-framework/operator-controller/internal/rukpak/convert"
"github.com/operator-framework/operator-controller/internal/rukpak/preflights/crdupgradesafety"
"github.com/operator-framework/operator-controller/internal/rukpak/util"
Expand Down
2 changes: 1 addition & 1 deletion internal/bundleutil/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/operator-framework/operator-registry/alpha/declcfg"
"github.com/operator-framework/operator-registry/alpha/property"

ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1alpha1"
ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1"
)

func GetVersion(b declcfg.Bundle) (*bsemver.Version, error) {
Expand Down
2 changes: 1 addition & 1 deletion internal/catalogmetadata/filter/successors.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/operator-framework/operator-registry/alpha/declcfg"

ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1alpha1"
ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1"
"github.com/operator-framework/operator-controller/internal/features"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/catalogmetadata/filter/successors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/operator-framework/operator-registry/alpha/declcfg"
"github.com/operator-framework/operator-registry/alpha/property"

ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1alpha1"
ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1"
"github.com/operator-framework/operator-controller/internal/bundleutil"
"github.com/operator-framework/operator-controller/internal/catalogmetadata/compare"
"github.com/operator-framework/operator-controller/internal/features"
Expand Down
2 changes: 1 addition & 1 deletion internal/contentmanager/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"sigs.k8s.io/controller-runtime/pkg/source"

ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1alpha1"
ocv1alpha1 "github.com/operator-framework/operator-controller/api/v1"
)

type mockWatcher struct {
Expand Down
Loading

0 comments on commit 88f4d40

Please sign in to comment.