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 0f83838b [operator] Integration of operator project structure
0f83838b is described below
commit 0f83838bb8d4972f2a71a756007ec59dde07e35e
Author: mfordjody <[email protected]>
AuthorDate: Wed Oct 30 13:17:02 2024 +0800
[operator] Integration of operator project structure
---
dubboctl/{pkg/manifest => cmd}/manifest.go | 11 ++++++-----
dubboctl/cmd/root.go | 3 +--
dubboctl/{ => internal}/identifier/const.go | 0
dubboctl/{ => internal}/identifier/path.go | 0
dubboctl/internal/kube/component.go | 2 +-
dubboctl/internal/kube/operator.go | 2 +-
dubboctl/internal/manifest/common.go | 2 +-
dubboctl/internal/manifest/render/render.go | 2 +-
dubboctl/internal/manifest/render/render_test.go | 5 +----
dubboctl/pkg/dashboard/all.go | 2 +-
dubboctl/pkg/manifest/generate.go | 2 +-
dubboctl/pkg/profile/diff.go | 2 +-
dubboctl/pkg/profile/list.go | 2 +-
13 files changed, 16 insertions(+), 19 deletions(-)
diff --git a/dubboctl/pkg/manifest/manifest.go b/dubboctl/cmd/manifest.go
similarity index 80%
rename from dubboctl/pkg/manifest/manifest.go
rename to dubboctl/cmd/manifest.go
index 9b12467c..c5523001 100644
--- a/dubboctl/pkg/manifest/manifest.go
+++ b/dubboctl/cmd/manifest.go
@@ -13,9 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package manifest
+package cmd
import (
+ "github.com/apache/dubbo-kubernetes/dubboctl/pkg/manifest"
"github.com/spf13/cobra"
)
@@ -25,9 +26,9 @@ func AddManifest(rootCmd *cobra.Command) {
Short: "Commands related to manifest",
Long: "Commands help user to generate manifest and install
manifest",
}
- ConfigManifestGenerateCmd(manifestCmd)
- ConfigManifestInstallCmd(manifestCmd)
- ConfigManifestUninstallCmd(manifestCmd)
- ConfigManifestDiffCmd(manifestCmd)
+ manifest.ConfigManifestGenerateCmd(manifestCmd)
+ manifest.ConfigManifestInstallCmd(manifestCmd)
+ manifest.ConfigManifestUninstallCmd(manifestCmd)
+ manifest.ConfigManifestDiffCmd(manifestCmd)
rootCmd.AddCommand(manifestCmd)
}
diff --git a/dubboctl/cmd/root.go b/dubboctl/cmd/root.go
index aa399c34..751c3020 100644
--- a/dubboctl/cmd/root.go
+++ b/dubboctl/cmd/root.go
@@ -19,7 +19,6 @@ import (
"github.com/apache/dubbo-kubernetes/dubboctl/pkg/dashboard"
"github.com/apache/dubbo-kubernetes/dubboctl/pkg/deploy"
"github.com/apache/dubbo-kubernetes/dubboctl/pkg/generate"
- "github.com/apache/dubbo-kubernetes/dubboctl/pkg/manifest"
"github.com/apache/dubbo-kubernetes/dubboctl/pkg/proxy"
"github.com/apache/dubbo-kubernetes/dubboctl/pkg/registry"
)
@@ -88,7 +87,7 @@ func addSubCommands(rootCmd *cobra.Command, newClient
deploy.ClientFactory) {
deploy.AddCreate(rootCmd, newClient)
deploy.AddRepository(rootCmd, newClient)
deploy.AddDeploy(rootCmd, newClient)
- manifest.AddManifest(rootCmd)
+ AddManifest(rootCmd)
generate.AddGenerate(rootCmd)
addProfile(rootCmd)
dashboard.AddDashboard(rootCmd)
diff --git a/dubboctl/identifier/const.go
b/dubboctl/internal/identifier/const.go
similarity index 100%
rename from dubboctl/identifier/const.go
rename to dubboctl/internal/identifier/const.go
diff --git a/dubboctl/identifier/path.go b/dubboctl/internal/identifier/path.go
similarity index 100%
rename from dubboctl/identifier/path.go
rename to dubboctl/internal/identifier/path.go
diff --git a/dubboctl/internal/kube/component.go
b/dubboctl/internal/kube/component.go
index fbfaea39..02fdb5f1 100644
--- a/dubboctl/internal/kube/component.go
+++ b/dubboctl/internal/kube/component.go
@@ -16,6 +16,7 @@
package kube
import (
+ "github.com/apache/dubbo-kubernetes/dubboctl/internal/identifier"
"path"
"strings"
"unicode/utf8"
@@ -30,7 +31,6 @@ import (
)
import (
- "github.com/apache/dubbo-kubernetes/dubboctl/identifier"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/apis/dubbo.apache.org/v1alpha1"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/filesystem"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/manifest"
diff --git a/dubboctl/internal/kube/operator.go
b/dubboctl/internal/kube/operator.go
index d3d9de46..b76b6a21 100644
--- a/dubboctl/internal/kube/operator.go
+++ b/dubboctl/internal/kube/operator.go
@@ -18,10 +18,10 @@ package kube
import (
"errors"
"fmt"
+ "github.com/apache/dubbo-kubernetes/dubboctl/internal/identifier"
)
import (
- "github.com/apache/dubbo-kubernetes/dubboctl/identifier"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/apis/dubbo.apache.org/v1alpha1"
"github.com/apache/dubbo-kubernetes/pkg/core/logger"
)
diff --git a/dubboctl/internal/manifest/common.go
b/dubboctl/internal/manifest/common.go
index e5326c2b..74110208 100644
--- a/dubboctl/internal/manifest/common.go
+++ b/dubboctl/internal/manifest/common.go
@@ -17,6 +17,7 @@ package manifest
import (
"fmt"
+ "github.com/apache/dubbo-kubernetes/dubboctl/internal/identifier"
"path"
"strings"
)
@@ -26,7 +27,6 @@ import (
)
import (
- "github.com/apache/dubbo-kubernetes/dubboctl/identifier"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/apis/dubbo.apache.org/v1alpha1"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/util"
)
diff --git a/dubboctl/internal/manifest/render/render.go
b/dubboctl/internal/manifest/render/render.go
index d6a69f24..87a1207c 100644
--- a/dubboctl/internal/manifest/render/render.go
+++ b/dubboctl/internal/manifest/render/render.go
@@ -18,6 +18,7 @@ package render
import (
"errors"
"fmt"
+ "github.com/apache/dubbo-kubernetes/dubboctl/internal/identifier"
"io/fs"
"net/url"
"os"
@@ -42,7 +43,6 @@ import (
)
import (
- "github.com/apache/dubbo-kubernetes/dubboctl/identifier"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/manifest"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/util"
)
diff --git a/dubboctl/internal/manifest/render/render_test.go
b/dubboctl/internal/manifest/render/render_test.go
index 2a6a63d8..f15578eb 100644
--- a/dubboctl/internal/manifest/render/render_test.go
+++ b/dubboctl/internal/manifest/render/render_test.go
@@ -16,14 +16,11 @@
package render
import (
+ "github.com/apache/dubbo-kubernetes/dubboctl/internal/identifier"
"os"
"testing"
)
-import (
- "github.com/apache/dubbo-kubernetes/dubboctl/identifier"
-)
-
const (
TestDir string = "testchart"
TestName string = "nginx"
diff --git a/dubboctl/pkg/dashboard/all.go b/dubboctl/pkg/dashboard/all.go
index 8e452019..97c7ba7a 100644
--- a/dubboctl/pkg/dashboard/all.go
+++ b/dubboctl/pkg/dashboard/all.go
@@ -18,6 +18,7 @@ package dashboard
import (
"context"
"fmt"
+ "github.com/apache/dubbo-kubernetes/dubboctl/internal/identifier"
"io"
"net"
"os"
@@ -39,7 +40,6 @@ import (
)
import (
- "github.com/apache/dubbo-kubernetes/dubboctl/identifier"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/kube"
"github.com/apache/dubbo-kubernetes/pkg/core/logger"
)
diff --git a/dubboctl/pkg/manifest/generate.go
b/dubboctl/pkg/manifest/generate.go
index d4ec24ec..bb9e2207 100644
--- a/dubboctl/pkg/manifest/generate.go
+++ b/dubboctl/pkg/manifest/generate.go
@@ -17,6 +17,7 @@ package manifest
import (
"fmt"
+ "github.com/apache/dubbo-kubernetes/dubboctl/internal/identifier"
"os"
"path"
"sort"
@@ -32,7 +33,6 @@ import (
)
import (
- "github.com/apache/dubbo-kubernetes/dubboctl/identifier"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/apis/dubbo.apache.org/v1alpha1"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/kube"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/manifest"
diff --git a/dubboctl/pkg/profile/diff.go b/dubboctl/pkg/profile/diff.go
index 9d243b7f..80b4c26b 100644
--- a/dubboctl/pkg/profile/diff.go
+++ b/dubboctl/pkg/profile/diff.go
@@ -18,6 +18,7 @@ package profile
import (
"errors"
"fmt"
+ "github.com/apache/dubbo-kubernetes/dubboctl/internal/identifier"
)
import (
@@ -27,7 +28,6 @@ import (
)
import (
- "github.com/apache/dubbo-kubernetes/dubboctl/identifier"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/kube"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/manifest"
"github.com/apache/dubbo-kubernetes/pkg/core/logger"
diff --git a/dubboctl/pkg/profile/list.go b/dubboctl/pkg/profile/list.go
index 5a9ad723..f22032f5 100644
--- a/dubboctl/pkg/profile/list.go
+++ b/dubboctl/pkg/profile/list.go
@@ -17,6 +17,7 @@ package profile
import (
"errors"
+ "github.com/apache/dubbo-kubernetes/dubboctl/internal/identifier"
"strings"
)
@@ -27,7 +28,6 @@ import (
)
import (
- "github.com/apache/dubbo-kubernetes/dubboctl/identifier"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/manifest"
"github.com/apache/dubbo-kubernetes/dubboctl/internal/util"
"github.com/apache/dubbo-kubernetes/pkg/core/logger"