Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
barry cho
Rancher
Commits
20cd7bc2
Commit
20cd7bc2
authored
6 years ago
by
Darren Shepherd
Committed by
Alena Prokharchyk
6 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Assign TLS certs for fix local HA websockets
parent
42c27f3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/clusterrouter/proxy/proxy_server.go
+14
-0
pkg/clusterrouter/proxy/proxy_server.go
with
14 additions
and
0 deletions
+14
-0
pkg/clusterrouter/proxy/proxy_server.go
+
14
-
0
View file @
20cd7bc2
...
...
@@ -62,6 +62,20 @@ func NewLocal(localConfig *rest.Config, cluster *v3.Cluster) (*RemoteService, er
return
nil
,
err
}
if
localConfig
.
TLSClientConfig
.
CAFile
!=
""
&&
localConfig
.
BearerToken
!=
""
{
httpTransport
:=
&
http
.
Transport
{}
certBytes
,
err
:=
base64
.
StdEncoding
.
DecodeString
(
cluster
.
Status
.
CACert
)
if
err
!=
nil
{
return
nil
,
err
}
certs
:=
x509
.
NewCertPool
()
certs
.
AppendCertsFromPEM
(
certBytes
)
httpTransport
.
TLSClientConfig
=
&
tls
.
Config
{
RootCAs
:
certs
,
}
transport
=
httpTransport
}
rs
:=
&
RemoteService
{
cluster
:
cluster
,
url
:
func
()
(
url
.
URL
,
error
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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