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
361e218f
Unverified
Commit
361e218f
authored
Jul 27, 2020
by
Brad Davidson
Committed by
GitHub
Jul 27, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2064 from brandond/write_kubeconfig_claim
Correctly report and propagate kubeconfig write failures
parents
118d3256
dfd0f9d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
server.go
pkg/server/server.go
+4
-2
No files found.
pkg/server/server.go
View file @
361e218f
...
@@ -282,8 +282,11 @@ func writeKubeConfig(certs string, config *Config) error {
...
@@ -282,8 +282,11 @@ func writeKubeConfig(certs string, config *Config) error {
}
}
if
err
=
clientaccess
.
WriteClientKubeConfig
(
kubeConfig
,
url
,
config
.
ControlConfig
.
Runtime
.
ServerCA
,
config
.
ControlConfig
.
Runtime
.
ClientAdminCert
,
if
err
=
clientaccess
.
WriteClientKubeConfig
(
kubeConfig
,
url
,
config
.
ControlConfig
.
Runtime
.
ServerCA
,
config
.
ControlConfig
.
Runtime
.
ClientAdminCert
,
config
.
ControlConfig
.
Runtime
.
ClientAdminKey
);
err
!=
nil
{
config
.
ControlConfig
.
Runtime
.
ClientAdminKey
);
err
==
nil
{
logrus
.
Infof
(
"Wrote kubeconfig %s"
,
kubeConfig
)
}
else
{
logrus
.
Errorf
(
"Failed to generate kubeconfig: %v"
,
err
)
logrus
.
Errorf
(
"Failed to generate kubeconfig: %v"
,
err
)
return
err
}
}
if
config
.
ControlConfig
.
KubeConfigMode
!=
""
{
if
config
.
ControlConfig
.
KubeConfigMode
!=
""
{
...
@@ -303,7 +306,6 @@ func writeKubeConfig(certs string, config *Config) error {
...
@@ -303,7 +306,6 @@ func writeKubeConfig(certs string, config *Config) error {
}
}
}
}
logrus
.
Infof
(
"Wrote kubeconfig %s"
,
kubeConfig
)
if
def
{
if
def
{
logrus
.
Infof
(
"Run: %s kubectl"
,
filepath
.
Base
(
os
.
Args
[
0
]))
logrus
.
Infof
(
"Run: %s kubectl"
,
filepath
.
Base
(
os
.
Args
[
0
]))
}
}
...
...
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