operator

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allowed

type Allowed struct {
	Port     string
	Protocol string
}

type Arguments

type Arguments struct {
	Ctx           context.Context
	Logger        logging.Logger
	MasterKey     string
	RepoURL       string
	DesiredFile   string
	CurrentFile   string
	SecretsFile   string
	DeploymentKey string
	RepoCommitter string
	RootAssembler Assembler
	Watchers      []Watcher
	Stop          chan struct{}
}

type Assembler

type Assembler interface {
	BuildContext() ([]string, func(map[string]interface{}))
	Build(spec map[string]interface{}, nodagentUpdater NodeAgentUpdater, secrets *Secrets, dependantConfig interface{}) (string, string, interface{}, map[string]Assembler, error)
	Ensure(ctx context.Context, secrets *Secrets, ensuredDependencies map[string]interface{}) (interface{}, error)
}

type CurrentNodeAgentKind

type CurrentNodeAgentKind struct {
	Version string
	State   *NodeAgentCurrent
}

type Firewall

type Firewall map[string]Allowed

func (Firewall) Equals

func (f Firewall) Equals(other Firewall) bool

type IterationDone

type IterationDone struct {
	Error   error
	Current []byte
	Secrets map[string]interface{}
}

type Iterator

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

func New

func New(args *Arguments) *Iterator

func (*Iterator) Initialize

func (i *Iterator) Initialize() error

func (*Iterator) Run

func (i *Iterator) Run(iterations chan<- *IterationDone)

type NodeAgentCurrent

type NodeAgentCurrent struct {
	NodeIsReady bool `mapstructure:"ready" yaml:"ready"`
	Software    Software
	Open        Firewall
	Version     string
	// contains filtered or unexported fields
}

func (*NodeAgentCurrent) AllowChanges

func (n *NodeAgentCurrent) AllowChanges()

func (*NodeAgentCurrent) DesireFirewall

func (n *NodeAgentCurrent) DesireFirewall(fw Firewall)

func (*NodeAgentCurrent) DesireSoftware

func (n *NodeAgentCurrent) DesireSoftware(sw *Software)

type NodeAgentKind

type NodeAgentKind struct {
	Kind    string
	Version string
	Spec    interface{}
	Current *CurrentNodeAgentKind `yaml:",omitempty"`
}

type NodeAgentSpec

type NodeAgentSpec struct {
	ChangesAllowed bool
	//	RebootEnabled  bool
	Software *Software
	Firewall Firewall
}

type NodeAgentUpdater

type NodeAgentUpdater func(path []string) *NodeAgentCurrent

type Package

type Package struct {
	Version string            `yaml:",omitempty"`
	Config  map[string]string `yaml:",omitempty"`
}

func (*Package) Equals

func (p *Package) Equals(other *Package) bool

type Secrets

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

func (*Secrets) Delete

func (s *Secrets) Delete(property string) error

func (*Secrets) Read

func (s *Secrets) Read(property string) ([]byte, error)

func (*Secrets) Write

func (s *Secrets) Write(property string, value []byte) error

type Software

type Software struct {
	Swap             Package `yaml:",omitempty"`
	Kubelet          Package `yaml:",omitempty"`
	Kubeadm          Package `yaml:",omitempty"`
	Kubectl          Package `yaml:",omitempty"`
	Containerruntime Package `yaml:",omitempty"`
	KeepaliveD       Package `yaml:",omitempty"`
	Nginx            Package `yaml:",omitempty"`
	Hostname         Package `yaml:",omitempty"`
}

func (*Software) Equals

func (s *Software) Equals(other *Software) bool

type Watcher

type Watcher interface {
	Watch(fire chan<- struct{}) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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