Skip to content

Commit cfd7b88

Browse files
authored
Merge pull request #52 from njhale/op-v1
feat(operators): move type to v1 from v2alpha1
2 parents 1146258 + 349130a commit cfd7b88

11 files changed

+195
-488
lines changed

crds/operators.coreos.com_operators.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
singular: operator
1717
scope: Cluster
1818
versions:
19-
- name: v2alpha1
19+
- name: v1
2020
schema:
2121
openAPIV3Schema:
2222
description: Operator represents a cluster operator.

crds/zz_defs.go

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

pkg/operators/install/install.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,16 @@ import (
55
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
66

77
"github.com/operator-framework/api/pkg/operators"
8-
v1 "github.com/operator-framework/api/pkg/operators/v1"
9-
"github.com/operator-framework/api/pkg/operators/v1alpha1"
10-
"github.com/operator-framework/api/pkg/operators/v1alpha2"
11-
"github.com/operator-framework/api/pkg/operators/v2alpha1"
8+
operatorsv1 "github.com/operator-framework/api/pkg/operators/v1"
9+
operatorsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1"
10+
operatorsv1alpha2 "github.com/operator-framework/api/pkg/operators/v1alpha2"
1211
)
1312

1413
// Install registers the API group and adds all of its types to the given scheme.
1514
func Install(scheme *runtime.Scheme) {
1615
utilruntime.Must(operators.AddToScheme(scheme))
17-
utilruntime.Must(v1alpha1.AddToScheme(scheme))
18-
utilruntime.Must(v1alpha2.AddToScheme(scheme))
19-
utilruntime.Must(v1.AddToScheme(scheme))
20-
utilruntime.Must(v2alpha1.AddToScheme(scheme))
21-
utilruntime.Must(scheme.SetVersionPriority(v2alpha1.GroupVersion, v1.SchemeGroupVersion, v1alpha2.GroupVersion, v1alpha1.SchemeGroupVersion))
16+
utilruntime.Must(operatorsv1alpha1.AddToScheme(scheme))
17+
utilruntime.Must(operatorsv1alpha2.AddToScheme(scheme))
18+
utilruntime.Must(operatorsv1.AddToScheme(scheme))
19+
utilruntime.Must(scheme.SetVersionPriority(operatorsv1.GroupVersion, operatorsv1alpha2.GroupVersion, operatorsv1alpha1.SchemeGroupVersion))
2220
}

pkg/operators/v1/doc.go

Lines changed: 0 additions & 6 deletions
This file was deleted.

pkg/operators/v2alpha1/groupversion_info.go renamed to pkg/operators/v1/groupversion_info.go

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
1-
/*
2-
Licensed under the Apache License, Version 2.0 (the "License");
3-
you may not use this file except in compliance with the License.
4-
You may obtain a copy of the License at
5-
6-
http://www.apache.org/licenses/LICENSE-2.0
7-
8-
Unless required by applicable law or agreed to in writing, software
9-
distributed under the License is distributed on an "AS IS" BASIS,
10-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11-
See the License for the specific language governing permissions and
12-
limitations under the License.
13-
*/
14-
15-
// Package v2alpha1 contains API Schema definitions for the discovery v2alpha1 API group.
1+
// Package v1 contains API Schema definitions for the operator v1 API group.
162
// +kubebuilder:object:generate=true
173
// +groupName=operators.coreos.com
18-
package v2alpha1
4+
package v1
195

206
import (
217
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -24,7 +10,7 @@ import (
2410

2511
var (
2612
// GroupVersion is group version used to register these objects.
27-
GroupVersion = schema.GroupVersion{Group: "operators.coreos.com", Version: "v2alpha1"}
13+
GroupVersion = schema.GroupVersion{Group: "operators.coreos.com", Version: "v1"}
2814

2915
// SchemeGroupVersion is required for compatibility with client generation.
3016
SchemeGroupVersion = GroupVersion

pkg/operators/v2alpha1/operator_types.go renamed to pkg/operators/v1/operator_types.go

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
1-
/*
2-
3-
Licensed under the Apache License, Version 2.0 (the "License");
4-
you may not use this file except in compliance with the License.
5-
You may obtain a copy of the License at
6-
7-
http://www.apache.org/licenses/LICENSE-2.0
8-
9-
Unless required by applicable law or agreed to in writing, software
10-
distributed under the License is distributed on an "AS IS" BASIS,
11-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
See the License for the specific language governing permissions and
13-
limitations under the License.
14-
*/
15-
16-
package v2alpha1
1+
package v1
172

183
import (
194
corev1 "k8s.io/api/core/v1"

pkg/operators/v1/operatorgroup_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,7 @@ func (o *OperatorGroup) NamespaceLabelSelector() (*metav1.LabelSelector, error)
144144
func IsOperatorGroupLabel(label string) bool {
145145
return strings.HasPrefix(label, OperatorGroupLabelPrefix)
146146
}
147+
148+
func init() {
149+
SchemeBuilder.Register(&OperatorGroup{}, &OperatorGroupList{})
150+
}

pkg/operators/v1/register.go

Lines changed: 0 additions & 49 deletions
This file was deleted.

pkg/operators/v1/zz_generated.conversion.go

Lines changed: 0 additions & 185 deletions
This file was deleted.

0 commit comments

Comments
 (0)