base

package
v0.7.17 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
}

Factory factory for s3 backends.

func (*Factory) New

func (f *Factory) New(spec map[string]interface{}, stack *project.Stack) (project.Unit, error)

New creates new unit driver factory.

func (*Factory) NewFromState

func (f *Factory) NewFromState(spec map[string]interface{}, modKey string, p *project.StateProject) (project.Unit, error)

NewFromState creates new unit from state data.

type KubectlCliT

type KubectlCliT struct {
	Version     string `yaml:"recursive" json:"recursive"`
	Autoinstall bool   `yaml:"autoinstall" json:"autoinstall"`
}

type Unit

type Unit struct {
	common.Unit
	Namespace      string             `yaml:"namespace,omitempty" json:"namespace,omitempty"`
	Kubeconfig     *string            `yaml:"kubeconfig,omitempty" json:"kubeconfig,omitempty"`
	KubectlOpts    string             `yaml:"kubectl_opts,omitempty" json:"kubectl_opts,omitempty"`
	KubectlCliConf *KubectlCliT       `yaml:"kubectl,omitempty" json:"kubectl,omitempty"`
	Path           string             `yaml:"path" json:"path"`
	ManifestsFiles *common.FilesListT `yaml:"-" json:"manifests"`
	ApplyTemplate  bool               `yaml:"apply_template" json:"-"`

	UnitKind   string      `yaml:"-" json:"type"`
	SavedState interface{} `yaml:"-" json:"-"`

	CreateNamespaces bool `yaml:"create_namespaces" json:"-"`
	// contains filtered or unexported fields
}

Unit describe cluster.dev unit to deploy/destroy k8s resources with kubectl.

func NewEmptyUnit

func NewEmptyUnit() *Unit

func NewUnit

func NewUnit(spec map[string]interface{}, stack *project.Stack) (*Unit, error)

func (*Unit) Apply

func (u *Unit) Apply() error

Apply unit.

func (*Unit) Build

func (u *Unit) Build() error

func (*Unit) Destroy

func (u *Unit) Destroy() error

Destroy unit.

func (*Unit) GetDiffData

func (u *Unit) GetDiffData() interface{}

func (*Unit) GetManifestsMap

func (u *Unit) GetManifestsMap() (res map[string]interface{}, namespaces []string)

func (*Unit) GetState

func (u *Unit) GetState() interface{}

func (*Unit) GetStateDiffData

func (u *Unit) GetStateDiffData() interface{}

func (*Unit) GetUnitDiff

func (u *Unit) GetUnitDiff() UnitDiffSpec

func (*Unit) Init

func (u *Unit) Init() error

Init unit.

func (*Unit) KindKey

func (u *Unit) KindKey() string

func (*Unit) LoadState

func (u *Unit) LoadState(spec interface{}, modKey string, p *project.StateProject) error

func (*Unit) Plan

func (u *Unit) Plan() error

Plan unit.

func (*Unit) Prepare

func (u *Unit) Prepare() error

Prepare scan all markers in unit, and build project unit links, and unit dependencies.

func (*Unit) ReadConfig

func (u *Unit) ReadConfig(spec map[string]interface{}, stack *project.Stack) error

func (*Unit) ReadManifestsPath

func (u *Unit) ReadManifestsPath(src string) error

func (*Unit) ScanData

func (u *Unit) ScanData(scanner project.MarkerScanner) error

ScanData scan all markers in unit, and build project unit links, and unit dependencies.

type UnitDiffSpec

type UnitDiffSpec struct {
	common.UnitDiffSpec
	Manifests interface{} `json:"manifests"`
}

type YAMLFilesList

type YAMLFilesList struct {
	Files common.FilesListT
}

Jump to

Keyboard shortcuts

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