component

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: EUPL-1.2 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LibreshSystemNamespace = "libresh-system"
	FluxNamespace          = "flux-system"

	KSClusterPath       = "./cluster"
	KSComponentsSubPath = "components"

	KSInterval      = 30 * time.Minute
	KSRetryInterval = 1 * time.Minute
	KSTimeout       = 3 * time.Minute
)

Variables

This section is empty.

Functions

func ConfigureComponent

func ConfigureComponent()

func ToUnstructured

func ToUnstructured(obj runtime.Object) (*unstructured.Unstructured, error)

func WaitForComponent

func WaitForComponent(Component) error

Types

type BasicComponent

type BasicComponent struct {
	Name       string                           `json:"name,omitempty"`
	Source     string                           `json:"source,omitempty"`
	Type       string                           `json:"type,omitempty"`
	DependsOn  []meta.NamespacedObjectReference `json:"dependsOn,omitempty"`
	Scope      string                           `json:"scope,omitempty"`
	Required   bool                             `json:"required,omitempty"`
	AdminCreds bool                             `json:"adminCreds,omitempty"`
}

func (*BasicComponent) Apply

func (c *BasicComponent) Apply(ctx context.Context, manager *ssa.ResourceManager) error

func (*BasicComponent) Check

func (c *BasicComponent) Check() error

func (*BasicComponent) Create

func (c *BasicComponent) Create(ctx context.Context, manager *ssa.ResourceManager) (*ssa.ChangeSet, error)

func (*BasicComponent) GetName

func (c *BasicComponent) GetName() string

func (*BasicComponent) KSPath

func (c *BasicComponent) KSPath() string

func (*BasicComponent) Reconcile

func (c *BasicComponent) Reconcile(ctx context.Context, manager *ssa.ResourceManager) (*ssa.ChangeSet, error)

func (*BasicComponent) Resources

func (c *BasicComponent) Resources(scheme *runtime.Scheme) []runtime.Object

func (*BasicComponent) Wait

func (c *BasicComponent) Wait(ctx context.Context, manager *ssa.ResourceManager) error

type ClusterSettings

type ClusterSettings struct {
	Name          string `json:"name,omitempty"`
	Domain        string `json:"domain,omitempty"`
	Email         string `json:"email,omitempty"`
	Environment   string `json:"environment,omitempty"`
	ClusterIssuer string `json:"clusterIssuer,omitempty"`
}

type Component

type Component interface {
	Check() error
	GetName() string
	Reconcile(ctx context.Context, manager *ssa.ResourceManager) (*ssa.ChangeSet, error)
	Resources(scheme *runtime.Scheme) []runtime.Object
}

type Model

type Model interface {
	Complete() (bool, error)

	tea.Model
}

type Scope

type Scope interface {
	Stage() (Model, error)
	SetManager(m *ssa.ResourceManager)
	Init() error
}

type ScopeModel

type ScopeModel struct {
	Components []string
	Done       *bool
	Manager    *ssa.ResourceManager
}

func NewScopeModel

func NewScopeModel(m *ssa.ResourceManager) *ScopeModel

func (*ScopeModel) SetManager

func (s *ScopeModel) SetManager(m *ssa.ResourceManager)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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