Documentation ¶
Index ¶
- Constants
- func CurrentNamespace() string
- func ForEachCommand(cmd *cobra.Command, handler func(c *cobra.Command))
- type CLI
- func (cli *CLI) BucketCreate(args []string)
- func (cli *CLI) BucketDelete(args []string)
- func (cli *CLI) BucketList()
- func (cli *CLI) CrdIsReady(crd *apiextv1beta1.CustomResourceDefinition) (bool, error)
- func (cli *CLI) CrdsCreate()
- func (cli *CLI) CrdsDelete()
- func (cli *CLI) CrdsStatus()
- func (cli *CLI) CrdsWaitReady()
- func (cli *CLI) CrdsYaml()
- func (cli *CLI) GetNBClient() nb.Client
- func (cli *CLI) HubInstall()
- func (cli *CLI) HubStatus()
- func (cli *CLI) HubUninstall()
- func (cli *CLI) Install()
- func (cli *CLI) LoadCrds() *Crds
- func (cli *CLI) LoadSystemDefaults() *nbv1.NooBaa
- func (cli *CLI) OperatorInstall()
- func (cli *CLI) OperatorLocalInstall()
- func (cli *CLI) OperatorLocalReconcile()
- func (cli *CLI) OperatorLocalUninstall()
- func (cli *CLI) OperatorStatus()
- func (cli *CLI) OperatorUninstall()
- func (cli *CLI) OperatorYamls()
- func (cli *CLI) Run()
- func (cli *CLI) Status()
- func (cli *CLI) SystemCreate()
- func (cli *CLI) SystemDelete()
- func (cli *CLI) SystemList()
- func (cli *CLI) SystemStatus()
- func (cli *CLI) SystemWaitReady()
- func (cli *CLI) SystemYaml()
- func (cli *CLI) Uninstall()
- func (cli *CLI) Version()
- type Crds
- type HubConf
- type OperatorConf
- type Runnable
Constants ¶
const ASCIILogo1 = `` /* 235-byte string literal not displayed */
ASCIILogo1 is an ascii logo of noobaa
const ASCIILogo2 = `` /* 244-byte string literal not displayed */
ASCIILogo2 is an ascii logo of noobaa
Variables ¶
This section is empty.
Functions ¶
func CurrentNamespace ¶
func CurrentNamespace() string
Types ¶
type CLI ¶
type CLI struct { Client client.Client Ctx context.Context Log *logrus.Entry Namespace string SystemName string StorageClassName string NooBaaImage string OperatorImage string ImagePullSecret string // Commands Cmd *cobra.Command CmdOptions *cobra.Command CmdVersion *cobra.Command CmdInstall *cobra.Command CmdUninstall *cobra.Command CmdStatus *cobra.Command CmdBucket *cobra.Command CmdCrd *cobra.Command CmdOlmHub *cobra.Command CmdOlmLocal *cobra.Command CmdOperator *cobra.Command CmdSystem *cobra.Command }
CLI is the common tools used for most of this binary's commands. It creates the command structure and defines all the methods that implement the CLI commands.
func (*CLI) BucketCreate ¶
BucketCreate runs a CLI command
func (*CLI) BucketDelete ¶
BucketDelete runs a CLI command
func (*CLI) CrdIsReady ¶ added in v1.0.1
func (cli *CLI) CrdIsReady(crd *apiextv1beta1.CustomResourceDefinition) (bool, error)
CrdIsReady checks the status of a CRD
func (*CLI) CrdsWaitReady ¶
func (cli *CLI) CrdsWaitReady()
CrdsWaitReady waits for all CRDs to be ready
func (*CLI) CrdsYaml ¶
func (cli *CLI) CrdsYaml()
CrdsYaml dumps a combined yaml of all the CRDs from the bundled yamls
func (*CLI) GetNBClient ¶
GetNBClient is a CLI common tool that loads the mgmt api details from the system. It gets the endpoint address and token from the system status and secret that the operator creates for the system.
func (*CLI) HubInstall ¶
func (cli *CLI) HubInstall()
func (*CLI) HubUninstall ¶
func (cli *CLI) HubUninstall()
func (*CLI) LoadSystemDefaults ¶ added in v1.0.1
LoadSystemDefaults loads a noobaa system CR from bundled yamls and apply's changes from CLI flags to the defaults.
func (*CLI) OperatorInstall ¶
func (cli *CLI) OperatorInstall()
func (*CLI) OperatorLocalInstall ¶
func (cli *CLI) OperatorLocalInstall()
func (*CLI) OperatorLocalReconcile ¶
func (cli *CLI) OperatorLocalReconcile()
func (*CLI) OperatorLocalUninstall ¶
func (cli *CLI) OperatorLocalUninstall()
func (*CLI) OperatorStatus ¶
func (cli *CLI) OperatorStatus()
func (*CLI) OperatorUninstall ¶
func (cli *CLI) OperatorUninstall()
func (*CLI) OperatorYamls ¶
func (cli *CLI) OperatorYamls()
func (*CLI) SystemWaitReady ¶
func (cli *CLI) SystemWaitReady()
SystemWaitReady waits until the system phase changes to ready by the operator
type Crds ¶
type Crds struct { NooBaa *apiextv1beta1.CustomResourceDefinition BackingStore *apiextv1beta1.CustomResourceDefinition BucketClass *apiextv1beta1.CustomResourceDefinition }
Crds is the
type HubConf ¶
type HubConf struct {
Objects []*unstructured.Unstructured
}
type OperatorConf ¶
type OperatorConf struct { NS *corev1.Namespace SA *corev1.ServiceAccount Role *rbacv1.Role RoleBinding *rbacv1.RoleBinding ClusterRole *rbacv1.ClusterRole ClusterRoleBinding *rbacv1.ClusterRoleBinding Deployment *appsv1.Deployment }
type Runnable ¶
Runnable is the type of cobra.Command.Run
func ToRunnableArgs ¶
ToRunnableArgs adapts functions to Runnable