Documentation ¶
Index ¶
- Constants
- func MultipleSourceComponents(fileName string, in io.Reader) ([]byte, error)
- func NewCancelCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewClusterCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewConnectCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCreateAccountCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCreateBackupCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCreateCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCreateRestoreCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewDeleteAccountCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewDeleteBackupCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewDeleteCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewDeleteOpsCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewDescAccountCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewDescribeCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewDescribeOpsCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewDescribeReconfigureCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewDiffConfigureCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewEditBackupPolicyCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewEditConfigureCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewExplainReconfigureCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewExposeCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewGrantOptions(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewHorizontalScalingCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewLabelCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewListAccountsCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewListBackupCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewListBackupPolicyCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewListCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewListComponentsCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewListEventsCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewListInstancesCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewListLogsCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewListOpsCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewLogsCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewReconfigureCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewRestartCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewRevokeOptions(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewStartCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewStopCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewUpdateCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewUpgradeCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewVerticalScalingCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewVolumeExpansionCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- type ConnectOptions
- type CreateBackupOptions
- type CreateOptions
- type CreateRestoreOptions
- type LabelOptions
- type ListBackupOptions
- type ListLogsOptions
- type LogsOptions
- type OperationsOptions
- type UpdatableFlags
Constants ¶
const (
CueTemplateName = "cluster_template.cue"
)
const (
EnvExperimentalExpose = "KBCLI_EXPERIMENTAL_EXPOSE"
)
Variables ¶
This section is empty.
Functions ¶
func MultipleSourceComponents ¶
MultipleSourceComponents gets component data from multiple source, such as stdin, URI and local file
func NewCancelCmd ¶ added in v0.6.0
func NewClusterCmd ¶
NewClusterCmd creates the cluster command
func NewConnectCmd ¶
NewConnectCmd returns the cmd of connecting to a cluster
func NewCreateAccountCmd ¶
func NewCreateBackupCmd ¶
func NewCreateCmd ¶
func NewCreateRestoreCmd ¶
func NewDeleteAccountCmd ¶
func NewDeleteBackupCmd ¶
func NewDeleteCmd ¶
func NewDeleteOpsCmd ¶
func NewDescAccountCmd ¶
func NewDescribeCmd ¶
func NewDescribeOpsCmd ¶
func NewDescribeReconfigureCmd ¶
func NewDescribeReconfigureCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
NewDescribeReconfigureCmd shows details of history modifications or configuration file of reconfiguring operations
func NewDiffConfigureCmd ¶
NewDiffConfigureCmd shows the difference between two configuration version.
func NewEditBackupPolicyCmd ¶
func NewEditConfigureCmd ¶
NewEditConfigureCmd shows the difference between two configuration version.
func NewExplainReconfigureCmd ¶
func NewExplainReconfigureCmd(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
NewExplainReconfigureCmd shows details of modifiable parameters.
func NewExposeCmd ¶
NewExposeCmd creates an expose command
func NewGrantOptions ¶
func NewHorizontalScalingCmd ¶
NewHorizontalScalingCmd creates a horizontal scaling command
func NewLabelCmd ¶
func NewListAccountsCmd ¶
func NewListBackupCmd ¶
func NewListBackupPolicyCmd ¶
func NewListCmd ¶
func NewListComponentsCmd ¶
func NewListEventsCmd ¶
func NewListInstancesCmd ¶
func NewListLogsCmd ¶
func NewListOpsCmd ¶
func NewLogsCmd ¶
NewLogsCmd returns the logic of accessing cluster log file
func NewReconfigureCmd ¶
NewReconfigureCmd creates a Reconfiguring command
func NewRestartCmd ¶
NewRestartCmd creates a restart command
func NewRevokeOptions ¶
func NewStartCmd ¶
NewStartCmd creates a start command
func NewStopCmd ¶
NewStopCmd creates a stop command
func NewUpdateCmd ¶
func NewUpgradeCmd ¶
NewUpgradeCmd creates an upgrade command
func NewVerticalScalingCmd ¶
NewVerticalScalingCmd creates a vertical scaling command
func NewVolumeExpansionCmd ¶
NewVolumeExpansionCmd creates a volume expanding command
Types ¶
type ConnectOptions ¶
type ConnectOptions struct { *exec.ExecOptions // contains filtered or unexported fields }
type CreateBackupOptions ¶
type CreateBackupOptions struct { BackupType string `json:"backupType"` BackupName string `json:"backupName"` Role string `json:"role,omitempty"` BackupPolicy string `json:"backupPolicy"` create.CreateOptions `json:"-"` }
func (*CreateBackupOptions) CompleteBackup ¶ added in v0.6.0
func (o *CreateBackupOptions) CompleteBackup() error
func (*CreateBackupOptions) Validate ¶
func (o *CreateBackupOptions) Validate() error
type CreateOptions ¶
type CreateOptions struct { // ClusterDefRef reference clusterDefinition ClusterDefRef string `json:"clusterDefRef"` ClusterVersionRef string `json:"clusterVersionRef"` Tolerations []interface{} `json:"tolerations,omitempty"` ComponentSpecs []map[string]interface{} `json:"componentSpecs"` Annotations map[string]string `json:"annotations,omitempty"` SetFile string `json:"-"` Values []string `json:"-"` // backup name to restore in creation Backup string `json:"backup,omitempty"` RestoreTime string `json:"restoreTime,omitempty"` SourceCluster string `json:"sourceCluster,omitempty"` UpdatableFlags create.CreateOptions `json:"-"` // contains filtered or unexported fields }
func NewCreateOptions ¶ added in v0.6.0
func NewCreateOptions(f cmdutil.Factory, streams genericclioptions.IOStreams) *CreateOptions
func (*CreateOptions) CleanUp ¶
func (o *CreateOptions) CleanUp() error
func (*CreateOptions) Complete ¶
func (o *CreateOptions) Complete() error
func (*CreateOptions) CreateDependencies ¶
func (o *CreateOptions) CreateDependencies(dryRun []string) error
func (*CreateOptions) PreCreate ¶
func (o *CreateOptions) PreCreate(obj *unstructured.Unstructured) error
PreCreate before saving yaml to k8s, makes changes on Unstructured yaml
func (*CreateOptions) Validate ¶
func (o *CreateOptions) Validate() error
type CreateRestoreOptions ¶
type CreateRestoreOptions struct { // backup name to restore in creation Backup string `json:"backup,omitempty"` // point in time recovery args RestoreTime *time.Time `json:"restoreTime,omitempty"` RestoreTimeStr string `json:"restoreTimeStr,omitempty"` SourceCluster string `json:"sourceCluster,omitempty"` create.CreateOptions `json:"-"` }
func (*CreateRestoreOptions) Run ¶
func (o *CreateRestoreOptions) Run() error
func (*CreateRestoreOptions) Validate ¶
func (o *CreateRestoreOptions) Validate() error
type LabelOptions ¶
type LabelOptions struct { Factory cmdutil.Factory GVR schema.GroupVersionResource genericclioptions.IOStreams // contains filtered or unexported fields }
func NewLabelOptions ¶
func NewLabelOptions(f cmdutil.Factory, streams genericclioptions.IOStreams, gvr schema.GroupVersionResource) *LabelOptions
type ListBackupOptions ¶
type ListBackupOptions struct { *list.ListOptions BackupName string }
type ListLogsOptions ¶
type ListLogsOptions struct { genericclioptions.IOStreams // contains filtered or unexported fields }
ListLogsOptions declares the arguments accepted by the list-logs command
func (*ListLogsOptions) Complete ¶
func (o *ListLogsOptions) Complete(f cmdutil.Factory, args []string) error
func (*ListLogsOptions) Run ¶
func (o *ListLogsOptions) Run() error
func (*ListLogsOptions) Validate ¶
func (o *ListLogsOptions) Validate(args []string) error
type LogsOptions ¶
type LogsOptions struct { *exec.ExecOptions // contains filtered or unexported fields }
LogsOptions declares the arguments accepted by the logs command
type OperationsOptions ¶
type OperationsOptions struct { create.CreateOptions `json:"-"` HasComponentNamesFlag bool `json:"-"` ComponentNames []string `json:"componentNames,omitempty"` OpsRequestName string `json:"opsRequestName"` TTLSecondsAfterSucceed int `json:"ttlSecondsAfterSucceed"` // OpsType operation type OpsType appsv1alpha1.OpsType `json:"type"` // OpsTypeLower lower OpsType OpsTypeLower string `json:"typeLower"` // Upgrade options ClusterVersionRef string `json:"clusterVersionRef"` // VerticalScaling options CPU string `json:"cpu"` Memory string `json:"memory"` Class string `json:"class"` // HorizontalScaling options Replicas int `json:"replicas"` // Reconfiguring options KeyValues map[string]string `json:"keyValues"` CfgTemplateName string `json:"cfgTemplateName"` CfgFile string `json:"cfgFile"` // VolumeExpansion options. // VCTNames VolumeClaimTemplate names VCTNames []string `json:"vctNames,omitempty"` Storage string `json:"storage"` // Expose options ExposeType string `json:"-"` ExposeEnabled string `json:"-"` Services []appsv1alpha1.ClusterComponentService `json:"services,omitempty"` // contains filtered or unexported fields }
func (*OperationsOptions) CompleteComponentsFlag ¶
func (o *OperationsOptions) CompleteComponentsFlag() error
CompleteComponentsFlag when components flag is null and the cluster only has one component, auto complete it.
func (*OperationsOptions) CompleteRestartOps ¶
func (o *OperationsOptions) CompleteRestartOps() error
CompleteRestartOps restarts all components of the cluster we should set all component names to ComponentNames flag.
func (*OperationsOptions) Validate ¶
func (o *OperationsOptions) Validate() error
Validate command flags or args is legal
type UpdatableFlags ¶
type UpdatableFlags struct { // Options for cluster termination policy TerminationPolicy string `json:"terminationPolicy"` // Add-on switches for cluster observability Monitor bool `json:"monitor"` EnableAllLogs bool `json:"enableAllLogs"` // Configuration and options for cluster affinity and tolerations PodAntiAffinity string `json:"podAntiAffinity"` // TopologyKeys if TopologyKeys is nil, add omitempty json tag, because CueLang can not covert null to list. TopologyKeys []string `json:"topologyKeys,omitempty"` NodeLabels map[string]string `json:"nodeLabels,omitempty"` Tenancy string `json:"tenancy"` TolerationsRaw []string `json:"-"` }
UpdatableFlags is the flags that cat be updated by update command