operator

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal added in v0.5.0

func Marshal(content map[string]interface{}) ([]byte, error)

Types

type Allowed

type Allowed struct {
	Port     string
	Protocol string
}

type Arguments

type Arguments struct {
	Ctx             context.Context
	Logger          logging.Logger
	GitClient       *git.Client
	MasterKey       string
	DesiredFile     string
	CurrentFile     string
	SecretsFile     string
	RootAssembler   Assembler
	Watchers        []Watcher
	Stop            chan struct{}
	BeforeIteration func(desired []byte, secrets *Secrets) error
}

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) Contains added in v0.8.0

func (f Firewall) Contains(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) Contains added in v0.8.0

func (this *Software) Contains(that 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