Skip to content

Commit

Permalink
fix: Switch InsecureSkipVerify to true (#5575)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Behar <simbeh7@gmail.com>
  • Loading branch information
simster7 authored Apr 1, 2021
1 parent ed54f15 commit 4e450e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/argo/commands/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ See %s`, help.ArgoSever),
}
tlsConfig = &tls.Config{
Certificates: []tls.Certificate{cer},
InsecureSkipVerify: false, // InsecureSkipVerify will not impact the TLS listener. It is needed for the server to speak to itself for GRPC.
InsecureSkipVerify: true,
MinVersion: uint16(tlsMinVersion),
}
} else {
Expand Down
8 changes: 7 additions & 1 deletion server/apiserver/argoserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/soheilhy/cmux"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/rest"

Expand Down Expand Up @@ -271,8 +272,13 @@ func (as *argoServer) newHTTPServer(ctx context.Context, port int, artifactServe
}
dialOpts := []grpc.DialOption{
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(MaxGRPCMessageSize)),
grpc.WithInsecure(),
}
if as.tlsConfig != nil {
dialOpts = append(dialOpts, grpc.WithTransportCredentials(credentials.NewTLS(as.tlsConfig)))
} else {
dialOpts = append(dialOpts, grpc.WithInsecure())
}

webhookInterceptor := webhook.Interceptor(as.clients.Kubernetes)

// HTTP 1.1+JSON Server
Expand Down

0 comments on commit 4e450e2

Please sign in to comment.