Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
b5008763
Commit
b5008763
authored
Jan 13, 2020
by
Miek Gieben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
This does something
Signed-off-by:
Miek Gieben
<
miek@miek.nl
>
parent
519ef9ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
plugin/traffic/xds/client.go
plugin/traffic/xds/client.go
+7
-2
plugin/traffic/xds_bootstrap_insecure.json
plugin/traffic/xds_bootstrap_insecure.json
+11
-0
No files found.
plugin/traffic/xds/client.go
View file @
b5008763
...
@@ -57,12 +57,17 @@ func New(opts Options) (*Client, error) {
...
@@ -57,12 +57,17 @@ func New(opts Options) (*Client, error) {
case
opts
.
Config
.
BalancerName
==
""
:
case
opts
.
Config
.
BalancerName
==
""
:
return
nil
,
errors
.
New
(
"xds: no xds_server name provided in options"
)
return
nil
,
errors
.
New
(
"xds: no xds_server name provided in options"
)
case
opts
.
Config
.
Creds
==
nil
:
case
opts
.
Config
.
Creds
==
nil
:
return
nil
,
errors
.
New
(
"xds: no credentials provided in options"
)
fmt
.
Printf
(
"%s
\n
"
,
errors
.
New
(
"xds: no credentials provided in options"
)
)
case
opts
.
Config
.
NodeProto
==
nil
:
case
opts
.
Config
.
NodeProto
==
nil
:
return
nil
,
errors
.
New
(
"xds: no node_proto provided in options"
)
return
nil
,
errors
.
New
(
"xds: no node_proto provided in options"
)
}
}
dopts
:=
append
([]
grpc
.
DialOption
{
opts
.
Config
.
Creds
},
opts
.
DialOpts
...
)
var
dopts
[]
grpc
.
DialOption
if
opts
.
Config
.
Creds
==
nil
{
dopts
=
append
([]
grpc
.
DialOption
{
grpc
.
WithInsecure
()},
opts
.
DialOpts
...
)
}
else
{
dopts
=
append
([]
grpc
.
DialOption
{
opts
.
Config
.
Creds
},
opts
.
DialOpts
...
)
}
cc
,
err
:=
grpc
.
Dial
(
opts
.
Config
.
BalancerName
,
dopts
...
)
cc
,
err
:=
grpc
.
Dial
(
opts
.
Config
.
BalancerName
,
dopts
...
)
if
err
!=
nil
{
if
err
!=
nil
{
// An error from a non-blocking dial indicates something serious.
// An error from a non-blocking dial indicates something serious.
...
...
plugin/traffic/xds_bootstrap_insecure.json
0 → 100644
View file @
b5008763
{
"node"
:
{
"id"
:
"ENVOY_NODE_ID"
,
"metadata"
:
{
"TRAFFICDIRECTOR_GRPC_HOSTNAME"
:
"trafficdirector"
}
},
"xds_servers"
:
[{
"server_uri"
:
"localhost:18000"
}]
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment