Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade CRD to v1beta1 #551

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ endif
# Image URL to use all building/pushing image targets
IMG ?= layer5/meshery-operator:stable-latest

# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true"
CRD_OPTIONS ?= "crd"


# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
Expand Down
27 changes: 16 additions & 11 deletions PROJECT
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
domain: layer5.io
layout: go.kubebuilder.io/v2
layout: go.kubebuilder.io/v3
projectName: meshery-operator
repo: github.com/layer5io/meshery-operator
resources:
-
# TODO(user): Uncomment the below line if this resource implements a controller, else delete it.
# controller: true
domain: layer5.io
group: meshery
kind: MeshSync
# TODO(user): Update the package path for your API if the below value is incorrect.
path: github.com/layer5io/meshery-operator/api/v1alpha1
version: v1alpha1
- # TODO(user): Uncomment the below line if this resource implements a controller, else delete it.
# controller: true
domain: layer5.io
group: meshery
kind: MeshSync
# TODO(user): Update the package path for your API if the below value is incorrect.
path: github.com/layer5io/meshery-operator/api/v1beta1
version: v1beta1
- domain: layer5.io
group: meshery
kind: Broker
# TODO(user): Update the package path for your API if the below value is incorrect.
path: github.com/layer5io/meshery-operator/api/v1beta1
version: v1beta1
version: "3"
plugins:
go.sdk.operatorframework.io/v2-alpha: {}
go.sdk.operatorframework.io/v3-alpha: {}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1
package v1beta1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
package v1beta1

// Import go packages

Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/common.go → api/v1beta1/common.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1alpha1
package v1beta1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
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 meshery v1alpha1 API group
// package v1beta1 contains API Schema definitions for the meshery v1beta1 API group
// +kubebuilder:object:generate=true
// +groupName=meshery.layer5.io
package v1alpha1
package v1beta1

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: "meshery.layer5.io", Version: "v1alpha1"}
GroupVersion = schema.GroupVersion{Group: "meshery.layer5.io", Version: "v1beta1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
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 v1beta1

import (
corev1 "k8s.io/api/core/v1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1alpha1
package v1beta1

import (
"context"
Expand Down Expand Up @@ -29,7 +29,7 @@ var _ = Describe("The test case for the meshsync CRDs", func() {
FileManager string = "testcase-meshsync"

Kind string = "MeshSync"
APIVersion string = "meshery.layer5.io/v1alpha1"
APIVersion string = "meshery.layer5.io/v1beta1"
)

meshSync := &MeshSync{
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/suite_test.go → api/v1beta1/suite_test.go
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 v1beta1

import (
"testing"
Expand Down

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

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: operators.coreos.com/v1alpha1
apiVersion: operators.coreos.com/v1beta1
kind: ClusterServiceVersion
metadata:
annotations:
alm-examples: |-
[
{
"apiVersion": "meshery.layer5.io/v1alpha1",
"apiVersion": "meshery.layer5.io/v1beta1",
"kind": "Broker",
"metadata": {
"annotations": {
Expand All @@ -24,7 +24,7 @@ metadata:
}
},
{
"apiVersion": "meshery.layer5.io/v1alpha1",
"apiVersion": "meshery.layer5.io/v1beta1",
"kind": "MeshSync",
"metadata": {
"annotations": {
Expand Down Expand Up @@ -66,12 +66,12 @@ spec:
owned:
- kind: Broker
name: brokers.meshery.layer5.io
version: v1alpha1
version: v1beta1
- description: MeshSync is the Schema for the meshsyncs API
displayName: Mesh Sync
kind: MeshSync
name: meshsyncs.meshery.layer5.io
version: v1alpha1
version: v1beta1
description: Meshery Operator is the multi-service mesh operator and implementation
of MeshSync.
displayName: meshery-operator
Expand Down
130 changes: 66 additions & 64 deletions bundle/0.0.1/manifests/meshery.layer5.io_brokers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,74 +14,76 @@ spec:
singular: broker
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: Broker is the Schema for the brokers API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: BrokerSpec defines the desired state of Broker
properties:
size:
format: int32
type: integer
type: object
status:
description: BrokerStatus defines the observed state of Broker
properties:
conditions:
items:
- name: v1beta1
schema:
openAPIV3Schema:
description: Broker is the Schema for the brokers API
properties:
apiVersion:
description:
"APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"
type: string
kind:
description:
"Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
type: string
metadata:
type: object
spec:
description: BrokerSpec defines the desired state of Broker
properties:
size:
format: int32
type: integer
type: object
status:
description: BrokerStatus defines the observed state of Broker
properties:
conditions:
items:
properties:
lastProbeTime:
format: date-time
type: string
lastTransitionTime:
format: date-time
type: string
message:
type: string
observedGeneration:
format: int64
type: integer
reason:
type: string
status:
type: string
type:
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
endpoint:
properties:
lastProbeTime:
format: date-time
external:
type: string
lastTransitionTime:
format: date-time
internal:
type: string
message:
type: string
observedGeneration:
format: int64
type: integer
reason:
type: string
status:
type: string
type:
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
endpoint:
properties:
external:
type: string
internal:
type: string
type: object
type: object
type: object
served: true
storage: true
subresources:
status: {}
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
Expand Down
Loading
Loading