Documentation ¶
Index ¶
- Constants
- func CapabilityCommandGroup(c types.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func CheckCapabilityReady(ctx context.Context, c types.Args, timeout time.Duration) error
- func CheckVelaRuntimeInstalledAndReady(ioStreams cmdutil.IOStreams, c client.Client) (bool, error)
- func CreateOrUpdateEnv(ctx context.Context, c client.Client, envArgs *types.EnvMeta, args []string, ...) error
- func DeleteEnv(ctx context.Context, args []string, ioStreams cmdutil.IOStreams) error
- func GetCapabilityByName(name string, workloads []types.Capability) (types.Capability, error)
- func GetCompMeta(deployed []apis.ComponentMeta, appName, compName string) (apis.ComponentMeta, bool)
- func GetEnv(cmd *cobra.Command) (*types.EnvMeta, error)
- func GetOAMReleaseVersion(ns string) (string, error)
- func InstallOamRuntime(chartPath, chartSource string, vals map[string]interface{}, ...) error
- func ListConfigs(ioStreams cmdutil.IOStreams, cmd *cobra.Command) error
- func ListEnvs(args []string, ioStreams cmdutil.IOStreams) error
- func NewAdminInfoCommand(ioStreams cmdutil.IOStreams) *cobra.Command
- func NewAppStatusCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewCapCenterConfigCommand(ioStreams cmdutil.IOStreams) *cobra.Command
- func NewCapCenterListCommand(ioStreams cmdutil.IOStreams) *cobra.Command
- func NewCapCenterRemoveCommand(ioStreams cmdutil.IOStreams) *cobra.Command
- func NewCapCenterSyncCommand(ioStreams cmdutil.IOStreams) *cobra.Command
- func NewCapInstallCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewCapListCommand(ioStreams cmdutil.IOStreams) *cobra.Command
- func NewCapUninstallCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewCapabilityShowCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewCenterCommand(ioStream cmdutil.IOStreams) *cobra.Command
- func NewCommand() *cobra.Command
- func NewCompletionCommand() *cobra.Command
- func NewConfigCommand(io cmdutil.IOStreams) *cobra.Command
- func NewConfigDeleteCommand(io cmdutil.IOStreams) *cobra.Command
- func NewConfigGetCommand(io cmdutil.IOStreams) *cobra.Command
- func NewConfigListCommand(io cmdutil.IOStreams) *cobra.Command
- func NewConfigSetCommand(io cmdutil.IOStreams) *cobra.Command
- func NewDashboardCommand(c types.Args, ioStreams cmdutil.IOStreams, frontendSource string) *cobra.Command
- func NewDeleteCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewDryRunCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewEnvCommand(c types.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func NewEnvDeleteCommand(ioStreams cmdutil.IOStreams) *cobra.Command
- func NewEnvInitCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewEnvListCommand(ioStream cmdutil.IOStreams) *cobra.Command
- func NewEnvSetCommand(ioStreams cmdutil.IOStreams) *cobra.Command
- func NewExecCommand(c types.Args, ioStreams util.IOStreams) *cobra.Command
- func NewExportCommand(c types.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func NewInitCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewInstallCommand(c types.Args, chartContent string, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewListCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewLogsCommand(c types.Args, ioStreams util.IOStreams) *cobra.Command
- func NewPortForwardCommand(c types.Args, ioStreams util.IOStreams) *cobra.Command
- func NewTemplateCommand(ioStream cmdutil.IOStreams) *cobra.Command
- func NewTemplateContextCommand(ioStream cmdutil.IOStreams) *cobra.Command
- func NewTraitsCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewUpCommand(c types.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func NewVersionCommand() *cobra.Command
- func NewWorkloadsCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func OpenBrowser(url string) error
- func PrintHelpByTag(cmd *cobra.Command, all []*cobra.Command, tag string)
- func PrintTrackVelaRuntimeStatus(ctx context.Context, c client.Client, ioStreams cmdutil.IOStreams, ...) (bool, error)
- func RefreshDefinitions(ctx context.Context, c types.Args, ioStreams cmdutil.IOStreams, ...) error
- func SetEnv(args []string, ioStreams cmdutil.IOStreams) error
- func SetupAPIServer(c types.Args, cmd *cobra.Command, o Options) error
- func SystemCommandGroup(c types.Args, ioStream cmdutil.IOStreams) *cobra.Command
- type Args
- type CompStatus
- type HealthStatus
- type Options
- type ScopeHealthCondition
- type VelaExecOptions
- type VelaPortForwardOptions
- type VelaRuntimeStatus
- type WorkloadHealthCondition
Constants ¶
const ( App = "app" Service = "svc" )
constants used in `svc` command
const ( // SideBar file name for docsify SideBar = "_sidebar.md" NavBar = "_navbar.md" // IndexHTML file name for docsify IndexHTML = "index.html" // CSS file name for custom CSS CSS = "custom.css" // README file name for docsify README = "README.md" )
const ( // HealthStatusHealthy represents healthy status. HealthStatusHealthy = v1alpha2.StatusHealthy // HealthStatusUnhealthy represents unhealthy status. HealthStatusUnhealthy = v1alpha2.StatusUnhealthy // HealthStatusUnknown represents unknown status. HealthStatusUnknown = v1alpha2.StatusUnknown )
const ( ErrNotLoadAppConfig = "cannot load the application" ErrFmtNotInitialized = "service: %s not ready" ErrServiceNotFound = "service %s not found in app" )
Error msg used in `status` command
const (
// Port is the port for reference docs website
Port = ":18081"
)
Variables ¶
This section is empty.
Functions ¶
func CapabilityCommandGroup ¶
CapabilityCommandGroup commands for capability center
func CheckCapabilityReady ¶ added in v0.1.1
CheckCapabilityReady waits unitl capability is installed successfully
func CheckVelaRuntimeInstalledAndReady ¶ added in v0.0.8
CheckVelaRuntimeInstalledAndReady checks whether vela-core runtime is installed and ready
func CreateOrUpdateEnv ¶
func CreateOrUpdateEnv(ctx context.Context, c client.Client, envArgs *types.EnvMeta, args []string, ioStreams cmdutil.IOStreams) error
CreateOrUpdateEnv creates or updates an environment
func GetCapabilityByName ¶ added in v0.0.7
func GetCapabilityByName(name string, workloads []types.Capability) (types.Capability, error)
GetCapabilityByName get eponymous types.Capability from workloads by name
func GetCompMeta ¶
func GetCompMeta(deployed []apis.ComponentMeta, appName, compName string) (apis.ComponentMeta, bool)
GetCompMeta gets meta of a component
func GetEnv ¶
GetEnv gets environment by name or current environment if no env exists, then init default environment
func GetOAMReleaseVersion ¶
GetOAMReleaseVersion gets version of vela-core runtime helm release
func InstallOamRuntime ¶
func InstallOamRuntime(chartPath, chartSource string, vals map[string]interface{}, ioStreams cmdutil.IOStreams) error
InstallOamRuntime installs vela-core runtime from helm chart
func ListConfigs ¶ added in v0.0.9
ListConfigs will list all configs
func NewAdminInfoCommand ¶
NewAdminInfoCommand creates `system info` command
func NewAppStatusCommand ¶
NewAppStatusCommand creates `status` command for showing status
func NewCapCenterConfigCommand ¶
NewCapCenterConfigCommand Configure (add if not exist) a capability center, default is local (built-in capabilities)
func NewCapCenterListCommand ¶
NewCapCenterListCommand List all capability centers
func NewCapCenterRemoveCommand ¶
NewCapCenterRemoveCommand Remove specified capability center
func NewCapCenterSyncCommand ¶
NewCapCenterSyncCommand Sync capabilities from remote center, default to sync all centers
func NewCapInstallCommand ¶ added in v0.0.9
NewCapInstallCommand Install capability into cluster
func NewCapListCommand ¶
NewCapListCommand List capabilities from cap-center
func NewCapUninstallCommand ¶ added in v0.0.9
NewCapUninstallCommand Uninstall capability from cluster
func NewCapabilityShowCommand ¶ added in v0.3.3
NewCapabilityShowCommand shows the reference doc for a workload type or trait
func NewCenterCommand ¶
NewCenterCommand Manage Capability Center
func NewCommand ¶ added in v0.0.8
NewCommand will contain all commands
func NewCompletionCommand ¶
NewCompletionCommand Output shell completion code for the specified shell (bash or zsh)
func NewConfigCommand ¶ added in v0.0.9
NewConfigCommand will create command for config management for AppFile
func NewConfigDeleteCommand ¶ added in v0.0.9
NewConfigDeleteCommand delete a config from local
func NewConfigGetCommand ¶ added in v0.0.9
NewConfigGetCommand get config from local
func NewConfigListCommand ¶ added in v0.0.9
NewConfigListCommand list all created configs
func NewConfigSetCommand ¶ added in v0.0.9
NewConfigSetCommand set a config data in local
func NewDashboardCommand ¶
func NewDashboardCommand(c types.Args, ioStreams cmdutil.IOStreams, frontendSource string) *cobra.Command
NewDashboardCommand creates `dashboard` command and its nested children commands
func NewDeleteCommand ¶
NewDeleteCommand Delete App
func NewDryRunCommand ¶ added in v0.3.1
NewDryRunCommand creates `dry-run` command
func NewEnvCommand ¶
NewEnvCommand creates `env` command and its nested children
func NewEnvDeleteCommand ¶
NewEnvDeleteCommand creates `env delete` command for deleting environments
func NewEnvInitCommand ¶
NewEnvInitCommand creates `env init` command for initializing environments
func NewEnvListCommand ¶
NewEnvListCommand creates `env list` command for listing all environments
func NewEnvSetCommand ¶ added in v0.0.3
NewEnvSetCommand creates `env set` command for setting current environment
func NewExecCommand ¶ added in v0.0.9
NewExecCommand creates `exec` command
func NewExportCommand ¶ added in v0.2.0
NewExportCommand will create command for exporting deploy manifests from an AppFile
func NewInitCommand ¶ added in v0.0.7
NewInitCommand creates `init` command
func NewInstallCommand ¶
func NewInstallCommand(c types.Args, chartContent string, ioStreams cmdutil.IOStreams) *cobra.Command
NewInstallCommand creates `install` command
func NewListCommand ¶ added in v0.0.9
NewListCommand creates `ls` command and its nested children command
func NewLogsCommand ¶
NewLogsCommand creates `logs` command to tail logs of application
func NewPortForwardCommand ¶ added in v0.0.9
NewPortForwardCommand is vela port-forward command
func NewTemplateCommand ¶ added in v0.0.8
NewTemplateCommand creates `template` command and its nested children command
func NewTemplateContextCommand ¶ added in v0.0.8
NewTemplateContextCommand creates `context` command
func NewTraitsCommand ¶
NewTraitsCommand creates `traits` command
func NewUpCommand ¶ added in v0.0.8
NewUpCommand will create command for applying an AppFile
func NewVersionCommand ¶ added in v0.0.8
NewVersionCommand print client version
func NewWorkloadsCommand ¶
NewWorkloadsCommand creates `workloads` command
func OpenBrowser ¶
OpenBrowser will open browser by url in different OS system nolint:gosec
func PrintHelpByTag ¶ added in v0.0.8
PrintHelpByTag print custom defined help message
func PrintTrackVelaRuntimeStatus ¶ added in v0.0.8
func PrintTrackVelaRuntimeStatus(ctx context.Context, c client.Client, ioStreams cmdutil.IOStreams, trackTimeout time.Duration) (bool, error)
PrintTrackVelaRuntimeStatus prints status of installing vela-core runtime
func RefreshDefinitions ¶
func RefreshDefinitions(ctx context.Context, c types.Args, ioStreams cmdutil.IOStreams, silentOutput, enforceRefresh bool) error
RefreshDefinitions will sync local capabilities with cluster installed ones
func SetupAPIServer ¶
SetupAPIServer starts a RESTfulAPI server
Types ¶
type CompStatus ¶ added in v0.0.8
type CompStatus int
CompStatus represents the status of a component during "vela init"
type HealthStatus ¶
type HealthStatus = v1alpha2.HealthStatus
HealthStatus represents health status strings.
const ( // HealthStatusNotDiagnosed means there's no health scope referred or unknown health status returned HealthStatusNotDiagnosed HealthStatus = "NOT DIAGNOSED" )
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options creates options for `dashboard` command
func (*Options) GetStaticPath ¶
GetStaticPath gets the path of front-end directory
type ScopeHealthCondition ¶
type ScopeHealthCondition = v1alpha2.ScopeHealthCondition
ScopeHealthCondition holds health condition of a scope
type VelaExecOptions ¶ added in v0.0.9
type VelaExecOptions struct { Cmd *cobra.Command Args []string Stdin bool TTY bool ServiceName string context.Context VelaC types.Args Env *types.EnvMeta App *api.Application ClientSet kubernetes.Interface // contains filtered or unexported fields }
VelaExecOptions creates options for `exec` command
func (*VelaExecOptions) Complete ¶ added in v0.0.9
func (o *VelaExecOptions) Complete() error
Complete loads data from the command environment
func (*VelaExecOptions) Init ¶ added in v0.0.9
Init prepares the arguments accepted by the Exec command
func (*VelaExecOptions) Run ¶ added in v0.0.9
func (o *VelaExecOptions) Run() error
Run executes a validated remote execution against a pod
type VelaPortForwardOptions ¶ added in v0.0.9
type VelaPortForwardOptions struct { Cmd *cobra.Command Args []string context.Context VelaC types.Args Env *types.EnvMeta App *api.Application ClientSet kubernetes.Interface Client client.Client // contains filtered or unexported fields }
VelaPortForwardOptions for vela port-forward
func (*VelaPortForwardOptions) Complete ¶ added in v0.0.9
func (o *VelaPortForwardOptions) Complete() error
Complete will complete the config of port-forward
func (*VelaPortForwardOptions) Init ¶ added in v0.0.9
func (o *VelaPortForwardOptions) Init(ctx context.Context, cmd *cobra.Command, argsIn []string) error
Init will initialize
func (*VelaPortForwardOptions) Run ¶ added in v0.0.9
func (o *VelaPortForwardOptions) Run() error
Run will execute port-forward
type VelaRuntimeStatus ¶ added in v0.0.8
type VelaRuntimeStatus int
VelaRuntimeStatus enums vela-core runtime status
const ( NotFound VelaRuntimeStatus = iota Pending Ready Error )
Enums of VelaRuntimeStatus
type WorkloadHealthCondition ¶
type WorkloadHealthCondition = v1alpha2.WorkloadHealthCondition
WorkloadHealthCondition holds health status of any resource