Documentation
¶
Index ¶
- Constants
- func AddCompCommands(c types.Args, ioStreams util.IOStreams) *cobra.Command
- func AddTraitCommands(parentCmd *cobra.Command, c types.Args, ioStreams cmdutil.IOStreams) error
- 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 GetRouteServiceName(appconfig *v1alpha2.ApplicationConfiguration, svcName string) string
- func GetWorkloadNameFromArgs(args []string) (string, error)
- func InstallOamRuntime(chartPath, chartSource string, vals map[string]interface{}, ...) error
- func ListCapCenters(args []string, ioStreams cmdutil.IOStreams) 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 NewAppShowCommand(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 NewCenterCommand(c types.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func NewCommand() *cobra.Command
- func NewCompDeployCommands(c types.Args, ioStreams util.IOStreams) *cobra.Command
- func NewCompletionCommand() *cobra.Command
- func NewConfigCommand(args types.Args, 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 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 velacmdutil.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 cmdutil.IOStreams) *cobra.Command
- func NewPortForwardCommand(c types.Args, ioStreams velacmdutil.IOStreams) *cobra.Command
- func NewTemplateCommand(c types.Args, 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 RemoveCapCenter(args []string, 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 AppfileOptions
- type Args
- type CompStatus
- type HealthStatus
- type Options
- type ScopeHealthCondition
- type VelaExecOptions
- type VelaPortForwardOptions
- type VelaRuntimeStatus
- type WorkloadHealthCondition
Constants ¶
View Source
const (
Staging = "staging"
App = "app"
WorkloadType = "type"
TraitDetach = "detach"
Service = "svc"
)
View Source
const (
// HealthStatusHealthy represents healthy status.
HealthStatusHealthy = v1alpha2.StatusHealthy
// HealthStatusUnhealthy represents unhealthy status.
HealthStatusUnhealthy = v1alpha2.StatusUnhealthy
// HealthStatusUnknown represents unknown status.
HealthStatusUnknown = v1alpha2.StatusUnknown
)
View Source
const (
ErrNotLoadAppConfig = "cannot load the application"
ErrFmtNotInitialized = "service: %s not ready"
ErrServiceNotFound = "service %s not found in app"
)
Variables ¶
This section is empty.
Functions ¶
func AddCompCommands ¶
func AddCompCommands(c types.Args, ioStreams util.IOStreams) *cobra.Command
func AddTraitCommands ¶
func AddTraitCommands(parentCmd *cobra.Command, c types.Args, ioStreams cmdutil.IOStreams) error
func CapabilityCommandGroup ¶
func CapabilityCommandGroup(c types.Args, ioStream cmdutil.IOStreams) *cobra.Command
func CheckCapabilityReady ¶ added in v0.1.1
func CheckCapabilityReady(ctx context.Context, c types.Args, timeout time.Duration) error
MUST wait to install capability succeed
func CheckVelaRuntimeInstalledAndReady ¶ added in v0.0.8
func CheckVelaRuntimeInstalledAndReady(ioStreams cmdutil.IOStreams, c client.Client) (bool, error)
func CreateOrUpdateEnv ¶
func CreateOrUpdateEnv(ctx context.Context, c client.Client, envArgs *types.EnvMeta, args []string, ioStreams cmdutil.IOStreams) error
func DeleteEnv ¶
func DeleteEnv(ctx context.Context, args []string, ioStreams cmdutil.IOStreams) error
func GetCapabilityByName ¶ added in v0.0.7
func GetCapabilityByName(name string, workloads []types.Capability) (types.Capability, error)
func GetCompMeta ¶
func GetCompMeta(deployed []apis.ComponentMeta, appName, compName string) (apis.ComponentMeta, bool)
func GetOAMReleaseVersion ¶
func GetOAMReleaseVersion(ns string) (string, error)
func GetRouteServiceName ¶ added in v0.1.1
func GetRouteServiceName(appconfig *v1alpha2.ApplicationConfiguration, svcName string) string
func GetWorkloadNameFromArgs ¶
func GetWorkloadNameFromArgs(args []string) (string, error)
func InstallOamRuntime ¶
func InstallOamRuntime(chartPath, chartSource string, vals map[string]interface{}, ioStreams cmdutil.IOStreams) error
func ListCapCenters ¶
func ListCapCenters(args []string, ioStreams cmdutil.IOStreams) error
func ListConfigs ¶ added in v0.0.9
func ListConfigs(ioStreams cmdutil.IOStreams, cmd *cobra.Command) error
func NewAdminInfoCommand ¶
func NewAdminInfoCommand(ioStreams cmdutil.IOStreams) *cobra.Command
func NewAppShowCommand ¶
func NewAppShowCommand(ioStreams cmdutil.IOStreams) *cobra.Command
func NewAppStatusCommand ¶
func NewAppStatusCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
func NewCapCenterConfigCommand ¶
func NewCapCenterConfigCommand(ioStreams cmdutil.IOStreams) *cobra.Command
func NewCapCenterListCommand ¶
func NewCapCenterListCommand(ioStreams cmdutil.IOStreams) *cobra.Command
func NewCapCenterRemoveCommand ¶
func NewCapCenterRemoveCommand(ioStreams cmdutil.IOStreams) *cobra.Command
func NewCapCenterSyncCommand ¶
func NewCapCenterSyncCommand(ioStreams cmdutil.IOStreams) *cobra.Command
func NewCapInstallCommand ¶ added in v0.0.9
func NewCapInstallCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
func NewCapListCommand ¶
func NewCapListCommand(ioStreams cmdutil.IOStreams) *cobra.Command
func NewCapUninstallCommand ¶ added in v0.0.9
func NewCapUninstallCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
func NewCenterCommand ¶
func NewCenterCommand(c types.Args, ioStream cmdutil.IOStreams) *cobra.Command
func NewCommand ¶ added in v0.0.8
func NewCommand() *cobra.Command
func NewCompDeployCommands ¶ added in v0.0.8
func NewCompDeployCommands(c types.Args, ioStreams util.IOStreams) *cobra.Command
func NewCompletionCommand ¶
func NewCompletionCommand() *cobra.Command
func NewConfigCommand ¶ added in v0.0.9
func NewConfigCommand(args types.Args, io cmdutil.IOStreams) *cobra.Command
func NewConfigDeleteCommand ¶ added in v0.0.9
func NewConfigDeleteCommand(io cmdutil.IOStreams) *cobra.Command
func NewConfigGetCommand ¶ added in v0.0.9
func NewConfigGetCommand(io cmdutil.IOStreams) *cobra.Command
func NewConfigListCommand ¶ added in v0.0.9
func NewConfigListCommand(io cmdutil.IOStreams) *cobra.Command
func NewConfigSetCommand ¶ added in v0.0.9
func NewConfigSetCommand(io cmdutil.IOStreams) *cobra.Command
func NewDashboardCommand ¶
func NewDashboardCommand(c types.Args, ioStreams cmdutil.IOStreams, frontendSource string) *cobra.Command
func NewDeleteCommand ¶
func NewDeleteCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
NewDeleteCommand Delete App
func NewEnvCommand ¶
func NewEnvCommand(c types.Args, ioStream cmdutil.IOStreams) *cobra.Command
func NewEnvDeleteCommand ¶
func NewEnvDeleteCommand(ioStreams cmdutil.IOStreams) *cobra.Command
func NewEnvInitCommand ¶
func NewEnvInitCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
func NewEnvListCommand ¶
func NewEnvListCommand(ioStream cmdutil.IOStreams) *cobra.Command
func NewEnvSetCommand ¶ added in v0.0.3
func NewEnvSetCommand(ioStreams cmdutil.IOStreams) *cobra.Command
func NewExecCommand ¶ added in v0.0.9
func NewExecCommand(c types.Args, ioStreams velacmdutil.IOStreams) *cobra.Command
func NewInitCommand ¶ added in v0.0.7
func NewInitCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
NewInitCommand init application
func NewInstallCommand ¶
func NewInstallCommand(c types.Args, chartContent string, ioStreams cmdutil.IOStreams) *cobra.Command
func NewListCommand ¶ added in v0.0.9
func NewListCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
func NewLogsCommand ¶
func NewLogsCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
func NewPortForwardCommand ¶ added in v0.0.9
func NewPortForwardCommand(c types.Args, ioStreams velacmdutil.IOStreams) *cobra.Command
func NewTemplateCommand ¶ added in v0.0.8
func NewTemplateCommand(c types.Args, ioStream cmdutil.IOStreams) *cobra.Command
func NewTemplateContextCommand ¶ added in v0.0.8
func NewTemplateContextCommand(ioStream cmdutil.IOStreams) *cobra.Command
func NewTraitsCommand ¶
func NewTraitsCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
func NewUpCommand ¶ added in v0.0.8
func NewUpCommand(c types.Args, ioStream cmdutil.IOStreams) *cobra.Command
func NewVersionCommand ¶ added in v0.0.8
func NewVersionCommand() *cobra.Command
func NewWorkloadsCommand ¶
func NewWorkloadsCommand(c types.Args, ioStreams cmdutil.IOStreams) *cobra.Command
func OpenBrowser ¶
func OpenBrowser(url string) error
OpenBrowser will open browser by url in different OS system
func PrintHelpByTag ¶ added in v0.0.8
func PrintHelpByTag(cmd *cobra.Command, all []*cobra.Command, tag string)
func PrintTrackVelaRuntimeStatus ¶ added in v0.0.8
func PrintTrackVelaRuntimeStatus(ctx context.Context, c client.Client, ioStreams cmdutil.IOStreams, trackTimeout time.Duration) (bool, error)
func RefreshDefinitions ¶
func RefreshDefinitions(ctx context.Context, c types.Args, ioStreams cmdutil.IOStreams, silentOutput bool) error
func RemoveCapCenter ¶
func RemoveCapCenter(args []string, ioStreams cmdutil.IOStreams) error
func SetupAPIServer ¶
func SetupAPIServer(c types.Args, cmd *cobra.Command, o Options) error
func SystemCommandGroup ¶
func SystemCommandGroup(c types.Args, ioStream cmdutil.IOStreams) *cobra.Command
Types ¶
type AppfileOptions ¶ added in v0.0.9
type AppfileOptions struct {
Kubecli client.Client
IO cmdutil.IOStreams
Env *types.EnvMeta
}
func (*AppfileOptions) ApplyAppConfig ¶ added in v0.0.9
func (o *AppfileOptions) ApplyAppConfig(ac *v1alpha2.ApplicationConfiguration, comps []*v1alpha2.Component, scopes []oam.Object) error
Apply deploy config resources for the app. It differs by create and update:
- for create, it displays app status along with information of url, metrics, ssh, logging.
- for update, it rolls out a canary deployment and prints its information. User can verify the canary deployment. This will wait for user approval. If approved, it continues upgrading the whole; otherwise, it would rollback.
type Args ¶ added in v0.0.8
type Args struct {
Output string
Env *types.EnvMeta
C types.Args
App *application.Application
}
func (*Args) Run ¶ added in v0.0.8
func (l *Args) Run(ctx context.Context, ioStreams cmdutil.IOStreams) error
Run refer to the implementation at https://github.com/oam-dev/stern/blob/master/stern/main.go
type CompStatus ¶ added in v0.0.8
type CompStatus int
CompStatus represents the status of a component during "vela init"
func TrackDeployStatus ¶ added in v0.0.9
func TrackDeployStatus(ctx context.Context, c client.Client, compName, appName string, env *types.EnvMeta) (CompStatus, string, error)
TrackDeployStatus will only check AppConfig is deployed successfully,
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
}
func (*Options) GetStaticPath ¶
func (o *Options) GetStaticPath() error
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
context.Context
VelaC types.Args
Env *types.EnvMeta
App *application.Application
ClientSet kubernetes.Interface
// contains filtered or unexported fields
}
type VelaPortForwardOptions ¶ added in v0.0.9
type VelaPortForwardOptions struct {
Cmd *cobra.Command
Args []string
context.Context
VelaC types.Args
Env *types.EnvMeta
App *application.Application
ClientSet kubernetes.Interface
Client client.Client
// contains filtered or unexported fields
}
func (*VelaPortForwardOptions) Complete ¶ added in v0.0.9
func (o *VelaPortForwardOptions) Complete() error
type VelaRuntimeStatus ¶ added in v0.0.8
type VelaRuntimeStatus int
const (
NotFound VelaRuntimeStatus = iota
Pending
Ready
Error
)
type WorkloadHealthCondition ¶
type WorkloadHealthCondition = v1alpha2.WorkloadHealthCondition
WorkloadHealthCondition holds health status of any resource
Source Files
¶
Click to show internal directories.
Click to hide internal directories.