applyinator

package
v0.0.1-alpha26 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: Apache-2.0 Imports: 20 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Applyinator

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

func NewApplyinator

func NewApplyinator(workDir string, preserveWorkDir bool, appliedPlanDir string, imageUtil *image.Utility) *Applyinator

func (*Applyinator) Apply

func (a *Applyinator) Apply(ctx context.Context, cp CalculatedPlan) ([]byte, error)

type CalculatedPlan

type CalculatedPlan struct {
	Plan     Plan
	Checksum string
}

CalculatedPlan is passed into Applyinator and is a Plan with checksum calculated

func CalculatePlan

func CalculatePlan(rawPlan []byte) (CalculatedPlan, error)

type File

type File struct {
	Content     string `json:"content,omitempty"`
	Directory   bool   `json:"directory,omitempty"`
	UID         int    `json:"uid,omitempty"`
	GID         int    `json:"gid,omitempty"`
	Path        string `json:"path,omitempty"`
	Permissions string `json:"permissions,omitempty"` // internally, the string will be converted to a uint32 to satisfy os.FileMode
}

Path would be `/etc/kubernetes/ssl/ca.pem`, Content is base64 encoded. If Directory is true, then we are creating a directory, not a file

type Instruction

type Instruction struct {
	Name       string   `json:"name,omitempty"`
	SaveOutput bool     `json:"saveOutput,omitempty"`
	Image      string   `json:"image,omitempty"`
	Env        []string `json:"env,omitempty"`
	Args       []string `json:"args,omitempty"`
	Command    string   `json:"command,omitempty"`
}

type Plan

type Plan struct {
	Files        []File                  `json:"files,omitempty"`
	Instructions []Instruction           `json:"instructions,omitempty"`
	Probes       map[string]prober.Probe `json:"probes,omitempty"`
}

Jump to

Keyboard shortcuts

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