cli

package
v1.9.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2024 License: Apache-2.0 Imports: 166 Imported by: 4

Documentation

Index

Constants

View Source
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"

	// CreateLabel specifies the labels need to create in managedCluster
	CreateLabel = "labels"
)
View Source
const (
	App       = "app"
	Namespace = "namespace"

	// FlagDescription command flag to specify the description of the definition
	FlagDescription = "desc"
	// FlagAlias command flag to specify the alias of the definition
	FlagAlias = "alias"
	// 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"
	// CUEExtension with the expected extension for a CUE file.
	CUEExtension = ".cue"
	// YAMLExtension with the expected extension for a YAML file.
	YAMLExtension = ".yaml"
	// YMLExtension with an alternative extension for a YAML file as .yml.
	YMLExtension = ".yml"
)

constants used in `svc` command

View Source
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"
)
View Source
const (
	// LegacyKubeVelaInstallerHelmRepoURL is used for kubevela version < v1.9.0
	LegacyKubeVelaInstallerHelmRepoURL = "https://charts.kubevela.net/core/"
	// KubeVelaInstallerHelmRepoURL is used for kubevela version >= v1.9.0
	KubeVelaInstallerHelmRepoURL = "https://kubevela.github.io/charts/"
)
View Source
const (
	// SideBar file name for docsify
	SideBar = "_sidebar.md"
	// NavBar file name for docsify
	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"
)
View Source
const (
	// FlagSpecify specifies the deployment name
	FlagSpecify = "specify"
	// FlagOutputFormat specifies the output format. One of: (wide | yaml)
	FlagOutputFormat = "output"
	// APIServiceName is the name of APIService
	APIServiceName = "v1alpha1.cluster.core.oam.dev"
	// UnknownMetric represent that we can't compute the metric data
	UnknownMetric = "N/A"
)
View Source
const DefaultRegistry = "default"

DefaultRegistry is default registry

View Source
const (
	// Port is the port for reference docs website
	Port = ":18081"
)
View Source
const TypeGithub = "github"

TypeGithub represents github

View Source
const TypeLocal = "local"

TypeLocal represents github

View Source
const TypeOss = "oss"

TypeOss represent oss

View Source
const TypeUnknown = "unknown"

TypeUnknown represents parse failed

View Source
const (
	// ViewNamingRegex is a regex for names of view, essentially allowing something like `some-name-123`
	ViewNamingRegex = `^[a-z\d]+(-[a-z\d]+)*$`
)

Variables

View Source
var AllNamespace bool

AllNamespace list app in all namespaces

View Source
var FieldSelector string

FieldSelector list app using field selector

View Source
var LabelSelector string

LabelSelector list app using label selector

Functions

func AdditionalEndpointPrinter added in v1.2.0

func AdditionalEndpointPrinter(ctx context.Context, c common.Args, _ client.Client, name, info string, _ bool)

AdditionalEndpointPrinter will print endpoints

func AskToChooseOnePod added in v1.5.0

func AskToChooseOnePod(pods []types.PodBase) (*types.PodBase, error)

AskToChooseOnePod will ask user to select one pod

func AskToChooseOneService added in v1.5.0

func AskToChooseOneService(services []types.ResourceItem, selectPort bool) (*types.ResourceItem, int, error)

AskToChooseOneService will ask user to select one service and/or port

func AuthCommandGroup added in v1.4.0

func AuthCommandGroup(f velacmd.Factory, order string, streams util.IOStreams) *cobra.Command

AuthCommandGroup commands for create resources or configuration

func CPUMem added in v1.6.0

func CPUMem(resourceList corev1.ResourceList) string

CPUMem returns the upsage of cpu and memory

func CheckAPIService added in v1.6.0

func CheckAPIService(ctx context.Context, config *rest.Config, apiService *apiregistrationV1beta.APIService) error

CheckAPIService checks the APIService

func ClusterCommandGroup added in v1.1.1

