assets

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Addons = map[string]*Addon{
	"addon-manager": NewAddon([]*MemoryAsset{
		NewMemoryAsset(
			"deploy/addons/addon-manager.yaml",
			"/etc/kubernetes/manifests/",
			"addon-manager.yaml",
			"0640"),
	}, true, "addon-manager"),
	"dashboard": NewAddon([]*MemoryAsset{
		NewMemoryAsset(
			"deploy/addons/dashboard-rc.yaml",
			constants.AddonsPath,
			"dashboard-rc.yaml",
			"0640"),
		NewMemoryAsset(
			"deploy/addons/dashboard-svc.yaml",
			constants.AddonsPath,
			"dashboard-svc.yaml",
			"0640"),
	}, true, "dashboard"),
	"kube-dns": NewAddon([]*MemoryAsset{
		NewMemoryAsset(
			"deploy/addons/kube-dns-rc.yaml",
			constants.AddonsPath,
			"kube-dns-rc.yaml",
			"0640"),
		NewMemoryAsset(
			"deploy/addons/kube-dns-svc.yaml",
			constants.AddonsPath,
			"kube-dns-svc.yaml",
			"0640"),
	}, true, "kube-dns"),
	"heapster": NewAddon([]*MemoryAsset{
		NewMemoryAsset(
			"deploy/addons/influxGrafana-rc.yaml",
			constants.AddonsPath,
			"influxGrafana-rc.yaml",
			"0640"),
		NewMemoryAsset(
			"deploy/addons/grafana-svc.yaml",
			constants.AddonsPath,
			"grafana-svc.yaml",
			"0640"),
		NewMemoryAsset(
			"deploy/addons/influxdb-svc.yaml",
			constants.AddonsPath,
			"influxdb-svc.yaml",
			"0640"),
		NewMemoryAsset(
			"deploy/addons/heapster-rc.yaml",
			constants.AddonsPath,
			"heapster-rc.yaml",
			"0640"),
		NewMemoryAsset(
			"deploy/addons/heapster-svc.yaml",
			constants.AddonsPath,
			"heapster-svc.yaml",
			"0640"),
	}, false, "heapster"),
}

Functions

func AddMinikubeAddonsDirToAssets

func AddMinikubeAddonsDirToAssets(assetList *[]CopyableFile)

Types

type Addon

type Addon struct {
	Assets []*MemoryAsset
	// contains filtered or unexported fields
}

func NewAddon

func NewAddon(assets []*MemoryAsset, enabled bool, addonName string) *Addon

func (*Addon) IsEnabled

func (a *Addon) IsEnabled() (bool, error)

type BaseAsset

type BaseAsset struct {
	Length      int
	AssetName   string
	TargetDir   string
	TargetName  string
	Permissions string
	// contains filtered or unexported fields
}

func (*BaseAsset) GetAssetName

func (b *BaseAsset) GetAssetName() string

func (*BaseAsset) GetPermissions

func (b *BaseAsset) GetPermissions() string

func (*BaseAsset) GetTargetDir

func (b *BaseAsset) GetTargetDir() string

func (*BaseAsset) GetTargetName

func (b *BaseAsset) GetTargetName() string

type CopyableFile

type CopyableFile interface {
	io.Reader
	GetLength() int
	GetAssetName() string
	GetTargetDir() string
	GetTargetName() string
	GetPermissions() string
}

type FileAsset

type FileAsset struct {
	BaseAsset
}

func NewFileAsset

func NewFileAsset(assetName, targetDir, targetName, permissions string) (*FileAsset, error)

func (*FileAsset) GetLength

func (f *FileAsset) GetLength() int

func (*FileAsset) Read

func (f *FileAsset) Read(p []byte) (int, error)

type MemoryAsset

type MemoryAsset struct {
	BaseAsset
}

func NewMemoryAsset

func NewMemoryAsset(assetName, targetDir, targetName, permissions string) *MemoryAsset

func (*MemoryAsset) GetLength

func (m *MemoryAsset) GetLength() int

func (*MemoryAsset) Read

func (m *MemoryAsset) Read(p []byte) (int, error)

Jump to

Keyboard shortcuts

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