Documentation ¶
Index ¶
- Constants
- func ApplyTerraform(app *v1beta1.Application, k8sClient client.Client, ioStream util.IOStreams, ...) ([]commontypes.ApplicationComponent, error)
- func BuildRun(ctx context.Context, app *api.Application, client client.Client, ...) error
- func CreateOrUpdateApplication(ctx context.Context, client client.Client, app *v1beta1.Application) error
- func CreateOrUpdateObjects(ctx context.Context, client client.Client, objects []oam.Object) error
- func GetApplicationSettings(app *v1beta1.Application, componentName string) (string, map[string]interface{})
- func GetComponents(app *v1beta1.Application) []string
- func GetServiceConfig(app *api.Application, componentName string) (string, map[string]interface{})
- func GetTraits(app *api.Application, componentName string) (map[string]map[string]interface{}, error)
- func GetWorkload(app *api.Application, componentName string) (string, map[string]interface{})
- func LoadApplication(namespace, appName string, c common.Args) (*v1beta1.Application, error)
- func NewApplication(f *api.AppFile, tm template.Manager) *api.Application
- func NewEmptyApplication(namespace string, c common.Args) (*api.Application, error)
- func Run(ctx context.Context, client client.Client, app *v1beta1.Application, ...) error
- func SetWorkload(app *api.Application, componentName, workloadType string, ...) error
- func Validate(app *api.Application) error
Constants ¶
const ( // TerraformBaseLocation is the base directory to store all Terraform JSON files TerraformBaseLocation = ".vela/terraform/" // TerraformLog is the logfile name for terraform TerraformLog = "terraform.log" )
Variables ¶
This section is empty.
Functions ¶
func ApplyTerraform ¶
func ApplyTerraform(app *v1beta1.Application, k8sClient client.Client, ioStream util.IOStreams, namespace string, args common.Args) ([]commontypes.ApplicationComponent, error)
ApplyTerraform deploys addon resources
func BuildRun ¶ added in v1.5.0
func BuildRun(ctx context.Context, app *api.Application, client client.Client, namespace string, io util.IOStreams) error
BuildRun will build application and deploy from Appfile
func CreateOrUpdateApplication ¶
func CreateOrUpdateApplication(ctx context.Context, client client.Client, app *v1beta1.Application) error
CreateOrUpdateApplication will create if not exist and update if exists.
func CreateOrUpdateObjects ¶
CreateOrUpdateObjects will create all scopes
func GetApplicationSettings ¶
func GetApplicationSettings(app *v1beta1.Application, componentName string) (string, map[string]interface{})
GetApplicationSettings will get service type and it's configuration
func GetComponents ¶
func GetComponents(app *v1beta1.Application) []string
GetComponents will get oam components from v1beta1.Application.
func GetServiceConfig ¶
func GetServiceConfig(app *api.Application, componentName string) (string, map[string]interface{})
GetServiceConfig will get service type and it's configuration
func GetTraits ¶
func GetTraits(app *api.Application, componentName string) (map[string]map[string]interface{}, error)
GetTraits will list all traits and it's configurations attached to the specified component.
func GetWorkload ¶
func GetWorkload(app *api.Application, componentName string) (string, map[string]interface{})
GetWorkload will get workload type and it's configuration
func LoadApplication ¶
LoadApplication will load application from cluster.
func NewApplication ¶
NewApplication will create application object
func NewEmptyApplication ¶
NewEmptyApplication new empty application, only set tm
func Run ¶
func Run(ctx context.Context, client client.Client, app *v1beta1.Application, assistantObjects []oam.Object) error
Run will deploy OAM objects and other assistant K8s Objects including ConfigMap, OAM Scope Custom Resource.
func SetWorkload ¶
func SetWorkload(app *api.Application, componentName, workloadType string, workloadData map[string]interface{}) error
SetWorkload will set user workload for Appfile
func Validate ¶
func Validate(app *api.Application) error
Validate will validate whether an Appfile is valid.
Types ¶
This section is empty.