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

[operator] update installcmd logic #505

Merged
merged 1 commit into from
Nov 27, 2024
Merged
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
26 changes: 26 additions & 0 deletions operator/cmd/cluster/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cluster
import (
"fmt"
"github.com/apache/dubbo-kubernetes/dubboctl/pkg/cli"
"github.com/apache/dubbo-kubernetes/pkg/kube"
"github.com/spf13/cobra"
"strings"
"time"
Expand All @@ -29,3 +30,28 @@ func (i *InstallArgs) String() string {
func InstallCmd(ctx cli.Context) *cobra.Command {
return nil
}

func WithInstallCmdArgs(ctx cli.Context, rootArgs *RootArgs, iArgs *InstallArgs) *cobra.Command {
ic := &cobra.Command{
Use: "install",
Short: "Applies an Dubbo manifest, installing or reconfiguring Dubbo on a cluster.",
Long: "The install command generates an Dubbo install manifest and applies it to a cluster.",
Example: `# Apply a default dubboctl installation
dubboctl install
# Apply a default profile
dubboctl install --profile=default`,
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
_, err := ctx.CliClient()
if err != nil {
return err
}
return install(ctx, rootArgs, iArgs)
},
}
return ic
}

func install(kubeClient kube.CliClient, rootArgs *RootArgs, iArgs *InstallArgs) error {
return nil
}
Loading