This is an automated email from the ASF dual-hosted git repository.
zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git
The following commit(s) were added to refs/heads/master by this push:
new 3cb9d87e [operator] Additional dubbo kind objects
3cb9d87e is described below
commit 3cb9d87ef41c3e6660ea6269705e77f737d0943c
Author: mfordjody <[email protected]>
AuthorDate: Wed Dec 4 16:58:21 2024 +0800
[operator] Additional dubbo kind objects
---
operator/dubbod/pkg/resource/crd/crd.go | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/operator/dubbod/pkg/resource/crd/crd.go
b/operator/dubbod/pkg/resource/crd/crd.go
index b266453e..a927e86c 100644
--- a/operator/dubbod/pkg/resource/crd/crd.go
+++ b/operator/dubbod/pkg/resource/crd/crd.go
@@ -3,6 +3,7 @@ package crd
import (
"encoding/json"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
)
type DubboKind struct {
@@ -12,12 +13,11 @@ type DubboKind struct {
Status *json.RawMessage `json:"status"`
}
-func (dk *DubboKind) DeepCopyInto(outDk *DubboKind) {
- *outDk = *dk
- outDk.TypeMeta = dk.TypeMeta
- dk.ObjectMeta.DeepCopyInto(&outDk.ObjectMeta)
- outDk.Spec = dk.Spec
- outDk.Status = dk.Status
+type DubboObject interface {
+ runtime.Object
+ GetSpec() json.RawMessage
+ GetStatus() *json.RawMessage
+ GetObjectMetadata() metav1.ObjectMeta
}
func (dk *DubboKind) GetObjectMetadata() metav1.ObjectMeta {
@@ -31,3 +31,11 @@ func (dk *DubboKind) GetSpec() json.RawMessage {
func (dk *DubboKind) GetStatus() *json.RawMessage {
return dk.Status
}
+
+func (dk *DubboKind) DeepCopyInto(outDk *DubboKind) {
+ *outDk = *dk
+ outDk.TypeMeta = dk.TypeMeta
+ dk.ObjectMeta.DeepCopyInto(&outDk.ObjectMeta)
+ outDk.Spec = dk.Spec
+ outDk.Status = dk.Status
+}