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
356fe006
Commit
356fe006
authored
Mar 12, 2020
by
galal-hussein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add asterisks for omitted values in nodeconfig
parent
9a21fc51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
nodeconfig.go
pkg/nodeconfig/nodeconfig.go
+3
-2
No files found.
pkg/nodeconfig/nodeconfig.go
View file @
356fe006
...
@@ -16,6 +16,7 @@ const (
...
@@ -16,6 +16,7 @@ const (
NodeArgsAnnotation
=
"k3s.io/node-args"
NodeArgsAnnotation
=
"k3s.io/node-args"
NodeEnvAnnotation
=
"k3s.io/node-env"
NodeEnvAnnotation
=
"k3s.io/node-env"
NodeConfigHashAnnotation
=
"k3s.io/node-config-hash"
NodeConfigHashAnnotation
=
"k3s.io/node-config-hash"
OmittedValue
=
"********"
)
)
func
getNodeArgs
()
(
string
,
error
)
{
func
getNodeArgs
()
(
string
,
error
)
{
...
@@ -31,7 +32,7 @@ func getNodeArgs() (string, error) {
...
@@ -31,7 +32,7 @@ func getNodeArgs() (string, error) {
for
i
,
arg
:=
range
nodeArgsList
{
for
i
,
arg
:=
range
nodeArgsList
{
if
isSecret
(
arg
)
{
if
isSecret
(
arg
)
{
if
i
+
1
<
len
(
nodeArgsList
)
{
if
i
+
1
<
len
(
nodeArgsList
)
{
nodeArgsList
[
i
+
1
]
=
""
nodeArgsList
[
i
+
1
]
=
OmittedValue
}
}
}
}
}
}
...
@@ -52,7 +53,7 @@ func getNodeEnv() (string, error) {
...
@@ -52,7 +53,7 @@ func getNodeEnv() (string, error) {
}
}
for
key
:=
range
k3sEnv
{
for
key
:=
range
k3sEnv
{
if
isSecret
(
key
)
{
if
isSecret
(
key
)
{
k3sEnv
[
key
]
=
""
k3sEnv
[
key
]
=
OmittedValue
}
}
}
}
k3sEnvJSON
,
err
:=
json
.
Marshal
(
k3sEnv
)
k3sEnvJSON
,
err
:=
json
.
Marshal
(
k3sEnv
)
...
...
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