Skip to content

Commit

Permalink
⚠️ Bump CatalogExtension 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 7, 2024
1 parent 02d2879 commit e41bc8f
Show file tree
Hide file tree
Showing 51 changed files with 82 additions and 82 deletions.
4 changes: 2 additions & 2 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ resources:
domain: operatorframework.io
group: olm
kind: Extension
path: github.com/operator-framework/operator-controller/api/v1alpha1
version: v1alpha1
path: github.com/operator-framework/operator-controller/api/v1
version: v1
version: "3"
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 @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// Package v1alpha1 contains API Schema definitions for the olm v1alpha1 API group
// Package v1 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/components/ca/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
apiVersion: kustomize.config.k8s.io/v1
kind: Component
# No namespace is specified here, otherwise, it will overwrite _all_ the other namespaces!
resources:
Expand Down
2 changes: 1 addition & 1 deletion config/components/coverage/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
apiVersion: kustomize.config.k8s.io/v1
kind: Component
namespace: olmv1-system
resources:
Expand Down
2 changes: 1 addition & 1 deletion config/components/registries-conf/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
apiVersion: kustomize.config.k8s.io/v1
kind: Component
namespace: olmv1-system
resources:
Expand Down
2 changes: 1 addition & 1 deletion config/components/tls/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
apiVersion: kustomize.config.k8s.io/v1
kind: Component
namespace: olmv1-system
resources:
Expand Down
2 changes: 1 addition & 1 deletion config/samples/catalogd_operatorcatalog.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterCatalog
metadata:
name: operatorhubio
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
10 changes: 5 additions & 5 deletions docs/api-reference/operator-controller-api-reference.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 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
Package v1 contains API Schema definitions for the olm v1alpha1 API group

### Resource Types
- [ClusterExtension](#clusterextension)
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
18 changes: 9 additions & 9 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 All @@ -125,7 +125,7 @@ When multiple catalogs provide the same package, you can set priorities to resol
In your `ClusterCatalog` resource, set the `priority` field:

```yaml
apiVersion: catalogd.operatorframework.io/v1alpha1
apiVersion: catalogd.operatorframework.io/v1
kind: ClusterCatalog
metadata:
name: high-priority-catalog
Expand Down Expand Up @@ -160,7 +160,7 @@ If the system cannot resolve to a single bundle due to ambiguity, it will genera
1. **Create or Update `ClusterCatalogs` with Appropriate Labels and Priority**

```yaml
apiVersion: catalogd.operatorframework.io/v1alpha1
apiVersion: catalogd.operatorframework.io/v1
kind: ClusterCatalog
metadata:
name: catalog-a
Expand All @@ -175,7 +175,7 @@ If the system cannot resolve to a single bundle due to ambiguity, it will genera
```

```yaml
apiVersion: catalogd.operatorframework.io/v1alpha1
apiVersion: catalogd.operatorframework.io/v1
kind: ClusterCatalog
metadata:
name: catalog-b
Expand All @@ -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
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -103,7 +103,7 @@ spec:
singular: sample
scope: Namespaced
versions:
- name: v1alpha1
- name: v1
schema:
openAPIV3Schema:
properties:
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/upgrade-support.md
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion hack/test/pre-upgrade-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ roleRef:
EOF

kubectl apply -f - << EOF
apiVersion: olm.operatorframework.io/v1alpha1
apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
name: ${TEST_CLUSTER_EXTENSION_NAME}
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
Loading

0 comments on commit e41bc8f

Please sign in to comment.