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
70304e03
Unverified
Commit
70304e03
authored
Jan 31, 2022
by
Derek Nola
Committed by
GitHub
Jan 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add server flag to access nonlocal/nondefault k3s server (#5016) (#5055)
Signed-off-by:
Derek Nola
<
derek.nola@suse.com
>
parent
d3189ad2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
secrets_encrypt.go
pkg/cli/cmds/secrets_encrypt.go
+8
-0
secrets_encrypt.go
pkg/cli/secretsencrypt/secrets_encrypt.go
+0
-3
No files found.
pkg/cli/cmds/secrets_encrypt.go
View file @
70304e03
package
cmds
package
cmds
import
(
import
(
"github.com/rancher/k3s/pkg/version"
"github.com/urfave/cli"
"github.com/urfave/cli"
)
)
...
@@ -9,6 +10,13 @@ const SecretsEncryptCommand = "secrets-encrypt"
...
@@ -9,6 +10,13 @@ const SecretsEncryptCommand = "secrets-encrypt"
var
EncryptFlags
=
[]
cli
.
Flag
{
var
EncryptFlags
=
[]
cli
.
Flag
{
DataDirFlag
,
DataDirFlag
,
ServerToken
,
ServerToken
,
cli
.
StringFlag
{
Name
:
"server, s"
,
Usage
:
"(cluster) Server to connect to"
,
EnvVar
:
version
.
ProgramUpper
+
"_URL"
,
Value
:
"https://127.0.0.1:6443"
,
Destination
:
&
ServerConfig
.
ServerURL
,
},
}
}
func
NewSecretsEncryptCommand
(
action
func
(
*
cli
.
Context
)
error
,
subcommands
[]
cli
.
Command
)
cli
.
Command
{
func
NewSecretsEncryptCommand
(
action
func
(
*
cli
.
Context
)
error
,
subcommands
[]
cli
.
Command
)
cli
.
Command
{
...
...
pkg/cli/secretsencrypt/secrets_encrypt.go
View file @
70304e03
...
@@ -31,9 +31,6 @@ func commandPrep(app *cli.Context, cfg *cmds.Server) (config.Control, *clientacc
...
@@ -31,9 +31,6 @@ func commandPrep(app *cli.Context, cfg *cmds.Server) (config.Control, *clientacc
if
err
!=
nil
{
if
err
!=
nil
{
return
controlConfig
,
nil
,
err
return
controlConfig
,
nil
,
err
}
}
if
cfg
.
ServerURL
==
""
{
cfg
.
ServerURL
=
"https://127.0.0.1:6443"
}
if
cfg
.
Token
==
""
{
if
cfg
.
Token
==
""
{
fp
:=
filepath
.
Join
(
controlConfig
.
DataDir
,
"token"
)
fp
:=
filepath
.
Join
(
controlConfig
.
DataDir
,
"token"
)
...
...
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