Documentation
¶
Index ¶
Constants ¶
const ( // DefaultConfigFile is config filename DefaultConfigFile string = "config.yaml" // TokenMinLength is 24 TokenMinLength int = 24 // DefaultLogLevel is 2 DefaultLogLevel string = "2" // TODO(joshrosso): workaround so policy file does not need to be on user's machine. // get rid of this eventually StaticPolicy string = `` /* 255-byte string literal not displayed */ )
Variables ¶
var ( // ErrMissingToken is missing GitHub token ErrMissingToken = errors.New("missing GitHub token") // ErrMissingPackageName is missing extension name ErrMissingPackageName = errors.New("missing package name") // ErrMissingOperation is missing operation ErrMissingOperation = errors.New("missing sub operation or command") // ErrMissingParameter is missing a required parameter ErrMissingParameter = errors.New("missing a required parameter") )
var ConfigureCmd = &cobra.Command{ Use: "configure <package name>", Short: "Configure a package by downloading its configuration", PreRunE: func(cmd *cobra.Command, args []string) (err error) { mgr, err = NewManager() return err }, RunE: configure, Args: cobra.ExactArgs(1), }
ConfigureCmd represents the tanzu package configure command. It resolves the desired package and downloads the imgpkg bundle from the OCI repository. It then unpacks the values failes, which a user can modify.
var DeleteCmd = &cobra.Command{ Use: "delete <extension name>", Short: "Delete an installed package from the cluster, terminating it", PreRunE: func(cmd *cobra.Command, args []string) (err error) { mgr, err = NewManager() return err }, RunE: deleteCmd, Args: cobra.ExactArgs(1), }
DeleteCmd represents the delete command
var DeleteRepoCmd = &cobra.Command{ Use: "delete [repo name] or --file <filename>", Short: "Deletes a repository of packages from the cluster", RunE: deleteRepository, PreRunE: func(cmd *cobra.Command, args []string) (err error) { mgr, err = NewManager() return err }, }
DeleteRepoCmd deletes a repository.
var InstallCmd = &cobra.Command{ Use: "install <package name>", Short: "Install a package into the cluster", PreRunE: func(cmd *cobra.Command, args []string) (err error) { mgr, err = NewManager() return err }, RunE: install, Args: cobra.ExactArgs(1), }
InstallCmd represents the tanzu package install command. It receives an package name and (optional) version. It then looks up the corresponding Package CR to verify there is something to install. If the corresponding Package CR resolves, an InstalledPacakge CR is create and deployed into the cluster.
var InstallRepoCmd = &cobra.Command{ Use: "install", Short: "Installs a package repository into the cluster", PreRunE: func(cmd *cobra.Command, args []string) (err error) { mgr, err = NewManager() return err }, RunE: installRepository, }
InstallRepoCmd adds a repository.
var ListCmd = &cobra.Command{ Use: "list", Short: "List packages available in the cluster", PreRunE: func(cmd *cobra.Command, args []string) (err error) { mgr, err = NewManager() return err }, RunE: list, }
ListCmd represents the list command
var ListRepoCmd = &cobra.Command{ Use: "list", Short: "Lists all repositories installed in the cluster", PreRunE: func(cmd *cobra.Command, args []string) (err error) { mgr, err = NewManager() return err }, RunE: listRepository, }
ListRepoCmd lists all repositories
var RepositoryCmd = &cobra.Command{
Use: "repository",
Short: "Manage repositories for packages",
}
RepositoryCmd represents the repository command
Functions ¶
func GetDebugLevel ¶
GetDebugLevel default is 2 (aka DefaultLogLevel)