Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
4eb3a488
Commit
4eb3a488
authored
Mar 29, 2022
by
Brad Davidson
Committed by
Brad Davidson
Mar 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip setting up client tls when etcd server does not have tls enabled
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
98036ced
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
etcd.go
pkg/etcd/etcd.go
+9
-7
No files found.
pkg/etcd/etcd.go
View file @
4eb3a488
...
...
@@ -608,18 +608,20 @@ func getClientConfig(ctx context.Context, runtime *config.ControlRuntime, endpoi
if
len
(
endpoints
)
==
0
{
endpoints
=
getEndpoints
(
runtime
)
}
tlsConfig
,
err
:=
toTLSConfig
(
runtime
)
if
err
!=
nil
{
return
nil
,
err
}
return
&
etcd
.
Config
{
config
:=
&
etcd
.
Config
{
Endpoints
:
endpoints
,
TLS
:
tlsConfig
,
Context
:
ctx
,
DialTimeout
:
defaultDialTimeout
,
DialKeepAliveTime
:
defaultKeepAliveTime
,
DialKeepAliveTimeout
:
defaultKeepAliveTimeout
,
},
nil
}
var
err
error
if
strings
.
HasPrefix
(
endpoints
[
0
],
"https://"
)
{
config
.
TLS
,
err
=
toTLSConfig
(
runtime
)
}
return
config
,
err
}
// getEndpoints returns the endpoints from the runtime config if set, otherwise the default endpoint.
...
...
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