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

Vary the use of egctl #1403

Closed
qicz opened this issue May 6, 2023 · 5 comments
Closed

Vary the use of egctl #1403

qicz opened this issue May 6, 2023 · 5 comments
Labels
area/egctl kind/decision A record of a decision made by the community. kind/enhancement New feature or request kind/question Further information is requested stale

Comments

@qicz
Copy link
Member

qicz commented May 6, 2023

Description:

Currently eg provides the egctl client to debug any issue easily. But the client is outside k8s, the use have to download the egctl to the local or k8s host, at the same time when the user extends more extension features needs to recompile it.

I think we should use egctl simply and diversely.

  • For simply: combining all commands into a single binary, the user can use the egctl commands easily. On k8s, use egctl like
kubectl exec -n envoy-gateway-system envoy-gateway-xxx -it -- envoy-gateway egctl ....
  • For diversely: provides outside egctl client and commands combined eg version
    • outside egctl works on a local laptop
    • commands combined works on others' place

How to combine all commands:

func main() {
	// the envoy-gateway commands
	commands := cmd.GetRootCommand()
	// combine the egctl to envoy-gateway root commands
	commands.AddCommand(egctl.GetRootCommand())
	if err := commands.Execute(); err != nil {
		_, _ = fmt.Fprintln(os.Stderr, err)
		os.Exit(1)
	}
}

or

func main() {
	// the envoy-gateway commands
	commands := cmd.GetRootCommand()
	// combine the egctl sub commands to envoy-gateway root commands
	commands.AddCommand(egctl.GetRootCommand().Commands()...)
	if err := commands.Execute(); err != nil {
		_, _ = fmt.Fprintln(os.Stderr, err)
		os.Exit(1)
	}
}

For binary or image size:

the commands combined version, the eg binary is just a little bigger than the current version.

cc @arkodg

@qicz qicz added kind/enhancement New feature or request area/egctl labels May 6, 2023
@zirain
Copy link
Contributor

zirain commented May 6, 2023

I don't think it's a good pratice to do this.

@qicz
Copy link
Member Author

qicz commented May 6, 2023

I don't think it's a good pratice to do this.

As an end-user, the combined version is more convenient, and especially in k8s, there is no need to download.

@qicz qicz added the help wanted Extra attention is needed label May 6, 2023
@arkodg arkodg added kind/question Further information is requested kind/decision A record of a decision made by the community. and removed help wanted Extra attention is needed labels May 8, 2023
@arkodg
Copy link
Contributor

arkodg commented May 24, 2023

lets make a decision on this, @envoyproxy/gateway-maintainers anyone in favor of this ?

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days.

@github-actions github-actions bot added the stale label Jun 23, 2023
@arkodg
Copy link
Contributor

arkodg commented Nov 10, 2023

closing this as not planned

@arkodg arkodg closed this as completed Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/egctl kind/decision A record of a decision made by the community. kind/enhancement New feature or request kind/question Further information is requested stale
Projects
None yet
Development

No branches or pull requests

3 participants