definition

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OutputFieldName is the name of the struct contains the CR data
	OutputFieldName = process.OutputFieldName
	// OutputsFieldName is the name of the struct contains the map[string]CR data
	OutputsFieldName = process.OutputsFieldName
	// PatchFieldName is the name of the struct contains the patch of CR data
	PatchFieldName = "patch"
	// CustomMessage defines the custom message in definition template
	CustomMessage = "message"
	// HealthCheckPolicy defines the health check policy in definition template
	HealthCheckPolicy = "isHealth"
)
View Source
const (
	// AuxiliaryWorkload defines the extra workload obj from a workloadDefinition,
	// e.g. a workload composed by deployment and service, the service will be marked as AuxiliaryWorkload
	AuxiliaryWorkload = "AuxiliaryWorkload"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractEngine added in v0.3.3

type AbstractEngine interface {
	Complete(ctx process.Context, abstractTemplate string, params interface{}) error
	HealthCheck(ctx process.Context, cli client.Client, ns string, healthPolicyTemplate string) (bool, error)
	Status(ctx process.Context, cli client.Client, ns string, customStatusTemplate string) (string, error)
}

AbstractEngine defines Definition's Render interface

func NewTraitAbstractEngine added in v0.3.3

func NewTraitAbstractEngine(name string, pd *PackageDiscover) AbstractEngine

NewTraitAbstractEngine create Trait Definition AbstractEngine

func NewWorkloadAbstractEngine added in v0.3.3

func NewWorkloadAbstractEngine(name string, pd *PackageDiscover) AbstractEngine

NewWorkloadAbstractEngine create Workload Definition AbstractEngine

type PackageDiscover added in v1.0.0

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

PackageDiscover defines the inner CUE packages loaded from K8s cluster

func NewPackageDiscover added in v1.0.0

func NewPackageDiscover(config *rest.Config) (*PackageDiscover, error)

NewPackageDiscover will create a PackageDiscover client with the K8s config file.

func (*PackageDiscover) Exist added in v1.0.0

Exist checks if the GVK exists in the built-in packages

func (*PackageDiscover) ImportBuiltinPackagesFor added in v1.0.0

func (pd *PackageDiscover) ImportBuiltinPackagesFor(bi *build.Instance)

ImportBuiltinPackagesFor will add KubeVela built-in packages into your CUE instance

func (*PackageDiscover) RefreshKubePackagesFromCluster added in v1.0.0

func (pd *PackageDiscover) RefreshKubePackagesFromCluster() error

RefreshKubePackagesFromCluster will use K8s client to load/refresh all K8s open API as a reference kube package using in template

Jump to

Keyboard shortcuts

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