Documentation ¶
Index ¶
- Constants
- func ApplyTerraform(app *v1beta1.Application, k8sClient client.Client, ioStream util.IOStreams, ...) ([]commontypes.ApplicationComponent, 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 GetAppConfig(ctx context.Context, c client.Client, app *v1beta1.Application, ...) (*v1alpha2.ApplicationConfiguration, 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 RemoveComponent(app *v1beta1.Application, componentName string) error
- func RemoveTrait(app *api.Application, componentName, traitType string) error
- func Run(ctx context.Context, client client.Client, app *v1beta1.Application, ...) error
- func SetTrait(app *v1beta1.Application, componentName, traitType string, ...) 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 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 GetAppConfig ¶
func GetAppConfig(ctx context.Context, c client.Client, app *v1beta1.Application, env *types.EnvMeta) (*v1alpha2.ApplicationConfiguration, error)
GetAppConfig will get AppConfig from K8s cluster.
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 Appfile.
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 RemoveComponent ¶
func RemoveComponent(app *v1beta1.Application, componentName string) error
RemoveComponent will remove component from Application
func RemoveTrait ¶
func RemoveTrait(app *api.Application, componentName, traitType string) error
RemoveTrait will remove a trait from Appfile
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 SetTrait ¶
func SetTrait(app *v1beta1.Application, componentName, traitType string, traitData map[string]interface{}) error
SetTrait will set user trait for Appfile
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.