Skip to content

Commit

Permalink
Merge pull request #1682 from saschagrunert/ca-optional
Browse files Browse the repository at this point in the history
Make `--tls-ca` optional
  • Loading branch information
k8s-ci-robot authored Nov 13, 2024
2 parents a778f80 + 0a32657 commit 4dc7922
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/crictl/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,9 @@ func tlsConfigFromFlags(ctx *cli.Context) (*rest.TLSClientConfig, error) {
if cfg.CAFile == "" && cfg.CertFile == "" && cfg.KeyFile == "" {
return &rest.TLSClientConfig{Insecure: true}, nil
}
if cfg.CAFile == "" || cfg.CertFile == "" || cfg.KeyFile == "" {
if cfg.CertFile == "" || cfg.KeyFile == "" {
return nil, fmt.Errorf(
"all three flags --%s, --%s and --%s are required for TLS streaming",
"all two flags --%s and --%s are required for TLS streaming, only --%s is optional",
flagTLSCA, flagTLSCert, flagTLSKey,
)
}
Expand Down

0 comments on commit 4dc7922

Please sign in to comment.