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 400bf367 [operator] Adding scheme methods
400bf367 is described below

commit 400bf3676c2b5d154394f86d4abbea1a84871567
Author: mfordjody <[email protected]>
AuthorDate: Tue Dec 17 09:21:27 2024 +0800

    [operator] Adding scheme methods
---
 {pkg => operator/pkg}/config/protogvk.go     |  0
 {pkg => operator/pkg}/config/protomarshal.go |  0
 operator/pkg/install/installer.go            |  4 +++
 {pkg => operator/pkg}/schema/schema.go       |  0
 pkg/schema/schema.go                         | 43 ++++++++++++++++++++++++++--
 5 files changed, 44 insertions(+), 3 deletions(-)

diff --git a/pkg/config/protogvk.go b/operator/pkg/config/protogvk.go
similarity index 100%
rename from pkg/config/protogvk.go
rename to operator/pkg/config/protogvk.go
diff --git a/pkg/config/protomarshal.go b/operator/pkg/config/protomarshal.go
similarity index 100%
rename from pkg/config/protomarshal.go
rename to operator/pkg/config/protomarshal.go
diff --git a/operator/pkg/install/installer.go 
b/operator/pkg/install/installer.go
index 98aa0305..a3d70cba 100644
--- a/operator/pkg/install/installer.go
+++ b/operator/pkg/install/installer.go
@@ -1,6 +1,8 @@
 package install
 
 import (
+       "context"
+       "fmt"
        "github.com/apache/dubbo-kubernetes/operator/pkg/component"
        "github.com/apache/dubbo-kubernetes/operator/pkg/manifest"
        "github.com/apache/dubbo-kubernetes/operator/pkg/util/clog"
@@ -11,6 +13,8 @@ import (
        "github.com/apache/dubbo-kubernetes/pkg/util/sets"
        "github.com/apache/dubbo-kubernetes/pkg/util/slices"
        "github.com/hashicorp/go-multierror"
+       metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+       "k8s.io/apimachinery/pkg/types"
        "sync"
 )
 
diff --git a/pkg/schema/schema.go b/operator/pkg/schema/schema.go
similarity index 100%
copy from pkg/schema/schema.go
copy to operator/pkg/schema/schema.go
diff --git a/pkg/schema/schema.go b/pkg/schema/schema.go
index 67a354db..d54f4142 100644
--- a/pkg/schema/schema.go
+++ b/pkg/schema/schema.go
@@ -1,11 +1,48 @@
 package schema
 
+import (
+       "github.com/apache/dubbo-kubernetes/operator/pkg/config"
+       "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
 type schemaImpl struct {
+       gvk           config.GroupVersionKind
+       plural        string
+       clusterScoped bool
+}
+
+func (s *schemaImpl) Kind() string {
+       return s.gvk.Kind
+}
+
+func (s *schemaImpl) Group() string {
+       return s.gvk.Group
+}
+
+func (s *schemaImpl) Version() string {
+       return s.gvk.Version
+}
+
+func (s *schemaImpl) Plural() string {
+       return s.plural
+}
+
+func (s *schemaImpl) GroupVersionKind() config.GroupVersionKind {
+       return s.gvk
+}
+
+func (s *schemaImpl) InClusterScoped() bool {
+       return s.clusterScoped
+}
+
+func (s *schemaImpl) GroupVersionResource() schema.GroupVersionResource {
+       return schema.GroupVersionResource{
+               Group:    s.Group(),
+               Version:  s.Version(),
+               Resource: s.Plural(),
+       }
 }
 
 type Builder struct {
 }
 
-func (s *schemaImpl) Kind() string {
-       return ""
-}
\ No newline at end of file

Reply via email to