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
391e61bd
You need to sign in or sign up before continuing.
Commit
391e61bd
authored
Sep 21, 2023
by
Brad Davidson
Committed by
Brad Davidson
Sep 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use admin kubeconfig instead of supervisor for etcd snapshot CLI
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
bd9dad87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
etcd_snapshot.go
pkg/cli/etcdsnapshot/etcd_snapshot.go
+4
-4
No files found.
pkg/cli/etcdsnapshot/etcd_snapshot.go
View file @
391e61bd
...
@@ -64,7 +64,7 @@ func commandSetup(app *cli.Context, cfg *cmds.Server, sc *server.Config) error {
...
@@ -64,7 +64,7 @@ func commandSetup(app *cli.Context, cfg *cmds.Server, sc *server.Config) error {
sc
.
ControlConfig
.
Runtime
.
ETCDServerCA
=
filepath
.
Join
(
dataDir
,
"tls"
,
"etcd"
,
"server-ca.crt"
)
sc
.
ControlConfig
.
Runtime
.
ETCDServerCA
=
filepath
.
Join
(
dataDir
,
"tls"
,
"etcd"
,
"server-ca.crt"
)
sc
.
ControlConfig
.
Runtime
.
ClientETCDCert
=
filepath
.
Join
(
dataDir
,
"tls"
,
"etcd"
,
"client.crt"
)
sc
.
ControlConfig
.
Runtime
.
ClientETCDCert
=
filepath
.
Join
(
dataDir
,
"tls"
,
"etcd"
,
"client.crt"
)
sc
.
ControlConfig
.
Runtime
.
ClientETCDKey
=
filepath
.
Join
(
dataDir
,
"tls"
,
"etcd"
,
"client.key"
)
sc
.
ControlConfig
.
Runtime
.
ClientETCDKey
=
filepath
.
Join
(
dataDir
,
"tls"
,
"etcd"
,
"client.key"
)
sc
.
ControlConfig
.
Runtime
.
KubeConfig
Supervisor
=
filepath
.
Join
(
dataDir
,
"cred"
,
"supervisor
.kubeconfig"
)
sc
.
ControlConfig
.
Runtime
.
KubeConfig
Admin
=
filepath
.
Join
(
dataDir
,
"cred"
,
"admin
.kubeconfig"
)
return
nil
return
nil
}
}
...
@@ -110,7 +110,7 @@ func save(app *cli.Context, cfg *cmds.Server) error {
...
@@ -110,7 +110,7 @@ func save(app *cli.Context, cfg *cmds.Server) error {
return
err
return
err
}
}
sc
,
err
:=
server
.
NewContext
(
ctx
,
serverConfig
.
ControlConfig
.
Runtime
.
KubeConfig
Supervisor
)
sc
,
err
:=
server
.
NewContext
(
ctx
,
serverConfig
.
ControlConfig
.
Runtime
.
KubeConfig
Admin
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -144,7 +144,7 @@ func delete(app *cli.Context, cfg *cmds.Server) error {
...
@@ -144,7 +144,7 @@ func delete(app *cli.Context, cfg *cmds.Server) error {
return
err
return
err
}
}
sc
,
err
:=
server
.
NewContext
(
ctx
,
serverConfig
.
ControlConfig
.
Runtime
.
KubeConfig
Supervisor
)
sc
,
err
:=
server
.
NewContext
(
ctx
,
serverConfig
.
ControlConfig
.
Runtime
.
KubeConfig
Admin
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -250,7 +250,7 @@ func prune(app *cli.Context, cfg *cmds.Server) error {
...
@@ -250,7 +250,7 @@ func prune(app *cli.Context, cfg *cmds.Server) error {
return
err
return
err
}
}
sc
,
err
:=
server
.
NewContext
(
ctx
,
serverConfig
.
ControlConfig
.
Runtime
.
KubeConfig
Supervisor
)
sc
,
err
:=
server
.
NewContext
(
ctx
,
serverConfig
.
ControlConfig
.
Runtime
.
KubeConfig
Admin
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
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