runtime

package
v0.1.63 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRuntimeVersionCompatible added in v0.1.0

func CheckRuntimeVersionCompatible(requiredCLIVersion string) error

func GetRuntimeDefURL added in v0.1.0

func GetRuntimeDefURL(versionStr string) string

Types

type AppDef

type AppDef struct {
	Name       string         `json:"name"`
	Type       string         `json:"type"`
	URL        string         `json:"url"`
	SyncWave   int            `json:"syncWave,omitempty"`
	Wait       bool           `json:"wait,omitempty"`
	IsInternal bool           `json:"isInternal,omitempty"`
	Feature    InstallFeature `json:"feature,omitempty"`
	Chart      string         `json:"chart,omitempty"`
	Include    string         `json:"include,omitempty"`
	Exclude    string         `json:"exclude,omitempty"`
}

func (*AppDef) CreateApp

func (a *AppDef) CreateApp(ctx context.Context, f apkube.Factory, cloneOpts *apgit.CloneOptions, runtimeName, runtimeNamespace, cfType string, optionalValues ...string) error

type CommonConfig

type CommonConfig struct {
	CodefreshBaseURL string `json:"baseUrl"`
}

type HelmConfig added in v0.0.511

type HelmConfig struct {
	apapp.Config
	SrcChart string `json:"srcChart"`
	Values   string `json:"values,omitempty"`
}

type HelmValuesProvider added in v0.0.518

type HelmValuesProvider interface {
	GetValues(name string) (string, error)
}

type InstallFeature added in v0.0.511

type InstallFeature string
const (
	InstallFeatureIngressless InstallFeature = "ingressless"
)

type Runtime

type Runtime struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	Spec RuntimeSpec `json:"spec"`
}

func Download

func Download(runtimeDef, name string, namespace string, featuresToInstall []InstallFeature) (*Runtime, error)

func Load

func Load(fs apfs.FS, filename string) (*Runtime, error)

func (*Runtime) Install added in v0.0.518

func (r *Runtime) Install(ctx context.Context, f apkube.Factory, cloneOpts *apgit.CloneOptions, valuesProvider HelmValuesProvider) error

func (*Runtime) Save

func (r *Runtime) Save(fs apfs.FS, filename string, config *CommonConfig) error

func (*Runtime) Upgrade

func (r *Runtime) Upgrade(fs apfs.FS, newRt *Runtime, config *CommonConfig) ([]AppDef, error)

type RuntimeSpec

type RuntimeSpec struct {
	DefVersion          *semver.Version      `json:"defVersion"`
	RequiredCLIVersion  string               `json:"requiredCLIVersion"`
	Version             *semver.Version      `json:"version"`
	Ref                 string               `json:"ref"`
	BootstrapSpecifier  string               `json:"bootstrapSpecifier"`
	Components          []AppDef             `json:"components"`
	Cluster             string               `json:"cluster"`
	IngressHost         string               `json:"ingressHost,omitempty"`
	IngressClass        string               `json:"ingressClassName,omitempty"`
	InternalIngressHost string               `json:"internalIngressHost,omitempty"`
	IngressController   string               `json:"ingressController,omitempty"`
	AccessMode          platmodel.AccessMode `json:"accessMode"`
	Repo                string               `json:"repo"`
}

func (*RuntimeSpec) FullSpecifier

func (r *RuntimeSpec) FullSpecifier() string

Jump to

Keyboard shortcuts

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