cluster

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterProviderFactory

func RegisterProviderFactory(providerType string, factory ProviderFactory) error

RegisterProviderFactory - each Provider registers itself so it can be used when specified in a Manifest

Types

type Cluster

type Cluster struct {
	Config Config

	Provider Provider
	// contains filtered or unexported fields
}

Cluster impl.

func New

func New(clusterConfig []byte) (*Cluster, error)

New cluster.

func (*Cluster) Reconcile

func (c *Cluster) Reconcile() error

Reconcile cluster.

type Config

type Config struct {
	Name            string          `yaml:"name"`
	Installed       bool            `yaml:"installed"`
	Addons          map[string]bool `yaml:"addons,omitempty"`
	Apps            []string        `yaml:"apps,omitempty"`
	ProviderConfig  interface{}     `yaml:"provider"`
	ClusterFullName string
}

Config - cluster data from cluster manifest.

type Provider

type Provider interface {
	Deploy() error
	Destroy() error
}

Provider - interface fo all providers.

func NewProvider

func NewProvider(clusterConfig Config, state *State) (Provider, error)

NewProvider return new provider instance of providerType.

type ProviderFactory

type ProviderFactory interface {
	New(cfg []byte, state *State, clusterName string) (Provider, error)
}

ProviderFactory - interface for providers factories.

type State

type State struct {
	KubeConfig       []byte
	KubeAccessInfo   string
	AddonsAccessInfo string
}

State - cluster state which is changed by module and provisioners.

Jump to

Keyboard shortcuts

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