appfile

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

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

func CreateOrUpdateObjects(ctx context.Context, client client.Client, objects []oam.Object) error

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

func LoadApplication(namespace, appName string, c common.Args) (*v1beta1.Application, error)

LoadApplication will load application from cluster.

func NewApplication

func NewApplication(f *api.AppFile, tm template.Manager) *api.Application

NewApplication will create application object

func NewEmptyApplication

func NewEmptyApplication(namespace string, c common.Args) (*api.Application, error)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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