Skip to content

Commit

Permalink
Merge pull request #138 from denis-tingaikin/fix-client-options
Browse files Browse the repository at this point in the history
qfix: clientOptions are wrong for interdomain scenario
  • Loading branch information
edwarnicke authored Jun 6, 2021
2 parents 82ec657 + 9ec64b3 commit 1e7146a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.16

require (
github.com/antonfisher/nested-logrus-formatter v1.3.0
github.com/edwarnicke/grpcfd v0.1.0
github.com/kelseyhightower/envconfig v1.4.0
github.com/networkservicemesh/sdk v0.0.0-20210604144115-6bac2f97d499
github.com/networkservicemesh/sdk-k8s v0.0.0-20210604144639-7ae7dbf76906
Expand Down
18 changes: 16 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build !windows

package main

import (
Expand All @@ -24,6 +26,8 @@ import (
"syscall"
"time"

"github.com/edwarnicke/grpcfd"

"github.com/networkservicemesh/sdk-k8s/pkg/registry/chains/registryk8s"
"github.com/networkservicemesh/sdk-k8s/pkg/tools/k8s"
"github.com/networkservicemesh/sdk/pkg/tools/jaeger"
Expand Down Expand Up @@ -105,8 +109,18 @@ func main() {
serverOptions := append(opentracing.WithTracing(), grpc.Creds(credsTLS))
server := grpc.NewServer(serverOptions...)

clientOptions := append(opentracing.WithTracingDial(), grpc.WithBlock(), grpc.WithTransportCredentials(credsTLS))

clientOptions := append(
opentracing.WithTracingDial(),
grpc.WithBlock(),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
grpc.WithTransportCredentials(
grpcfd.TransportCredentials(
credentials.NewTLS(
tlsconfig.MTLSClientConfig(source, source, tlsconfig.AuthorizeAny()),
),
),
),
)
client, _, _ := k8s.NewVersionedClient()

config.ClientSet = client
Expand Down
1 change: 1 addition & 0 deletions pkg/internal/imports/imports_linux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1e7146a

Please sign in to comment.