Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Wksctl
Commits
6b1f9d40
Commit
6b1f9d40
authored
5 years ago
by
Michał Flendrich
Browse files
Options
Download
Email Patches
Plain Diff
plan view: delete the unused (and buggy) `--sealed-secret-key` flag
parent
75bd890c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmd/wksctl/plan/view/view.go
+0
-13
cmd/wksctl/plan/view/view.go
with
0 additions
and
13 deletions
+0
-13
cmd/wksctl/plan/view/view.go
+
0
-
13
View file @
6b1f9d40
...
...
@@ -31,7 +31,6 @@ var viewOptions struct {
gitBranch
string
gitPath
string
gitDeployKeyPath
string
sealedSecretKeyPath
string
sealedSecretCertPath
string
configDirectory
string
verbose
bool
...
...
@@ -46,26 +45,14 @@ func init() {
Cmd
.
Flags
()
.
StringVar
(
&
viewOptions
.
gitBranch
,
"git-branch"
,
"master"
,
"Git branch WKS should use to read your cluster"
)
Cmd
.
Flags
()
.
StringVar
(
&
viewOptions
.
gitPath
,
"git-path"
,
"."
,
"Relative path to files in Git"
)
Cmd
.
Flags
()
.
StringVar
(
&
viewOptions
.
gitDeployKeyPath
,
"git-deploy-key"
,
""
,
"Path to the Git deploy key"
)
Cmd
.
Flags
()
.
StringVar
(
&
viewOptions
.
sealedSecretKeyPath
,
"sealed-secret-key"
,
""
,
"Path to a key used to decrypt sealed secrets"
)
Cmd
.
Flags
()
.
StringVar
(
&
viewOptions
.
sealedSecretCertPath
,
"sealed-secret-cert"
,
""
,
"Path to a certificate used to encrypt sealed secrets"
)
Cmd
.
Flags
()
.
StringVar
(
&
viewOptions
.
configDirectory
,
"config-directory"
,
"."
,
"Directory containing configuration information for the cluster"
)
// Intentionally shadows the globally defined --verbose flag.
Cmd
.
Flags
()
.
BoolVar
(
&
viewOptions
.
verbose
,
"verbose"
,
false
,
"Enable verbose output"
)
// Default to using the git deploy key to decrypt sealed secrets
// BUG: CLI flags are not evaluated yet at this point!
if
viewOptions
.
sealedSecretKeyPath
==
""
&&
viewOptions
.
gitDeployKeyPath
!=
""
{
viewOptions
.
sealedSecretKeyPath
=
viewOptions
.
gitDeployKeyPath
}
}
func
planRun
(
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
// Default to using the git deploy key to decrypt sealed secrets
if
viewOptions
.
sealedSecretKeyPath
==
""
&&
viewOptions
.
gitDeployKeyPath
!=
""
{
viewOptions
.
sealedSecretKeyPath
=
viewOptions
.
gitDeployKeyPath
}
var
closer
func
()
var
err
error
cpath
:=
filepath
.
Join
(
viewOptions
.
gitPath
,
viewOptions
.
clusterManifestPath
)
...
...
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
Menu
Projects
Groups
Snippets
Help