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

feat(*) update project to build kumactl at windows #2597

Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion app/kumactl/cmd/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ func NewInstallCmd(pctx *kumactl_cmd.RootContext) *cobra.Command {
Short: "Install various Kuma components.",
Long: `Install various Kuma components.`,
}

// sub-commands
cmd.AddCommand(newInstallControlPlaneCmd(&pctx.InstallCpContext))
cmd.AddCommand(newInstallCrdsCmd(&pctx.InstallCRDContext))
cmd.AddCommand(newInstallMetrics(pctx))
cmd.AddCommand(newInstallTracing(pctx))
cmd.AddCommand(newInstallDNS())
cmd.AddCommand(newInstallLogging(pctx))
cmd.AddCommand(newInstallTransparentProxy())
cmd.AddCommand(newInstallDemoCmd(&pctx.InstallDemoContext))
cmd.AddCommand(newInstallGatewayCmd(pctx))
cmd.AddCommand(newInstallTransparentProxy())

return cmd
}
2 changes: 2 additions & 0 deletions app/kumactl/cmd/install/install_transparent_proxy.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build !windows

package install

import (
Expand Down
16 changes: 16 additions & 0 deletions app/kumactl/cmd/install/install_transparent_proxy_windows.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package install

import (
"github.com/pkg/errors"
"github.com/spf13/cobra"
)

func newInstallTransparentProxy() *cobra.Command {
return &cobra.Command{
Use: "transparent-proxy",
Short: "Install Transparent Proxy pre-requisites on the host",
RunE: func(_ *cobra.Command, _ []string) error {
return errors.New("This command is not supported on your operating system")
},
}
}
3 changes: 2 additions & 1 deletion app/kumactl/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ func NewRootCmd(root *kumactl_cmd.RootContext) *cobra.Command {
cmd.AddCommand(get.NewGetCmd(root))
cmd.AddCommand(inspect.NewInspectCmd(root))
cmd.AddCommand(install.NewInstallCmd(root))
cmd.AddCommand(uninstall.NewUninstallCmd(root))
cmd.AddCommand(uninstall.NewUninstallCmd())
cmd.AddCommand(version.NewVersionCmd())

kumactl_cmd.WrapRunnables(cmd, kumactl_errors.FormatErrorWrapper)
return cmd
}
Expand Down
6 changes: 3 additions & 3 deletions app/kumactl/cmd/uninstall/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ package uninstall

import (
"github.com/spf13/cobra"

kumactl_cmd "github.com/kumahq/kuma/app/kumactl/pkg/cmd"
)

func NewUninstallCmd(pctx *kumactl_cmd.RootContext) *cobra.Command {
func NewUninstallCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "uninstall",
Short: "Uninstall various Kuma components.",
Long: `Uninstall various Kuma components.`,
}

// sub-commands
cmd.AddCommand(newUninstallTransparentProxy())

return cmd
}
6 changes: 4 additions & 2 deletions app/kumactl/cmd/uninstall/uninstall_transparent_proxy.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build !windows

package uninstall

import (
Expand All @@ -11,13 +13,13 @@ import (
"github.com/kumahq/kuma/pkg/transparentproxy"
)

type transparenProxyArgs struct {
type transparentProxyArgs struct {
DryRun bool
Verbose bool
}

func newUninstallTransparentProxy() *cobra.Command {
args := transparenProxyArgs{
args := transparentProxyArgs{
DryRun: false,
Verbose: false,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package uninstall

import (
"github.com/pkg/errors"
"github.com/spf13/cobra"
)

func newUninstallTransparentProxy() *cobra.Command {
return &cobra.Command{
Use: "transparent-proxy",
Short: "Uninstall Transparent Proxy pre-requisites on the host",
RunE: func(_ *cobra.Command, _ []string) error {
return errors.New("This command is not supported on your operating system")
},
}
}
7 changes: 4 additions & 3 deletions pkg/config/xds/bootstrap/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package bootstrap

import (
"net"
"os"
"time"

"github.com/pkg/errors"
Expand Down Expand Up @@ -88,9 +89,9 @@ func DefaultBootstrapParamsConfig() *BootstrapParamsConfig {
return &BootstrapParamsConfig{
AdminAddress: "127.0.0.1", // by default, Envoy Admin interface should listen on loopback address
AdminPort: 0, // by default, turn off Admin interface of Envoy
AdminAccessLogPath: "/dev/null",
XdsHost: "", // by default it is the same host as the one used by kuma-dp to connect to the control plane
XdsPort: 0, // by default it is autoconfigured from KUMA_XDS_SERVER_GRPC_PORT
AdminAccessLogPath: os.DevNull,
XdsHost: "", // by default, it is the same host as the one used by kuma-dp to connect to the control plane
XdsPort: 0, // by default, it is autoconfigured from KUMA_XDS_SERVER_GRPC_PORT
XdsConnectTimeout: 1 * time.Second,
}
}