Documentation ¶
Index ¶
- Constants
- Variables
- func AdditionalEndpointPrinter(ctx context.Context, c common.Args, k8sClient client.Client, name string, ...)
- func AuthCommandGroup(f velacmd.Factory, streams util.IOStreams) *cobra.Command
- func ClusterCommandGroup(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func CreateEnv(envArgs *types.EnvMeta, args []string, ioStreams cmdutil.IOStreams) error
- func DefinitionCommandGroup(c common.Args, order string) *cobra.Command
- func DeleteEnv(args []string, ioStreams cmdutil.IOStreams) error
- func DryRunApplication(cmdOption *DryRunCmdOptions, c common.Args, namespace string) (bytes.Buffer, error)
- func GetCapabilityByName(name string, workloads []types.Capability) (types.Capability, error)
- func GetFlagEnvOrCurrent(cmd *cobra.Command, args common.Args) (*types.EnvMeta, error)
- func GetFlagNamespaceOrEnv(cmd *cobra.Command, args common.Args) (string, error)
- func GetOAMReleaseVersion(ns string) (string, error)
- func GetServiceEndpoints(ctx context.Context, client client.Client, appName string, namespace string, ...) ([]querytypes.ServiceEndpoint, error)
- func InstallCompByNameFromRegistry(args common2.Args, ioStream cmdutil.IOStreams, compName string, ...) error
- func InstallTraitByNameFromRegistry(args common2.Args, ioStream cmdutil.IOStreams, traitName string, ...) error
- func KubeCommandGroup(f velacmd.Factory, streams util.IOStreams) *cobra.Command
- func ListEnvs(args []string, ioStreams cmdutil.IOStreams) error
- func ListRegistryConfig() ([]apis.RegistryConfig, error)
- func LiveDiffApplication(cmdOption *LiveDiffCmdOptions, c common.Args) (bytes.Buffer, error)
- func MakeVelaQL(view string, params map[string]string, action string) string
- func NewAddAddonRegistryCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewAddonCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewAddonDisableCommand(c common.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func NewAddonEnableCommand(c common.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func NewAddonListCommand(c common.Args) *cobra.Command
- func NewAddonPackageCommand(c common.Args) *cobra.Command
- func NewAddonRegistryCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewAddonStatusCommand(c common.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func NewAddonUpgradeCommand(c common.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func NewAppStatusCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewCUEPackageCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewCapabilityShowCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewClusterAddLabelsCommand(c *common.Args) *cobra.Command
- func NewClusterAliasCommand(c *common.Args) *cobra.Command
- func NewClusterDelLabelsCommand(c *common.Args) *cobra.Command
- func NewClusterDetachCommand(c *common.Args) *cobra.Command
- func NewClusterJoinCommand(c *common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewClusterLabelCommandGroup(c *common.Args) *cobra.Command
- func NewClusterListCommand(c *common.Args) *cobra.Command
- func NewClusterProbeCommand(c *common.Args) *cobra.Command
- func NewClusterRenameCommand(c *common.Args) *cobra.Command
- func NewCommand() *cobra.Command
- func NewCommandWithIOStreams(ioStream util.IOStreams) *cobra.Command
- func NewCompGetCommand(c common2.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewCompletionCommand() *cobra.Command
- func NewComponentsCommand(c common2.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewDebugCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewDefinitionApplyCommand(c common.Args) *cobra.Command
- func NewDefinitionDelCommand(c common.Args) *cobra.Command
- func NewDefinitionEditCommand(c common.Args) *cobra.Command
- func NewDefinitionGenAPICommand(c common.Args) *cobra.Command
- func NewDefinitionGenDocCommand(c common.Args) *cobra.Command
- func NewDefinitionGetCommand(c common.Args) *cobra.Command
- func NewDefinitionInitCommand(c common.Args) *cobra.Command
- func NewDefinitionListCommand(c common.Args) *cobra.Command
- func NewDefinitionRenderCommand(c common.Args) *cobra.Command
- func NewDefinitionValidateCommand(c common.Args) *cobra.Command
- func NewDeleteAddonRegistryCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewDeleteCommand(c common2.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewDryRunCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewEnvCommand(c common.Args, order string, ioStream cmdutil.IOStreams) *cobra.Command
- func NewEnvDeleteCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewEnvInitCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewEnvListCommand(c common.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func NewEnvSetCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewExecCommand(c common.Args, order string, ioStreams util.IOStreams) *cobra.Command
- func NewExportCommand(c common2.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func NewGenKubeConfigCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command
- func NewGetAddonRegistryCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewGrantPrivilegesCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command
- func NewHelpCommand() *cobra.Command
- func NewInitCommand(c common2.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewInstallCommand(c common.Args, order string, ioStreams util.IOStreams) *cobra.Command
- func NewKubeApplyCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command
- func NewKubeDeleteCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command
- func NewListAddonRegistryCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewListCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewListPrivilegesCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command
- func NewLiveDiffCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewLogsCommand(c common.Args, order string, ioStreams util.IOStreams) *cobra.Command
- func NewPortForwardCommand(c common.Args, order string, ioStreams util.IOStreams) *cobra.Command
- func NewProviderCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewProviderListCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewQlCommand(c common.Args, order string, ioStreams util.IOStreams) *cobra.Command
- func NewRegistryCommand(ioStream cmdutil.IOStreams, order string) *cobra.Command
- func NewRegistryConfigCommand(ioStreams cmdutil.IOStreams) *cobra.Command
- func NewRegistryListCommand(ioStreams cmdutil.IOStreams) *cobra.Command
- func NewRegistryRemoveCommand(ioStreams cmdutil.IOStreams) *cobra.Command
- func NewRevisionListCommand(c common.Args) *cobra.Command
- func NewTemplateCommand(ioStream cmdutil.IOStreams) *cobra.Command
- func NewTemplateContextCommand(ioStream cmdutil.IOStreams) *cobra.Command
- func NewTraitCommand(c common2.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewTraitGetCommand(c common2.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewUISchemaCommand(c common.Args, order string, ioStreams util.IOStreams) *cobra.Command
- func NewUnInstallCommand(c common.Args, order string, ioStreams util.IOStreams) *cobra.Command
- func NewUpCommand(f velacmd.Factory, order string, c utilcommon.Args, ioStream util.IOStreams) *cobra.Command
- func NewUpdateAddonRegistryCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewVersionCommand(ioStream util.IOStreams) *cobra.Command
- func NewVersionListCommand(ioStream util.IOStreams) *cobra.Command
- func NewWorkflowCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewWorkflowRestartCommand(c common.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func NewWorkflowResumeCommand(c common.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func NewWorkflowRollbackCommand(c common.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func NewWorkflowSuspendCommand(c common.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func NewWorkflowTerminateCommand(c common.Args, ioStream cmdutil.IOStreams) *cobra.Command
- func NewWorkloadsCommand(c common2.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func OpenBrowser(url string) error
- func ParseCapability(mapper discoverymapper.DiscoveryMapper, data []byte) (types.Capability, error)
- func PrintComponentListFromRegistry(registry Registry, ioStreams cmdutil.IOStreams, filter filterFunc) error
- func PrintHelpByTag(cmd *cobra.Command, all []*cobra.Command, tag string)
- func PrintInstalledCompDef(c common2.Args, io cmdutil.IOStreams, filter filterFunc) error
- func PrintInstalledTraitDef(c common2.Args, io cmdutil.IOStreams, filter filterFunc) error
- func PrintTraitListFromRegistry(registry Registry, ioStreams cmdutil.IOStreams, filter filterFunc) error
- func QueryValue(ctx context.Context, client client.Client, velaC common.Args, velaQL string) (*value.Value, error)
- func ReadObjectsFromFile(path string) ([]oam.Object, error)
- func RevisionCommandGroup(c common.Args) *cobra.Command
- func RunHelp(cmd *cobra.Command, args []string)
- func SetEnv(args []string, ioStreams cmdutil.IOStreams) error
- func ShowReferenceConsole(ctx context.Context, c common.Args, ioStreams cmdutil.IOStreams, ...) error
- func StoreRepos(registries []apis.RegistryConfig) error
- func TerminateWorkflow(kubecli client.Client, app *v1beta1.Application) error
- func TransAddonName(name string) string
- type Args
- type CompStatus
- type Content
- type DryRunCmdOptions
- type Filter
- type GenKubeConfigOptions
- type GithubContent
- type GithubRegistry
- type GrantPrivilegesOptions
- type HealthStatus
- type InstallArgs
- type KubeApplyOptions
- type KubeDeleteOptions
- type ListBucketResult
- type ListPrivilegesOptions
- type LiveDiffCmdOptions
- type LocalContent
- type LocalRegistry
- type OssContent
- type OssRegistry
- type PrintList
- type Printable
- type ProviderMeta
- type Registry
- type RegistryFile
- type ScopeHealthCondition
- type UnInstallArgs
- type UpCommandOptions
- type UserInput
- type UserInputOptions
- type VelaExecOptions
- type VelaPortForwardOptions
- type WorkloadHealthCondition
Constants ¶
const ( // DescAnnotation records the description of addon DescAnnotation = "addons.oam.dev/description" // DependsOnWorkFlowStepName is workflow step name which is used to check dependsOn app DependsOnWorkFlowStepName = "depends-on-app" // AddonTerraformProviderNamespace is the namespace of addon terraform provider AddonTerraformProviderNamespace = "default" // AddonTerraformProviderNameArgument is the argument name of addon terraform provider AddonTerraformProviderNameArgument = "providerName" )
const ( // FlagClusterName specifies the cluster name FlagClusterName = "name" // FlagClusterManagementEngine specifies the cluster management type, eg: ocm FlagClusterManagementEngine = "engine" // FlagKubeConfigPath specifies the kubeconfig path FlagKubeConfigPath = "kubeconfig-path" // FlagInClusterBootstrap prescribes the cluster registration to use the internal // IP from the kube-public/cluster-info configmap, otherwise the endpoint in the // hub kubeconfig will be used for registration. FlagInClusterBootstrap = "in-cluster-boostrap" // CreateNamespace specifies the namespace need to create in managedCluster CreateNamespace = "create-namespace" )
const ( App = "app" Service = "svc" Namespace = "namespace" // FlagDescription command flag to specify the description of the definition FlagDescription = "desc" // FlagDryRun command flag to disable actual changes and only display intend changes FlagDryRun = "dry-run" // FlagTemplateYAML command flag to specify which existing template YAML file to use FlagTemplateYAML = "template-yaml" // FlagOutput command flag to specify which file to save FlagOutput = "output" // FlagMessage command flag to specify which file to save FlagMessage = "message" // FlagType command flag to specify which definition type to use FlagType = "type" // FlagProvider command flag to specify which provider the cloud resource definition belongs to. Only `alibaba`, `aws`, `azure` are supported. FlagProvider = "provider" // FlagGit command flag to specify which git repository the configuration(HCL) is stored in FlagGit = "git" // FlagLocal command flag to specify the local path of Terraform module or resource HCL file FlagLocal = "local" // FlagPath command flag to specify which path the configuration(HCL) is stored in the Git repository FlagPath = "path" // FlagNamespace command flag to specify which namespace to use FlagNamespace = "namespace" // FlagInteractive command flag to specify the use of interactive process FlagInteractive = "interactive" )
constants used in `svc` command
const ( // HelmChartNamespacePlaceholder is used as a placeholder for rendering definitions into helm chart format HelmChartNamespacePlaceholder = "###HELM_NAMESPACE###" // HelmChartFormatEnvName is the name of the environment variable to enable render helm chart format YAML HelmChartFormatEnvName = "AS_HELM_CHART" )
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 DefaultRegistry = "default"
DefaultRegistry is default registry
const (
// ErrNotLoadAppConfig display the error message load
ErrNotLoadAppConfig = "cannot load the application"
)
Error msg used in `status` command
const (
// Port is the port for reference docs website
Port = ":18081"
)
const TypeGithub = "github"
TypeGithub represents github
const TypeLocal = "local"
TypeLocal represents github
const TypeOss = "oss"
TypeOss represent oss
const TypeUnknown = "unknown"
TypeUnknown represents parse failed
Variables ¶
var AllNamespace bool
AllNamespace list app in all namespaces
Functions ¶
func AdditionalEndpointPrinter ¶ added in v1.2.0
func AdditionalEndpointPrinter(ctx context.Context, c common.Args, k8sClient client.Client, name string, isUpgrade bool)
AdditionalEndpointPrinter will print endpoints
func AuthCommandGroup ¶ added in v1.4.0
AuthCommandGroup commands for create resources or configuration
func ClusterCommandGroup ¶ added in v1.1.1
ClusterCommandGroup create a group of cluster command
func DefinitionCommandGroup ¶ added in v1.1.0
DefinitionCommandGroup create the command group for `vela def` command to manage definitions
func DryRunApplication ¶ added in v1.0.3
func DryRunApplication(cmdOption *DryRunCmdOptions, c common.Args, namespace string) (bytes.Buffer, error)
DryRunApplication will dry-run an application and return the render result
func GetCapabilityByName ¶
func GetCapabilityByName(name string, workloads []types.Capability) (types.Capability, error)
GetCapabilityByName get eponymous types.Capability from workloads by name
func GetFlagEnvOrCurrent ¶ added in v1.1.4
GetFlagEnvOrCurrent gets environment by name or current environment if no env exists, return default namespace as env
func GetFlagNamespaceOrEnv ¶ added in v1.1.10
GetFlagNamespaceOrEnv will get env and namespace flag, namespace flag takes the priority
func GetOAMReleaseVersion ¶
GetOAMReleaseVersion gets version of vela-core runtime helm release
func GetServiceEndpoints ¶ added in v1.2.0
func GetServiceEndpoints(ctx context.Context, client client.Client, appName string, namespace string, velaC common.Args, f Filter) ([]querytypes.ServiceEndpoint, error)
GetServiceEndpoints get service endpoints by velaQL
func InstallCompByNameFromRegistry ¶ added in v1.2.0
func InstallCompByNameFromRegistry(args common2.Args, ioStream cmdutil.IOStreams, compName string, registry Registry) error
InstallCompByNameFromRegistry will install given componentName comp to cluster from registry
func InstallTraitByNameFromRegistry ¶ added in v1.2.0
func InstallTraitByNameFromRegistry(args common2.Args, ioStream cmdutil.IOStreams, traitName string, registry Registry) error
InstallTraitByNameFromRegistry will install given traitName trait to cluster
func KubeCommandGroup ¶ added in v1.4.0
KubeCommandGroup command group for native resource management
func ListRegistryConfig ¶ added in v1.2.0
func ListRegistryConfig() ([]apis.RegistryConfig, error)
ListRegistryConfig will get all registry config stored in local this will return at least one config, which is DefaultRegistry
func LiveDiffApplication ¶ added in v1.0.3
LiveDiffApplication can return user what would change if upgrade an application.
func MakeVelaQL ¶ added in v1.3.0
MakeVelaQL build velaQL
func NewAddAddonRegistryCommand ¶ added in v1.2.0
NewAddAddonRegistryCommand return an addon registry create command
func NewAddonCommand ¶ added in v1.1.0
NewAddonCommand create `addon` command
func NewAddonDisableCommand ¶ added in v1.1.0
NewAddonDisableCommand create addon disable command
func NewAddonEnableCommand ¶ added in v1.1.0
NewAddonEnableCommand create addon enable command
func NewAddonListCommand ¶ added in v1.1.0
NewAddonListCommand create addon list command
func NewAddonPackageCommand ¶ added in v1.4.0
NewAddonPackageCommand create addon package command
func NewAddonRegistryCommand ¶ added in v1.2.0
NewAddonRegistryCommand return an addon registry command
func NewAddonStatusCommand ¶ added in v1.2.0
NewAddonStatusCommand create addon status command
func NewAddonUpgradeCommand ¶ added in v1.2.0
NewAddonUpgradeCommand create addon upgrade command
func NewAppStatusCommand ¶
NewAppStatusCommand creates `status` command for showing status
func NewCUEPackageCommand ¶ added in v1.0.2
NewCUEPackageCommand creates `cue-package` command
func NewCapabilityShowCommand ¶
NewCapabilityShowCommand shows the reference doc for a component type or trait
func NewClusterAddLabelsCommand ¶ added in v1.3.0
NewClusterAddLabelsCommand create command to add labels for managed cluster
func NewClusterAliasCommand ¶ added in v1.3.1
NewClusterAliasCommand create an alias to the named cluster
func NewClusterDelLabelsCommand ¶ added in v1.3.0
NewClusterDelLabelsCommand create command to delete labels for managed cluster
func NewClusterDetachCommand ¶ added in v1.1.1
NewClusterDetachCommand create command to help user detach existing cluster
func NewClusterJoinCommand ¶ added in v1.1.1
NewClusterJoinCommand create command to help user join cluster to multicluster management
func NewClusterLabelCommandGroup ¶ added in v1.3.0
NewClusterLabelCommandGroup create a group of commands to manage cluster labels
func NewClusterListCommand ¶ added in v1.1.1
NewClusterListCommand create cluster list command
func NewClusterProbeCommand ¶ added in v1.1.9
NewClusterProbeCommand create command to help user try health probe for existing cluster TODO(somefive): move prob logic into cluster management
func NewClusterRenameCommand ¶ added in v1.1.1
NewClusterRenameCommand create command to help user rename cluster
func NewCommandWithIOStreams ¶ added in v1.4.0
NewCommandWithIOStreams will contain all commands and initialize them with given ioStream
func NewCompGetCommand ¶ added in v1.2.0
NewCompGetCommand creates `comp get` command
func NewCompletionCommand ¶
NewCompletionCommand Output shell completion code for the specified shell (bash or zsh)
func NewComponentsCommand ¶
NewComponentsCommand creates `components` command
func NewDebugCommand ¶ added in v1.4.0
NewDebugCommand create `debug` command
func NewDefinitionApplyCommand ¶ added in v1.1.0
NewDefinitionApplyCommand create the `vela def apply` command to help user apply local definitions to k8s
func NewDefinitionDelCommand ¶ added in v1.1.0
NewDefinitionDelCommand create the `vela def del` command to help user delete existing definitions conveniently
func NewDefinitionEditCommand ¶ added in v1.1.0
NewDefinitionEditCommand create the `vela def edit` command to help user edit remote definitions
func NewDefinitionGenAPICommand ¶ added in v1.4.0
NewDefinitionGenAPICommand create the `vela def gen-api` command to help user generate Go code from the definition
func NewDefinitionGenDocCommand ¶ added in v1.2.0
NewDefinitionGenDocCommand create the `vela def doc-gen` command to generate documentation of definitions
func NewDefinitionGetCommand ¶ added in v1.1.0
NewDefinitionGetCommand create the `vela def get` command to get definition from k8s
func NewDefinitionInitCommand ¶ added in v1.1.0
NewDefinitionInitCommand create the `vela def init` command to help user initialize a definition locally
func NewDefinitionListCommand ¶ added in v1.1.0
NewDefinitionListCommand create the `vela def list` command to list definition from k8s
func NewDefinitionRenderCommand ¶ added in v1.1.0
NewDefinitionRenderCommand create the `vela def render` command to help user render definition cue file into k8s YAML file, if used without kubernetes environment, set IGNORE_KUBE_CONFIG=true
func NewDefinitionValidateCommand ¶ added in v1.1.0
NewDefinitionValidateCommand create the `vela def vet` command to help user validate the definition
func NewDeleteAddonRegistryCommand ¶ added in v1.2.0
NewDeleteAddonRegistryCommand return an addon registry delete command
func NewDeleteCommand ¶
NewDeleteCommand Delete App
func NewDryRunCommand ¶
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 ¶
NewEnvSetCommand creates `env set` command for setting current environment
func NewExecCommand ¶
NewExecCommand creates `exec` command
func NewExportCommand ¶
NewExportCommand will create command for exporting deploy manifests from an AppFile
func NewGenKubeConfigCommand ¶ added in v1.4.0
NewGenKubeConfigCommand generate kubeconfig for given user and groups
func NewGetAddonRegistryCommand ¶ added in v1.2.0
NewGetAddonRegistryCommand return an addon registry get command
func NewGrantPrivilegesCommand ¶ added in v1.4.0
NewGrantPrivilegesCommand grant privileges to given identity
func NewInitCommand ¶
NewInitCommand creates `init` command
func NewInstallCommand ¶
NewInstallCommand creates `install` command to install vela core
func NewKubeApplyCommand ¶ added in v1.4.0
NewKubeApplyCommand kube apply command
func NewKubeDeleteCommand ¶ added in v1.4.0
NewKubeDeleteCommand kube delete command
func NewListAddonRegistryCommand ¶ added in v1.2.0
NewListAddonRegistryCommand return an addon registry list command
func NewListCommand ¶
NewListCommand creates `ls` command and its nested children command
func NewListPrivilegesCommand ¶ added in v1.4.0
NewListPrivilegesCommand list privileges for given identity
func NewLiveDiffCommand ¶ added in v1.0.3
NewLiveDiffCommand creates `live-diff` command
func NewLogsCommand ¶
NewLogsCommand creates `logs` command to tail logs of application
func NewPortForwardCommand ¶
NewPortForwardCommand is vela port-forward command
func NewProviderCommand ¶ added in v1.3.0
NewProviderCommand create `addon` command
func NewProviderListCommand ¶ added in v1.3.0
NewProviderListCommand create addon list command
func NewQlCommand ¶ added in v1.4.0
NewQlCommand creates `ql` command for executing velaQL
func NewRegistryCommand ¶ added in v1.2.0
NewRegistryCommand Manage Capability Center
func NewRegistryConfigCommand ¶ added in v1.2.0
NewRegistryConfigCommand Configure (add if not exist) a registry, default is local (built-in capabilities)
func NewRegistryListCommand ¶ added in v1.2.0
NewRegistryListCommand List all registry
func NewRegistryRemoveCommand ¶ added in v1.2.0
NewRegistryRemoveCommand Remove specified registry
func NewRevisionListCommand ¶ added in v1.3.0
NewRevisionListCommand list the revisions for application
func NewTemplateCommand ¶
NewTemplateCommand creates `template` command and its nested children command
func NewTemplateContextCommand ¶
NewTemplateContextCommand creates `context` command
func NewTraitCommand ¶ added in v1.2.0
NewTraitCommand creates `traits` command
func NewTraitGetCommand ¶ added in v1.2.0
NewTraitGetCommand creates `trait get` command
func NewUISchemaCommand ¶ added in v1.2.0
NewUISchemaCommand creates `uischema` command
func NewUnInstallCommand ¶ added in v1.2.3
NewUnInstallCommand creates `uninstall` command to uninstall vela core
func NewUpCommand ¶
func NewUpCommand(f velacmd.Factory, order string, c utilcommon.Args, ioStream util.IOStreams) *cobra.Command
NewUpCommand will create command for applying an AppFile
func NewUpdateAddonRegistryCommand ¶ added in v1.2.0
NewUpdateAddonRegistryCommand return an addon registry update command
func NewVersionCommand ¶
NewVersionCommand print client version
func NewVersionListCommand ¶ added in v1.2.3
NewVersionListCommand show all versions command
func NewWorkflowCommand ¶ added in v1.1.0
NewWorkflowCommand create `workflow` command
func NewWorkflowRestartCommand ¶ added in v1.1.0
NewWorkflowRestartCommand create workflow restart command
func NewWorkflowResumeCommand ¶ added in v1.1.0
NewWorkflowResumeCommand create workflow resume command
func NewWorkflowRollbackCommand ¶ added in v1.2.0
NewWorkflowRollbackCommand create workflow rollback command
func NewWorkflowSuspendCommand ¶ added in v1.1.0
NewWorkflowSuspendCommand create workflow suspend command
func NewWorkflowTerminateCommand ¶ added in v1.1.0
NewWorkflowTerminateCommand create workflow terminate command
func NewWorkloadsCommand ¶
NewWorkloadsCommand creates `workloads` command
func OpenBrowser ¶
OpenBrowser will open browser by url in different OS system nolint:gosec
func ParseCapability ¶ added in v1.2.0
func ParseCapability(mapper discoverymapper.DiscoveryMapper, data []byte) (types.Capability, error)
ParseCapability will convert config from remote center to capability
func PrintComponentListFromRegistry ¶ added in v1.1.0
func PrintComponentListFromRegistry(registry Registry, ioStreams cmdutil.IOStreams, filter filterFunc) error
PrintComponentListFromRegistry print a table which shows all components from registry
func PrintHelpByTag ¶
PrintHelpByTag print custom defined help message
func PrintInstalledCompDef ¶ added in v1.2.0
PrintInstalledCompDef will print all ComponentDefinition in cluster
func PrintInstalledTraitDef ¶ added in v1.2.0
PrintInstalledTraitDef will print all TraitDefinition in cluster
func PrintTraitListFromRegistry ¶ added in v1.1.0
func PrintTraitListFromRegistry(registry Registry, ioStreams cmdutil.IOStreams, filter filterFunc) error
PrintTraitListFromRegistry print a table which shows all traits from registry
func QueryValue ¶ added in v1.4.0
func QueryValue(ctx context.Context, client client.Client, velaC common.Args, velaQL string) (*value.Value, error)
QueryValue get queryValue from velaQL
func ReadObjectsFromFile ¶
ReadObjectsFromFile will read objects from file or dir in the format of yaml
func RevisionCommandGroup ¶ added in v1.3.0
RevisionCommandGroup the commands for managing application revisions
func ShowReferenceConsole ¶ added in v1.0.3
func ShowReferenceConsole(ctx context.Context, c common.Args, ioStreams cmdutil.IOStreams, capabilityName string, ns string) error
ShowReferenceConsole will show capability reference in console
func StoreRepos ¶ added in v1.2.0
func StoreRepos(registries []apis.RegistryConfig) error
StoreRepos will store registry repo locally
func TerminateWorkflow ¶ added in v1.4.0
func TerminateWorkflow(kubecli client.Client, app *v1beta1.Application) error
TerminateWorkflow terminate workflow
func TransAddonName ¶ added in v1.1.1
TransAddonName will turn addon's name from xxx/yyy to xxx-yyy
Types ¶
type Args ¶
type Args struct { Output string Args common.Args Namespace string Container string Name string App *v1beta1.Application }
Args creates arguments for `logs` command
type CompStatus ¶
type CompStatus int
CompStatus represents the status of a component during "vela init"
func TrackDeployStatus ¶
TrackDeployStatus will only check AppConfig is deployed successfully,
type Content ¶ added in v1.2.0
type Content struct { OssContent GithubContent LocalContent }
Content contains different type of content needed when building Registry
type DryRunCmdOptions ¶ added in v1.0.3
type DryRunCmdOptions struct { cmdutil.IOStreams ApplicationFile string DefinitionFile string OfflineMode bool }
DryRunCmdOptions contains dry-run cmd options
type GenKubeConfigOptions ¶ added in v1.4.0
GenKubeConfigOptions options for create kubeconfig
func (*GenKubeConfigOptions) Complete ¶ added in v1.4.0
func (opt *GenKubeConfigOptions) Complete(f velacmd.Factory, cmd *cobra.Command)
Complete .
func (*GenKubeConfigOptions) Run ¶ added in v1.4.0
func (opt *GenKubeConfigOptions) Run(f velacmd.Factory) error
Run .
func (*GenKubeConfigOptions) Validate ¶ added in v1.4.0
func (opt *GenKubeConfigOptions) Validate() error
Validate .
type GithubContent ¶ added in v1.2.0
type GithubContent struct { URL string `json:"url"` Owner string `json:"owner"` Repo string `json:"repo"` Path string `json:"path"` Ref string `json:"ref"` }
GithubContent for registry
type GithubRegistry ¶ added in v1.2.0
type GithubRegistry struct { URL string `json:"url"` RegistryName string `json:"registry_name"` // contains filtered or unexported fields }
GithubRegistry is Registry's implementation treat github url as resource
func (GithubRegistry) GetCap ¶ added in v1.2.0
func (g GithubRegistry) GetCap(addonName string) (types.Capability, []byte, error)
GetCap return capability object and raw data specified by cap name
func (GithubRegistry) GetName ¶ added in v1.2.0
func (g GithubRegistry) GetName() string
GetName will return registry name
func (GithubRegistry) GetURL ¶ added in v1.2.0
func (g GithubRegistry) GetURL() string
GetURL will return github registry url
func (GithubRegistry) ListCaps ¶ added in v1.2.0
func (g GithubRegistry) ListCaps() ([]types.Capability, error)
ListCaps list all capabilities of registry
type GrantPrivilegesOptions ¶ added in v1.4.0
type GrantPrivilegesOptions struct { auth.Identity KubeConfig string GrantNamespaces []string GrantClusters []string ReadOnly bool CreateNamespace bool util.IOStreams }
GrantPrivilegesOptions options for grant privileges
func (*GrantPrivilegesOptions) Complete ¶ added in v1.4.0
func (opt *GrantPrivilegesOptions) Complete(f velacmd.Factory, cmd *cobra.Command)
Complete .
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 InstallArgs ¶ added in v1.2.3
type InstallArgs struct { Args common.Args Values []string Namespace string Version string ChartFilePath string Detail bool ReuseValues bool // contains filtered or unexported fields }
InstallArgs the args for install command
type KubeApplyOptions ¶ added in v1.4.0
KubeApplyOptions options for kube apply
func (*KubeApplyOptions) Validate ¶ added in v1.4.0
func (opt *KubeApplyOptions) Validate() error
Validate .
type KubeDeleteOptions ¶ added in v1.4.0
KubeDeleteOptions options for kube delete
func (*KubeDeleteOptions) Validate ¶ added in v1.4.0
func (opt *KubeDeleteOptions) Validate() error
Validate .
type ListBucketResult ¶ added in v1.2.0
ListBucketResult describe a file list from OSS
type ListPrivilegesOptions ¶ added in v1.4.0
type ListPrivilegesOptions struct { auth.Identity KubeConfig string Clusters []string util.IOStreams }
ListPrivilegesOptions options for list privileges
func (*ListPrivilegesOptions) Complete ¶ added in v1.4.0
func (opt *ListPrivilegesOptions) Complete(f velacmd.Factory, cmd *cobra.Command)
Complete .
type LiveDiffCmdOptions ¶ added in v1.0.3
type LiveDiffCmdOptions struct { DryRunCmdOptions AppName string Namespace string Revision string SecondaryRevision string Context int }
LiveDiffCmdOptions contains the live-diff cmd options
type LocalContent ¶ added in v1.2.0
type LocalContent struct {
AbsDir string `json:"abs_dir"`
}
LocalContent for local registry
type LocalRegistry ¶ added in v1.2.0
type LocalRegistry struct { AbsPath string `json:"abs_path"` RegistryName string `json:"registry_name"` }
LocalRegistry is Registry's implementation treat local url as resource
func (LocalRegistry) GetCap ¶ added in v1.2.0
func (l LocalRegistry) GetCap(addonName string) (types.Capability, []byte, error)
GetCap return capability object and raw data specified by cap name
func (LocalRegistry) GetName ¶ added in v1.2.0
func (l LocalRegistry) GetName() string
GetName return name of LocalRegistry
func (LocalRegistry) GetURL ¶ added in v1.2.0
func (l LocalRegistry) GetURL() string
GetURL return path of LocalRegistry
func (LocalRegistry) ListCaps ¶ added in v1.2.0
func (l LocalRegistry) ListCaps() ([]types.Capability, error)
ListCaps list all capabilities of registry
type OssContent ¶ added in v1.2.0
type OssContent struct {
BucketURL string `json:"bucket_url"`
}
OssContent for oss registry
type OssRegistry ¶ added in v1.2.0
type OssRegistry struct { *http.Client `json:"-"` BucketURL string `json:"bucket_url"` RegistryName string `json:"registry_name"` }
OssRegistry is Registry's implementation treat OSS url as resource
func (OssRegistry) GetCap ¶ added in v1.2.0
func (o OssRegistry) GetCap(addonName string) (types.Capability, []byte, error)
GetCap return capability object and raw data specified by cap name
func (OssRegistry) GetName ¶ added in v1.2.0
func (o OssRegistry) GetName() string
GetName return name of OssRegistry
func (OssRegistry) GetURL ¶ added in v1.2.0
func (o OssRegistry) GetURL() string
GetURL return URL of OssRegistry's bucket
func (OssRegistry) ListCaps ¶ added in v1.2.0
func (o OssRegistry) ListCaps() ([]types.Capability, error)
ListCaps list all capabilities of registry
type ProviderMeta ¶ added in v1.3.0
ProviderMeta is the metadata for a Terraform Cloud Provider
type Registry ¶ added in v1.2.0
type Registry interface { GetName() string GetURL() string GetCap(addonName string) (types.Capability, []byte, error) ListCaps() ([]types.Capability, error) }
Registry define a registry used to get and list types.Capability
func GetRegistry ¶ added in v1.2.0
GetRegistry get a Registry implementation by name
func NewRegistry ¶ added in v1.2.0
NewRegistry will create a registry implementation
func NewRegistryFromConfig ¶ added in v1.2.0
func NewRegistryFromConfig(config apis.RegistryConfig) (Registry, error)
NewRegistryFromConfig return Registry interface to get capabilities
type RegistryFile ¶ added in v1.2.0
type RegistryFile struct {
// contains filtered or unexported fields
}
RegistryFile describes a file item in registry
type ScopeHealthCondition ¶
type ScopeHealthCondition = v1alpha2.ScopeHealthCondition
ScopeHealthCondition holds health condition of a scope
type UnInstallArgs ¶ added in v1.2.3
type UnInstallArgs struct { Args common.Args Namespace string Detail bool // contains filtered or unexported fields }
UnInstallArgs the args for uninstall command
type UpCommandOptions ¶ added in v1.3.1
type UpCommandOptions struct { AppName string Namespace string File string PublishVersion string RevisionName string Debug bool }
UpCommandOptions command args for vela up
func (*UpCommandOptions) Validate ¶ added in v1.3.1
func (opt *UpCommandOptions) Validate() error
Validate if vela up args is valid, interrupt the command
type UserInputOptions ¶ added in v1.2.3
type UserInputOptions struct {
AssumeYes bool
}
UserInputOptions user input options
type VelaExecOptions ¶
type VelaExecOptions struct { Cmd *cobra.Command Args []string Stdin bool TTY bool Ctx context.Context VelaC common.Args Env *types.EnvMeta App *v1beta1.Application ClientSet kubernetes.Interface // contains filtered or unexported fields }
VelaExecOptions creates options for `exec` command
func (*VelaExecOptions) Complete ¶
func (o *VelaExecOptions) Complete() error
Complete loads data from the command environment
func (*VelaExecOptions) Run ¶
func (o *VelaExecOptions) Run() error
Run executes a validated remote execution against a pod
type VelaPortForwardOptions ¶
type VelaPortForwardOptions struct { Cmd *cobra.Command Args []string Ctx context.Context VelaC common.Args Env *types.EnvMeta App *v1beta1.Application ClientSet kubernetes.Interface Client client.Client // contains filtered or unexported fields }
VelaPortForwardOptions for vela port-forward
func (*VelaPortForwardOptions) Complete ¶
func (o *VelaPortForwardOptions) Complete() error
Complete will complete the config of port-forward
func (*VelaPortForwardOptions) Init ¶
func (o *VelaPortForwardOptions) Init(ctx context.Context, cmd *cobra.Command, argsIn []string) error
Init will initialize
func (*VelaPortForwardOptions) Run ¶
func (o *VelaPortForwardOptions) Run() error
Run will execute port-forward
type WorkloadHealthCondition ¶
type WorkloadHealthCondition = v1alpha2.WorkloadHealthCondition
WorkloadHealthCondition holds health status of any resource
Source Files ¶
- addon-registry.go
- addon.go
- auth.go
- cli.go
- cluster.go
- common.go
- completion.go
- components.go
- cue_packages.go
- debug.go
- def.go
- delete.go
- dryrun.go
- env.go
- exec.go
- export.go
- help.go
- init.go
- install.go
- kube.go
- livediff.go
- logs.go
- ls.go
- portforward.go
- print.go
- provider.go
- registry.go
- revision.go
- show.go
- status.go
- template.go
- traits.go
- uischema.go
- uninstall.go
- up.go
- utils.go
- velaql.go
- workflow.go
- workloads.go