[#91] refactor secrets as top level command
Future use of secrets will be clunky if it remains as a document subcommand ex: airshipctl document secret generate materpassphrase Refactoring so that secrets are now a top level command IE airshipctl secret ... Change-Id: I781ef5a4e32dc971f275f758d82d17cedd0f74af Signed-off-by: Alexander Hughes <Alexander.Hughes@pm.me>
This commit is contained in:
parent
6fbcc26323
commit
c2a0359ff9
@ -3,7 +3,6 @@ package document
|
|||||||
import (
|
import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"opendev.org/airship/airshipctl/cmd/document/secret"
|
|
||||||
"opendev.org/airship/airshipctl/pkg/environment"
|
"opendev.org/airship/airshipctl/pkg/environment"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -15,7 +14,6 @@ func NewDocumentCommand(rootSettings *environment.AirshipCTLSettings) *cobra.Com
|
|||||||
}
|
}
|
||||||
|
|
||||||
documentRootCmd.AddCommand(NewDocumentPullCommand(rootSettings))
|
documentRootCmd.AddCommand(NewDocumentPullCommand(rootSettings))
|
||||||
documentRootCmd.AddCommand(secret.NewSecretCommand())
|
|
||||||
documentRootCmd.AddCommand(NewRenderCommand(rootSettings))
|
documentRootCmd.AddCommand(NewRenderCommand(rootSettings))
|
||||||
|
|
||||||
return documentRootCmd
|
return documentRootCmd
|
||||||
|
@ -7,7 +7,6 @@ Available Commands:
|
|||||||
help Help about any command
|
help Help about any command
|
||||||
pull pulls documents from remote git repository
|
pull pulls documents from remote git repository
|
||||||
render Render documents from model
|
render Render documents from model
|
||||||
secret manages secrets
|
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
-h, --help help for document
|
-h, --help help for document
|
||||||
|
@ -13,6 +13,7 @@ import (
|
|||||||
"opendev.org/airship/airshipctl/cmd/completion"
|
"opendev.org/airship/airshipctl/cmd/completion"
|
||||||
"opendev.org/airship/airshipctl/cmd/config"
|
"opendev.org/airship/airshipctl/cmd/config"
|
||||||
"opendev.org/airship/airshipctl/cmd/document"
|
"opendev.org/airship/airshipctl/cmd/document"
|
||||||
|
"opendev.org/airship/airshipctl/cmd/secret"
|
||||||
"opendev.org/airship/airshipctl/pkg/environment"
|
"opendev.org/airship/airshipctl/pkg/environment"
|
||||||
"opendev.org/airship/airshipctl/pkg/log"
|
"opendev.org/airship/airshipctl/pkg/log"
|
||||||
)
|
)
|
||||||
@ -55,6 +56,7 @@ func AddDefaultAirshipCTLCommands(cmd *cobra.Command, settings *environment.Airs
|
|||||||
cmd.AddCommand(completion.NewCompletionCommand())
|
cmd.AddCommand(completion.NewCompletionCommand())
|
||||||
cmd.AddCommand(document.NewDocumentCommand(settings))
|
cmd.AddCommand(document.NewDocumentCommand(settings))
|
||||||
cmd.AddCommand(config.NewConfigCommand(settings))
|
cmd.AddCommand(config.NewConfigCommand(settings))
|
||||||
|
cmd.AddCommand(secret.NewSecretCommand())
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package secret
|
|||||||
import (
|
import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"opendev.org/airship/airshipctl/cmd/document/secret/generate"
|
"opendev.org/airship/airshipctl/cmd/secret/generate"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewSecretCommand creates a new command for managing airshipctl secrets
|
// NewSecretCommand creates a new command for managing airshipctl secrets
|
@ -10,6 +10,7 @@ Available Commands:
|
|||||||
config Modify airshipctl config files
|
config Modify airshipctl config files
|
||||||
document manages deployment documents
|
document manages deployment documents
|
||||||
help Help about any command
|
help Help about any command
|
||||||
|
secret manages secrets
|
||||||
version Show the version number of airshipctl
|
version Show the version number of airshipctl
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
|
Loading…
Reference in New Issue
Block a user