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(kumactl): remove ca-cert or skip-verify requirement #6140

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
7 changes: 1 addition & 6 deletions app/kumactl/cmd/config/config_control_planes_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,10 @@ func newConfigControlPlanesAddCmd(pctx *kumactl_cmd.RootContext) *cobra.Command
}

func validateArgs(args controlPlaneAddArgs, plugins map[string]plugins.AuthnPlugin) error {
url, err := net_url.ParseRequestURI(args.apiServerURL)
_, err := net_url.ParseRequestURI(args.apiServerURL)
if err != nil {
return errors.Wrap(err, "API Server URL is invalid")
}
if url.Scheme == "https" {
if args.caCertFile == "" && !args.skipVerify {
return errors.New("HTTPS is used. You need to specify either --ca-cert-file so kumactl can verify authenticity of the Control Plane or --skip-verify to skip verification")
}
}
if (args.clientKeyFile != "" && args.clientCertFile == "") || (args.clientKeyFile == "" && args.clientCertFile != "") {
return errors.New("Both --client-cert-file and --client-key-file needs to be specified")
}
Expand Down