airshipctl/cmd/document/document.go
Dmitry Ukov ff917e5a49 Add render sub-command frame
Render command filters documents and prints them to user-defined
output in a form of multi-document YAML.

Sub-command receives following document filter flags:
 * label
 * annotation
 * apiVersion (a.k.a group-version)
 * kind
 * filter

Related: #16
Change-Id: I7efb0a478e1070efd1791ab10d7c3946c8c28630
2020-02-17 11:27:22 +00:00

23 lines
648 B
Go

package document
import (
"github.com/spf13/cobra"
"opendev.org/airship/airshipctl/cmd/document/secret"
"opendev.org/airship/airshipctl/pkg/environment"
)
// NewDocumentCommand creates a new command for managing airshipctl documents
func NewDocumentCommand(rootSettings *environment.AirshipCTLSettings) *cobra.Command {
documentRootCmd := &cobra.Command{
Use: "document",
Short: "manages deployment documents",
}
documentRootCmd.AddCommand(NewDocumentPullCommand(rootSettings))
documentRootCmd.AddCommand(secret.NewSecretCommand(rootSettings))
documentRootCmd.AddCommand(NewRenderCommand(rootSettings))
return documentRootCmd
}