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 8d5daf4d [operator] Enables the creation of objects that recognize kind
8d5daf4d is described below
commit 8d5daf4d48ff414f8575ce2e09aaa43972fd9f40
Author: mfordjody <[email protected]>
AuthorDate: Tue Dec 3 20:35:49 2024 +0800
[operator] Enables the creation of objects that recognize kind
---
operator/dubbod/pkg/resource/crd/crd.go | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/operator/dubbod/pkg/resource/crd/crd.go
b/operator/dubbod/pkg/resource/crd/crd.go
new file mode 100644
index 00000000..b266453e
--- /dev/null
+++ b/operator/dubbod/pkg/resource/crd/crd.go
@@ -0,0 +1,33 @@
+package crd
+
+import (
+ "encoding/json"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+type DubboKind struct {
+ metav1.TypeMeta
+ metav1.ObjectMeta `json:"metadata"`
+ Spec json.RawMessage `json:"spec"`
+ 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
+}
+
+func (dk *DubboKind) GetObjectMetadata() metav1.ObjectMeta {
+ return dk.ObjectMeta
+}
+
+func (dk *DubboKind) GetSpec() json.RawMessage {
+ return dk.Spec
+}
+
+func (dk *DubboKind) GetStatus() *json.RawMessage {
+ return dk.Status
+}