func ClusterCommandGroup(f velacmd.Factory, order string, c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command

ClusterCommandGroup create a group of cluster command

func ComputeMetricByDeploymentName added in v1.5.0

func ComputeMetricByDeploymentName(ctx context.Context, deployments *v1.DeploymentList, mc *metrics.Clientset) (cpuMetricMap, memMetricMap map[string]string)

ComputeMetricByDeploymentName computes cpu and memory metric of deployment

func ConfigCommandGroup added in v1.6.0

func ConfigCommandGroup(f velacmd.Factory, order string, streams util.IOStreams) *cobra.Command

ConfigCommandGroup commands for the config

func CreateEnv added in v1.1.4

func CreateEnv(envArgs *types.EnvMeta, args []string, ioStreams cmdutil.IOStreams) error

CreateEnv creates an environment

func CueXCommandGroup added in v1.9.0

func CueXCommandGroup(f velacmd.Factory, order string) *cobra.Command

CueXCommandGroup commands for cuex management

func DefinitionCommandGroup added in v1.1.0

func DefinitionCommandGroup(c common.Args, order string, ioStreams util.IOStreams) *cobra.Command

DefinitionCommandGroup create the command group for `vela def` command to manage definitions

func DeleteEnv

func DeleteEnv(args []string, ioStreams cmdutil.IOStreams) error

DeleteEnv deletes an environment

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 GetApplicationPods added in v1.5.0

func GetApplicationPods(ctx context.Context, appName string, namespace string, velaC common.Args, f Filter) ([]querytypes.PodBase, error)

GetApplicationPods get the pods by velaQL

func GetApplicationServices added in v1.5.0

func GetApplicationServices(ctx context.Context, appName string, namespace string, velaC common.Args, f Filter) ([]querytypes.ResourceItem, error)

GetApplicationServices get the services by velaQL

func GetCapabilityByName

func GetCapabilityByName(name string, workloads []types.Capability) (types.Capability, error)

GetCapabilityByName get eponymous types.Capability from workloads by name

func GetEnvVariable added in v1.5.0

func GetEnvVariable(envList []corev1.EnvVar) (envStr string)

GetEnvVariable gets the environment variables

func GetFlagEnvOrCurrent added in v1.1.4

func GetFlagEnvOrCurrent(cmd *cobra.Command, args common.Args) (*types.EnvMeta, error)

GetFlagEnvOrCurrent gets environment by name or current environment if no env exists, return default namespace as env

func GetFlagNamespaceOrEnv added in v1.1.10

func GetFlagNamespaceOrEnv(cmd *cobra.Command, args common.Args) (string, error)

GetFlagNamespaceOrEnv will get env and namespace flag, namespace flag takes the priority

func GetOAMReleaseVersion

func GetOAMReleaseVersion(ns string) (string, error)

GetOAMReleaseVersion gets version of vela-core runtime helm release

func GetServiceEndpoints added in v1.2.0

func GetServiceEndpoints(ctx context.Context, 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

func KubeCommandGroup(f velacmd.Factory, order string, streams util.IOStreams) *cobra.Command

KubeCommandGroup command group for native resource management

func ListEnvs

func ListEnvs(args []string, ioStreams cmdutil.IOStreams) error

ListEnvs shows info of all environments

func LiveDiffApplication added in v1.0.3

func LiveDiffApplication(cmdOption *LiveDiffCmdOptions, c common.Args) (bytes.Buffer, error)

LiveDiffApplication can return user what would change if upgrade an application.

func MakeVelaQL added in v1.3.0

func MakeVelaQL(view string, params map[string]string, action string) string

MakeVelaQL build velaQL

func Map2Str added in v1.6.0

func Map2Str(m map[string]string) string

Map2Str converts map to string

func NewAddAddonRegistryCommand added in v1.2.0

func NewAddAddonRegistryCommand(c common.Args, _ cmdutil.IOStreams) *cobra.Command

NewAddAddonRegistryCommand return an addon registry create command

func NewAddonCommand added in v1.1.0

func NewAddonCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command

NewAddonCommand create `addon` command

func NewAddonDisableCommand added in v1.1.0

func NewAddonDisableCommand(c common.Args, _ cmdutil.IOStreams) *cobra.Command

NewAddonDisableCommand create addon disable command

func NewAddonEnableCommand added in v1.1.0

func NewAddonEnableCommand(c common.Args, ioStream cmdutil.IOStreams) *cobra.Command

NewAddonEnableCommand create addon enable command

func NewAddonInitCommand added in v1.5.0

func NewAddonInitCommand() *cobra.Command

NewAddonInitCommand creates an addon scaffold

func NewAddonListCommand added in v1.1.0

func NewAddonListCommand(c common.Args) *cobra.Command

NewAddonListCommand create addon list command

func NewAddonPackageCommand added in v1.4.0

func NewAddonPackageCommand(_ common.Args) *cobra.Command

NewAddonPackageCommand create addon package command

func NewAddonPushCommand added in v1.5.0

func NewAddonPushCommand(c common.Args) *cobra.Command

NewAddonPushCommand pushes an addon dir/package to a ChartMuseum

func NewAddonRegistryCommand added in v1.2.0

func NewAddonRegistryCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command

NewAddonRegistryCommand return an addon registry command

func NewAddonStatusCommand added in v1.2.0

func NewAddonStatusCommand(c common.Args, ioStream cmdutil.IOStreams) *cobra.Command

NewAddonStatusCommand create addon status command

func NewAddonUpgradeCommand added in v1.2.0

func NewAddonUpgradeCommand(c common.Args, ioStream cmdutil.IOStreams) *cobra.Command

NewAddonUpgradeCommand create addon upgrade command

func NewAdoptCommand added in v1.7.0

func NewAdoptCommand(f velacmd.Factory, order string, streams util.IOStreams) *cobra.Command

NewAdoptCommand command for adopt resources into KubeVela Application

func NewAppStatusCommand

func NewAppStatusCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command

NewAppStatusCommand creates `status` command for showing status

func NewCapabilityShowCommand

func NewCapabilityShowCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command

NewCapabilityShowCommand shows the reference doc for a component type or trait

func NewClusterAddLabelsCommand added in v1.3.0

func NewClusterAddLabelsCommand(c *common.Args) *cobra.Command

NewClusterAddLabelsCommand create command to add labels for managed cluster

func NewClusterAliasCommand added in v1.3.1

func NewClusterAliasCommand(c *common.Args) *cobra.Command

NewClusterAliasCommand create an alias to the named cluster

func NewClusterDelLabelsCommand added in v1.3.0

func NewClusterDelLabelsCommand(c *common.Args) *cobra.Command

NewClusterDelLabelsCommand create command to delete labels for managed cluster

func NewClusterDetachCommand added in v1.1.1

func NewClusterDetachCommand(c *common.Args) *cobra.Command

NewClusterDetachCommand create command to help user detach existing cluster

func NewClusterExportConfigCommand added in v1.8.0

func NewClusterExportConfigCommand(f velacmd.Factory, ioStreams cmdutil.IOStreams) *cobra.Command

NewClusterExportConfigCommand create command to export multi-cluster config

func NewClusterJoinCommand added in v1.1.1

func NewClusterJoinCommand(c *common.Args, ioStreams cmdutil.IOStreams) *cobra.Command

NewClusterJoinCommand create command to help user join cluster to multicluster management

func NewClusterLabelCommandGroup added in v1.3.0

func NewClusterLabelCommandGroup(c *common.Args) *cobra.Command

NewClusterLabelCommandGroup create a group of commands to manage cluster labels

func NewClusterListCommand added in v1.1.1

func NewClusterListCommand(c *common.Args) *cobra.Command

NewClusterListCommand create cluster list command

func NewClusterProbeCommand added in v1.1.9

func NewClusterProbeCommand(c *common.Args) *cobra.Command

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

func NewClusterRenameCommand(c *common.Args) *cobra.Command

NewClusterRenameCommand create command to help user rename cluster

func NewCommand

func NewCommand() *cobra.Command

NewCommand will contain all commands

func NewCommandWithIOStreams added in v1.4.0

func NewCommandWithIOStreams(ioStream util.IOStreams) *cobra.Command

NewCommandWithIOStreams will contain all commands and initialize them with given ioStream

func NewCompGetCommand added in v1.2.0

func NewCompGetCommand(c common2.Args, ioStreams cmdutil.IOStreams) *cobra.Command

NewCompGetCommand creates `comp get` command

func NewCompletionCommand

func NewCompletionCommand(order string) *cobra.Command

NewCompletionCommand Output shell completion code for the specified shell (bash or zsh)

func NewComponentsCommand

func NewComponentsCommand(c common2.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command

NewComponentsCommand creates `components` command

func NewCreateConfigCommand added in v1.6.0

func NewCreateConfigCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command

NewCreateConfigCommand command for creating the config

func NewCueXEvalCommand added in v1.9.0

func NewCueXEvalCommand(f velacmd.Factory) *cobra.Command

NewCueXEvalCommand `vela cuex eval` command

func NewDebugCommand added in v1.4.0

func NewDebugCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command

NewDebugCommand create `debug` command

func NewDefinitionApplyCommand added in v1.1.0

func NewDefinitionApplyCommand(c common.Args, streams util.IOStreams) *cobra.Command

NewDefinitionApplyCommand create the `vela def apply` command to help user apply local definitions to k8s

func NewDefinitionDelCommand added in v1.1.0

func NewDefinitionDelCommand(c common.Args) *cobra.Command

NewDefinitionDelCommand create the `vela def del` command to help user delete existing definitions conveniently

func NewDefinitionDocGenCommand added in v1.9.0

func NewDefinitionDocGenCommand(c common.Args, ioStreams util.IOStreams) *cobra.Command

NewDefinitionDocGenCommand create the `vela def doc-gen` command to generate documentation of definitions

func NewDefinitionEditCommand added in v1.1.0

func NewDefinitionEditCommand(c common.Args) *cobra.Command

NewDefinitionEditCommand create the `vela def edit` command to help user edit remote definitions

func NewDefinitionGenAPICommand added in v1.4.0

func NewDefinitionGenAPICommand(c common.Args) *cobra.Command

NewDefinitionGenAPICommand create the `vela def gen-api` command to help user generate Go code from the definition

func NewDefinitionGenCUECommand added in v1.9.0

func NewDefinitionGenCUECommand(_ common.Args, streams util.IOStreams) *cobra.Command

NewDefinitionGenCUECommand create the `vela def gen-cue` command to help user generate CUE schema from the go code

func NewDefinitionGenDocCommand added in v1.2.0

func NewDefinitionGenDocCommand(_ common.Args, streams util.IOStreams) *cobra.Command

NewDefinitionGenDocCommand create the `vela def gen-doc` command to generate documentation of definitions

func NewDefinitionGetCommand added in v1.1.0

func NewDefinitionGetCommand(c common.Args) *cobra.Command

NewDefinitionGetCommand create the `vela def get` command to get definition from k8s

func NewDefinitionInitCommand added in v1.1.0

func NewDefinitionInitCommand(_ common.Args) *cobra.Command

NewDefinitionInitCommand create the `vela def init` command to help user initialize a definition locally

func NewDefinitionListCommand added in v1.1.0

func NewDefinitionListCommand(c common.Args) *cobra.Command

NewDefinitionListCommand create the `vela def list` command to list definition from k8s

func NewDefinitionRenderCommand added in v1.1.0

func NewDefinitionRenderCommand(c common.Args) *cobra.Command

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

func NewDefinitionValidateCommand(c common.Args) *cobra.Command

NewDefinitionValidateCommand create the `vela def vet` command to help user validate the definition

func NewDeleteAddonRegistryCommand added in v1.2.0

func NewDeleteAddonRegistryCommand(c common.Args, _ cmdutil.IOStreams) *cobra.Command

NewDeleteAddonRegistryCommand return an addon registry delete command

func NewDeleteCommand

func NewDeleteCommand(f velacmd.Factory, order string) *cobra.Command

NewDeleteCommand Delete App

func NewDeleteConfigCommand added in v1.6.0

func NewDeleteConfigCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command

NewDeleteConfigCommand command for deleting the config secret

func NewDistributeConfigCommand added in v1.6.0

func NewDistributeConfigCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command

NewDistributeConfigCommand command for distributing the config

func NewDryRunCommand

func NewDryRunCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command

NewDryRunCommand creates `dry-run` command

func NewEnvCommand

func NewEnvCommand(c common.Args, order string, ioStream cmdutil.IOStreams) *cobra.Command

NewEnvCommand creates `env` command and its nested children

func NewEnvDeleteCommand

func NewEnvDeleteCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command

NewEnvDeleteCommand creates `env delete` command for deleting environments

func NewEnvInitCommand

func NewEnvInitCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command

NewEnvInitCommand creates `env init` command for initializing environments

func NewEnvListCommand

func NewEnvListCommand(c common.Args, ioStream cmdutil.IOStreams) *cobra.Command

NewEnvListCommand creates `env list` command for listing all environments

func NewEnvSetCommand

func NewEnvSetCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command

NewEnvSetCommand creates `env set` command for setting current environment

func NewExecCommand

func NewExecCommand(c common.Args, order string, ioStreams util.IOStreams) *cobra.Command

NewExecCommand creates `exec` command

func NewExportCommand

func NewExportCommand(c common2.Args, ioStream cmdutil.IOStreams) *cobra.Command

NewExportCommand will create command for exporting deploy manifests from an AppFile

func NewGenKubeConfigCommand added in v1.4.0

func NewGenKubeConfigCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command

NewGenKubeConfigCommand generate kubeconfig for given user and groups

func NewGetAddonRegistryCommand added in v1.2.0

func NewGetAddonRegistryCommand(c common.Args, _ cmdutil.IOStreams) *cobra.Command

NewGetAddonRegistryCommand return an addon registry get command

func NewGrantPrivilegesCommand added in v1.4.0

func NewGrantPrivilegesCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command

NewGrantPrivilegesCommand grant privileges to given identity

func NewHelpCommand

func NewHelpCommand(order string) *cobra.Command

NewHelpCommand get any command help

func NewInitCommand

func NewInitCommand(c common2.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command

NewInitCommand creates `init` command

func NewInstallCommand

func NewInstallCommand(c common.Args, order string, ioStreams util.IOStreams) *cobra.Command

NewInstallCommand creates `install` command to install vela core

func NewKubeApplyCommand added in v1.4.0

func NewKubeApplyCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command

NewKubeApplyCommand kube apply command

func NewKubeDeleteCommand added in v1.4.0

func NewKubeDeleteCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command

NewKubeDeleteCommand kube delete command

func NewListAddonRegistryCommand added in v1.2.0

func NewListAddonRegistryCommand(c common.Args, _ cmdutil.IOStreams) *cobra.Command

NewListAddonRegistryCommand return an addon registry list command

func NewListCommand

func NewListCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command

NewListCommand creates `ls` command and its nested children command

func NewListConfigCommand added in v1.6.0

func NewListConfigCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command

NewListConfigCommand command for listing the config secrets

func NewListPrivilegesCommand added in v1.4.0

func NewListPrivilegesCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command

NewListPrivilegesCommand list privileges for given identity

func NewLiveDiffCommand added in v1.0.3

func NewLiveDiffCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command

NewLiveDiffCommand creates `live-diff` command

func NewLogsCommand

func NewLogsCommand(c common.Args, order string, ioStreams util.IOStreams) *cobra.Command

NewLogsCommand creates `logs` command to tail logs of application

func NewPortForwardCommand

func NewPortForwardCommand(c common.Args, order string, ioStreams util.IOStreams) *cobra.Command

NewPortForwardCommand is vela port-forward command

func NewProviderCommand added in v1.3.0

func NewProviderCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command

NewProviderCommand create `addon` command +Deprecated

func NewProviderListCommand added in v1.3.0

func NewProviderListCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command

NewProviderListCommand create addon list command

func NewQLApplyCommand added in v1.5.0

func NewQLApplyCommand(c common.Args) *cobra.Command

NewQLApplyCommand creates a VelaQL view

func NewQlCommand added in v1.4.0

func NewQlCommand(c common.Args, order string, ioStreams util.IOStreams) *cobra.Command

NewQlCommand creates `ql` command for executing velaQL

func NewRegistryCommand added in v1.2.0

func NewRegistryCommand(ioStream cmdutil.IOStreams, order string) *cobra.Command

NewRegistryCommand Manage Capability Center

func NewRegistryConfigCommand added in v1.2.0

func NewRegistryConfigCommand(ioStreams cmdutil.IOStreams) *cobra.Command

NewRegistryConfigCommand Configure (add if not exist) a registry, default is local (built-in capabilities)

func NewRegistryListCommand added in v1.2.0

func NewRegistryListCommand(ioStreams cmdutil.IOStreams) *cobra.Command

NewRegistryListCommand List all registry

func NewRegistryRemoveCommand added in v1.2.0

func NewRegistryRemoveCommand(ioStreams cmdutil.IOStreams) *cobra.Command

NewRegistryRemoveCommand Remove specified registry

func NewRevisionGetCommand added in v1.6.0

func NewRevisionGetCommand(c common.Args) *cobra.Command

NewRevisionGetCommand gets specific revision of application

func NewRevisionListCommand added in v1.3.0

func NewRevisionListCommand(c common.Args) *cobra.Command

NewRevisionListCommand list the revisions for application

func NewSystemCommand added in v1.5.0

func NewSystemCommand(c common.Args, order string) *cobra.Command

NewSystemCommand print system detail info

func NewSystemDiagnoseCommand added in v1.5.0

func NewSystemDiagnoseCommand(c common.Args) *cobra.Command

NewSystemDiagnoseCommand create command to help user to diagnose system's health

func NewSystemInfoCommand added in v1.5.0

func NewSystemInfoCommand(c common.Args) *cobra.Command

NewSystemInfoCommand prints system detail info

func NewTemplateApplyCommand added in v1.6.0

func NewTemplateApplyCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command

NewTemplateApplyCommand command for creating and updating the config template

func NewTemplateDeleteCommand added in v1.6.0

func NewTemplateDeleteCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command

NewTemplateDeleteCommand command for deleting the config template

func NewTemplateListCommand added in v1.6.0

func NewTemplateListCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command

NewTemplateListCommand command for listing the config templates

func NewTemplateShowCommand added in v1.6.0

func NewTemplateShowCommand(f velacmd.Factory, streams util.IOStreams) *cobra.Command

NewTemplateShowCommand command for show the properties document

func NewTopCommand added in v1.6.0

func NewTopCommand(c common.Args, order string, _ cmdutil.IOStreams) *cobra.Command

NewTopCommand will create command `top` for displaying the platform overview

func NewTraitCommand added in v1.2.0

func NewTraitCommand(c common2.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command

NewTraitCommand creates `traits` command

func NewTraitGetCommand added in v1.2.0

func NewTraitGetCommand(c common2.Args, ioStreams cmdutil.IOStreams) *cobra.Command

NewTraitGetCommand creates `trait get` command

func NewUISchemaCommand added in v1.2.0

func NewUISchemaCommand(c common.Args, order string, ioStreams util.IOStreams) *cobra.Command

NewUISchemaCommand creates `uischema` command

func NewUnInstallCommand added in v1.2.3

func NewUnInstallCommand(c common.Args, order string, ioStreams util.IOStreams) *cobra.Command

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

func NewUpdateAddonRegistryCommand(c common.Args, _ cmdutil.IOStreams) *cobra.Command

NewUpdateAddonRegistryCommand return an addon registry update command

func NewVersionCommand

func NewVersionCommand(ioStream util.IOStreams, order string) *cobra.Command

NewVersionCommand print client version

func NewVersionListCommand added in v1.2.3

func NewVersionListCommand(ioStream util.IOStreams) *cobra.Command

NewVersionListCommand show all versions command

func NewWorkflowCommand added in v1.1.0

func NewWorkflowCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *cobra.Command

NewWorkflowCommand create `workflow` command

func NewWorkflowDebugCommand added in v1.6.2

func NewWorkflowDebugCommand(c common.Args, ioStream cmdutil.IOStreams, wargs *WorkflowArgs) *cobra.Command

NewWorkflowDebugCommand create workflow debug command

func NewWorkflowListCommand added in v1.9.7

func NewWorkflowListCommand(c common.Args, ioStream cmdutil.IOStreams, _ *WorkflowArgs) *cobra.Command

NewWorkflowListCommand create workflow list command

func NewWorkflowLogsCommand added in v1.6.0

func NewWorkflowLogsCommand(c common.Args, ioStream cmdutil.IOStreams, wargs *WorkflowArgs) *cobra.Command

NewWorkflowLogsCommand create workflow logs command

func NewWorkflowRestartCommand added in v1.1.0

func NewWorkflowRestartCommand(_ common.Args, _ cmdutil.IOStreams, wargs *WorkflowArgs) *cobra.Command

NewWorkflowRestartCommand create workflow restart command

func NewWorkflowResumeCommand added in v1.1.0

func NewWorkflowResumeCommand(_ common.Args, _ cmdutil.IOStreams, wargs *WorkflowArgs) *cobra.Command

NewWorkflowResumeCommand create workflow resume command

func NewWorkflowRollbackCommand added in v1.2.0

func NewWorkflowRollbackCommand(_ common.Args, _ cmdutil.IOStreams, wargs *WorkflowArgs) *cobra.Command

NewWorkflowRollbackCommand create workflow rollback command

func NewWorkflowSuspendCommand added in v1.1.0

func NewWorkflowSuspendCommand(_ common.Args, _ cmdutil.IOStreams, wargs *WorkflowArgs) *cobra.Command

NewWorkflowSuspendCommand create workflow suspend command

func NewWorkflowTerminateCommand added in v1.1.0

func NewWorkflowTerminateCommand(_ common.Args, _ cmdutil.IOStreams, wargs *WorkflowArgs) *cobra.Command

NewWorkflowTerminateCommand create workflow terminate command

func NewWorkloadsCommand

func NewWorkloadsCommand(c common2.Args, ioStreams cmdutil.IOStreams) *cobra.Command

NewWorkloadsCommand creates `workloads` command

func NormalFormatPrinter added in v1.6.0

func NormalFormatPrinter(ctx context.Context, deployments *v1.DeploymentList, mc *metrics.Clientset) (*uitable.Table, error)

NormalFormatPrinter prints information in format of normal

func OpenBrowser

func OpenBrowser(url string) error

OpenBrowser will open browser by url in different OS system nolint:gosec

func ParseCapability added in v1.2.0

func ParseCapability(mapper meta.RESTMapper, 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

func PrintHelpByTag(cmd *cobra.Command, all []*cobra.Command, tag string)

PrintHelpByTag print custom defined help message

func PrintInstalledCompDef added in v1.2.0

func PrintInstalledCompDef(c common2.Args, io cmdutil.IOStreams, filter filterFunc) error

PrintInstalledCompDef will print all ComponentDefinition in cluster

func PrintInstalledTraitDef added in v1.2.0

func PrintInstalledTraitDef(c common2.Args, io cmdutil.IOStreams, filter filterFunc) error

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, velaC common.Args, queryView *velaql.QueryView) (*value.Value, error)

QueryValue get queryValue from velaQL

func ReadDefinitionsFromFile added in v1.6.2

func ReadDefinitionsFromFile(path string, io cmdutil.IOStreams) ([]*unstructured.Unstructured, error)

ReadDefinitionsFromFile will read objects from file or dir in the format of yaml

func RevisionCommandGroup added in v1.3.0

func RevisionCommandGroup(c common.Args, order string) *cobra.Command

RevisionCommandGroup the commands for managing application revisions

func RunHelp

func RunHelp(cmd *cobra.Command, args []string)

RunHelp exec help [command]

func SetEnv

func SetEnv(envArgs *types.EnvMeta, args []string, ioStreams cmdutil.IOStreams) error

SetEnv sets current environment

func ShowReferenceConsole added in v1.0.3

func ShowReferenceConsole(ctx context.Context, c common.Args, ioStreams cmdutil.IOStreams, capabilityName string, ns, location, i18nPath string, rev int64) error

ShowReferenceConsole will show capability reference in console

func ShowReferenceMarkdown added in v1.5.0

func ShowReferenceMarkdown(ctx context.Context, c common.Args, ioStreams cmdutil.IOStreams, capabilityNameOrPath, outputPath, location, i18nPath, ns string, rev int64) error

ShowReferenceMarkdown will show capability in "markdown" format

func SpecifiedFormatPrinter added in v1.6.0

func SpecifiedFormatPrinter(deployment v1.Deployment) *uitable.Table

SpecifiedFormatPrinter prints the specified deployment's information

func StoreRepos added in v1.2.0

func StoreRepos(registries []RegistryConfig) error

StoreRepos will store registry repo locally

func TemplateCommandGroup added in v1.6.0

func TemplateCommandGroup(f velacmd.Factory, order string, streams util.IOStreams) *cobra.Command

TemplateCommandGroup commands for the template of the config

func TrackDeployStatus

func TrackDeployStatus(c common.Args, appName string, namespace string) (commontypes.ApplicationPhase, error)

TrackDeployStatus will only check AppConfig is deployed successfully,

func TransAddonName added in v1.1.1

func TransAddonName(name string) string

TransAddonName will turn addon's name from xxx/yyy to xxx-yyy

func WideFormatPrinter added in v1.6.0

func WideFormatPrinter(ctx context.Context, deployments *v1.DeploymentList, mc *metrics.Clientset) (*uitable.Table, error)

WideFormatPrinter prints information in format of wide

func YamlFormatPrinter added in v1.6.0

func YamlFormatPrinter(deployments *v1.DeploymentList) (string, error)

YamlFormatPrinter prints information in format of yaml

Types

type AdoptOptions added in v1.7.0

type AdoptOptions struct {
	Type         string `json:"type"`
	Mode         string `json:"mode"`
	AppName      string `json:"appName"`
	AppNamespace string `json:"appNamespace"`

	HelmReleaseName      string
	HelmReleaseNamespace string
	HelmDriver           string
	HelmConfig           *action.Configuration
	HelmStore            *storage.Storage
	HelmRelease          *release.Release
	HelmReleaseRevisions []*release.Release

	NativeResourceRefs []*resourceRef

	Apply   bool
	Recycle bool
	Yes     bool
	All     bool

	AdoptTemplateFile     string
	AdoptTemplate         string
	AdoptTemplateCUEValue cue.Value

	ResourceTopologyRuleFile string
	ResourceTopologyRule     string
	AllGVKs                  []schema.GroupVersionKind

	Resources []*unstructured.Unstructured `json:"resources"`

	util.IOStreams
}

AdoptOptions options for vela adopt command

func (*AdoptOptions) Complete added in v1.7.0

func (opt *AdoptOptions) Complete(f velacmd.Factory, cmd *cobra.Command, args []string) (err error)

Complete autofill fields in opts

func (*AdoptOptions) Init added in v1.7.6

func (opt *AdoptOptions) Init(f velacmd.Factory, cmd *cobra.Command, args []string) (err error)

Init .

func (*AdoptOptions) MultipleRun added in v1.7.6

func (opt *AdoptOptions) MultipleRun(f velacmd.Factory, cmd *cobra.Command) error

MultipleRun .

func (*AdoptOptions) Run added in v1.7.0

func (opt *AdoptOptions) Run(f velacmd.Factory, cmd *cobra.Command) error

Run collect resources, assemble into application and print/apply

func (*AdoptOptions) Validate added in v1.7.0

func (opt *AdoptOptions) Validate() error

Validate if opts is valid

type AppDeployStatus added in v1.6.2

type AppDeployStatus int

AppDeployStatus represents the status of application during "vela init" and "vela up --wait"

type Args

type Args struct {
	Output        string
	Args          common.Args
	Name          string
	CtxName       string
	Namespace     string
	ContainerName string
	PodName       string
	ClusterName   string
	ComponentName string
	StepName      string
	App           *v1beta1.Application
}

Args creates arguments for `logs` command

func (*Args) Run

func (l *Args) Run(ctx context.Context, ioStreams util.IOStreams) error

Run refer to the implementation at https://github.com/oam-dev/stern/blob/master/stern/main.go

type ConfigDeleteCommandOptions added in v1.6.0

type ConfigDeleteCommandOptions struct {
	Namespace string
	Name      string
	NotRecall bool
}

ConfigDeleteCommandOptions the options of the command that delete the config.

type ConfigListCommandOptions added in v1.6.0

type ConfigListCommandOptions struct {
	Namespace    string
	Template     string
	AllNamespace bool
}

ConfigListCommandOptions the options of the command that list configs.

type Content added in v1.2.0

type Content struct {
	OssContent
	GithubContent
	LocalContent
}

Content contains different type of content needed when building Registry

func Parse added in v1.2.0

func Parse(addr string) (string, *Content, error)

Parse will parse config from address

type CreateConfigCommandOptions added in v1.6.0

type CreateConfigCommandOptions struct {
	Template    string
	Namespace   string
	Name        string
	File        string
	Properties  map[string]interface{}
	DryRun      bool
	Targets     []string
	Description string
	Alias       string
}

CreateConfigCommandOptions the options of the command that create the config.

func (CreateConfigCommandOptions) Validate added in v1.6.0

func (i CreateConfigCommandOptions) Validate() error

Validate validate the options

type CueXEvalOption added in v1.9.0

type CueXEvalOption struct {
	Format string
	Path   string
	File   string
}

CueXEvalOption option for compile cuex

func (*CueXEvalOption) Run added in v1.9.0

func (in *CueXEvalOption) Run(cmd *cobra.Command) error

Run compile cuex

type DeleteOptions added in v1.7.0

type DeleteOptions struct {
	AppNames  []string
	Namespace string

	All         bool
	Wait        bool
	Orphan      bool
	Force       bool
	Interactive bool

	AssumeYes bool
}

DeleteOptions options for vela delete command

func (*DeleteOptions) Complete added in v1.7.0

func (opt *DeleteOptions) Complete(f velacmd.Factory, cmd *cobra.Command, args []string) error

Complete .

func (*DeleteOptions) DeleteApp added in v1.7.0

func (opt *DeleteOptions) DeleteApp(f velacmd.Factory, cmd *cobra.Command, app *v1beta1.Application) error

DeleteApp delete one application

func (*DeleteOptions) Run added in v1.7.0

func (opt *DeleteOptions) Run(f velacmd.Factory, cmd *cobra.Command) error

Run vela delete

func (*DeleteOptions) Validate added in v1.7.0

func (opt *DeleteOptions) Validate() error

Validate validate if vela delete args are valid

type DistributeConfigCommandOptions added in v1.6.0

type DistributeConfigCommandOptions struct {
	Targets   []string
	Config    string
	Namespace string
	Recalled  bool
}

DistributeConfigCommandOptions the options of the command that distribute the config.

type DryRunCmdOptions added in v1.0.3

type DryRunCmdOptions struct {
	cmdutil.IOStreams
	ApplicationFiles     []string
	DefinitionFile       string
	OfflineMode          bool
	MergeStandaloneFiles bool
	DefinitionNamespace  string
}

DryRunCmdOptions contains dry-run cmd options

type Filter added in v1.3.0

type Filter struct {
	Component        string
	Cluster          string
	ClusterNamespace string
}

Filter filter options

type GenKubeConfigOptions added in v1.4.0

type GenKubeConfigOptions struct {
	auth.Identity
	util.IOStreams
}

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

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 .

func (*GrantPrivilegesOptions) Run added in v1.4.0

Run .

func (*GrantPrivilegesOptions) Validate added in v1.4.0

func (opt *GrantPrivilegesOptions) Validate(f velacmd.Factory, cmd *cobra.Command) error

Validate .

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

type KubeApplyOptions struct {
	util.IOStreams
	// contains filtered or unexported fields
}

KubeApplyOptions options for kube apply

func (*KubeApplyOptions) Complete added in v1.4.0

func (opt *KubeApplyOptions) Complete(ctx context.Context) error

Complete .

func (*KubeApplyOptions) Run added in v1.4.0

func (opt *KubeApplyOptions) Run(ctx context.Context, cli client.Client) error

Run will apply objects to clusters

func (*KubeApplyOptions) Validate added in v1.4.0

func (opt *KubeApplyOptions) Validate() error

Validate will not only validate the args but also read from files and generate the objects

type KubeDeleteOptions added in v1.4.0

type KubeDeleteOptions struct {
	util.IOStreams
	// contains filtered or unexported fields
}

KubeDeleteOptions options for kube delete

func (*KubeDeleteOptions) Complete added in v1.4.0

func (opt *KubeDeleteOptions) Complete(f velacmd.Factory, cmd *cobra.Command, args []string)

Complete .

func (*KubeDeleteOptions) Run added in v1.4.0

func (opt *KubeDeleteOptions) Run(f velacmd.Factory, cmd *cobra.Command) error

Run .

func (*KubeDeleteOptions) Validate added in v1.4.0

func (opt *KubeDeleteOptions) Validate() error

Validate .

type ListBucketResult added in v1.2.0

type ListBucketResult struct {
	File  []string `xml:"Contents>Key"`
	Count int      `xml:"KeyCount"`
}

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 .

func (*ListPrivilegesOptions) Run added in v1.4.0

Run .

func (*ListPrivilegesOptions) Validate added in v1.4.0

func (opt *ListPrivilegesOptions) Validate(f velacmd.Factory, cmd *cobra.Command) error

Validate .

type LiveDiffCmdOptions added in v1.0.3

type LiveDiffCmdOptions struct {
	cmdutil.IOStreams
	ApplicationFile   string
	DefinitionFile    string
	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 PodArgs added in v1.5.0

type PodArgs struct {
	Args      common.Args
	Namespace string
	Filter    Filter
	App       *v1beta1.Application
}

PodArgs creates arguments for `pods` command

type Printable added in v1.2.0

type Printable struct {
	Order int64
	Use   string
	Desc  string
}

Printable is a struct for print help

func NewPrintable added in v1.9.0

func NewPrintable(c *cobra.Command, desc string) Printable

NewPrintable create printable object

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

func GetRegistry(regName string) (Registry, error)

GetRegistry get a Registry implementation by name

func NewRegistry added in v1.2.0

func NewRegistry(ctx context.Context, token, registryName string, regURL string) (Registry, error)

NewRegistry will create a registry implementation

func NewRegistryFromConfig added in v1.2.0

func NewRegistryFromConfig(config RegistryConfig) (Registry, error)

NewRegistryFromConfig return Registry interface to get capabilities

type RegistryConfig added in v1.9.0

type RegistryConfig struct {
	Name  string `json:"name"`
	URL   string `json:"url"`
	Token string `json:"token"`
}

RegistryConfig is used to store registry config in file

func ListRegistryConfig added in v1.2.0

func ListRegistryConfig() ([]RegistryConfig, error)

ListRegistryConfig will get all registry config stored in local this will return at least one config, which is DefaultRegistry

type RegistryFile added in v1.2.0

type RegistryFile struct {
	// contains filtered or unexported fields
}

RegistryFile describes a file item in registry

type TemplateApplyCommandOptions added in v1.6.0

type TemplateApplyCommandOptions struct {
	File      string
	Namespace string
	Name      string
}

TemplateApplyCommandOptions the options of the command that apply the config template.

type TemplateCommandOptions added in v1.6.0

type TemplateCommandOptions struct {
	Namespace string
	Name      string
}

TemplateCommandOptions the options of the command that delete or show the config template.

type TemplateListCommandOptions added in v1.6.0

type TemplateListCommandOptions struct {
	Namespace    string
	AllNamespace bool
}

TemplateListCommandOptions the options of the command that list the config templates.

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
	ShardID        string
	Debug          bool
	Wait           bool
	WaitTimeout    string
}

UpCommandOptions command args for vela up

func (*UpCommandOptions) Complete added in v1.3.1

func (opt *UpCommandOptions) Complete(f velacmd.Factory, cmd *cobra.Command, args []string)

Complete fill the args for vela up

func (*UpCommandOptions) Run added in v1.3.1

func (opt *UpCommandOptions) Run(f velacmd.Factory, cmd *cobra.Command) error

Run execute the vela up command

func (*UpCommandOptions) Validate added in v1.3.1

func (opt *UpCommandOptions) Validate() error

Validate if vela up args is valid, interrupt the command

type UserInput added in v1.2.3

type UserInput struct {
	Writer io.Writer
	Reader *bufio.Reader
}

UserInput user input in command

func NewUserInput added in v1.2.3

func NewUserInput() *UserInput

NewUserInput new user input util

func (*UserInput) AskBool added in v1.2.3

func (ui *UserInput) AskBool(question string, opts *UserInputOptions) bool

AskBool format the answer to bool type

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

	ComponentName string
	PodName       string
	ClusterName   string
	ContainerName string

	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) Init

func (o *VelaExecOptions) Init(ctx context.Context, c *cobra.Command, argsIn []string) error

Init prepares the arguments accepted by the Exec command

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

	ClusterName   string
	ComponentName string
	ResourceName  string
	ResourceType  string

	Ctx   context.Context
	VelaC common.Args

	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 WorkflowArgs added in v1.6.0

type WorkflowArgs struct {
	Type             string
	Output           string
	ControllerLabels map[string]string
	Operator         wfUtils.WorkflowOperator
	StepOperator     wfUtils.WorkflowStepOperator
	Writer           io.Writer
	Args             common.Args
	StepName         string
	StepID           string
	ErrMap           map[string]string
	App              *v1beta1.Application
	WorkflowRun      *workflowv1alpha1.WorkflowRun
	WorkflowInstance *wfTypes.WorkflowInstance
}

WorkflowArgs is the args for workflow command

Directories

Path Synopsis
top

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL