kdo

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: Apache-2.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerTag

func DockerTag() string

DockerTag -

func NewChartFunction

func NewChartFunction(repo Repo, dir string, options ...ChartOption) func(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (value starlark.Value, e error)

NewChartFunction -

func NewHelmChartFunction

func NewHelmChartFunction(repo Repo, dir string, options ...ChartOption) func(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (value starlark.Value, e error)

NewHelmChartFunction -

func NewJewel

func NewJewel(backend JewelBackend, name string) (starlark.Value, error)

NewJewel -

func ReadYamlFile

func ReadYamlFile(filename string) (starlark.Value, error)

ReadYamlFile -

func Version

func Version() string

Version -

func WriteYamlFile

func WriteYamlFile(filename string, value starlark.Value) error

WriteYamlFile -

Types

type Chart

type Chart interface {
	GetGenus() string
	GetName() string
	GetVersion() *semver.Version
	GetNamespace() string
	Apply(thread *starlark.Thread, k k8s.K8s) error
	Delete(thread *starlark.Thread, k k8s.K8s, options *DeleteOptions) error
	Template(thread *starlark.Thread, k k8s.K8s) k8s.Stream
	Package(writer io.Writer, helmFormat bool) error
	AddUsedBy(reference string, k k8s.K8s) (int, error)
	RemoveUsedBy(reference string, k k8s.K8s) (int, error)
}

Chart -

type ChartOption

type ChartOption func(options *ChartOptions)

ChartOption -

func WithArgs

func WithArgs(args starlark.Tuple) ChartOption

WithArgs -

func WithGenus

func WithGenus(value string) ChartOption

WithGenus -

func WithKwArgs

func WithKwArgs(kwargs []starlark.Tuple) ChartOption

WithKwArgs -

func WithNamespace

func WithNamespace(namespace string) ChartOption

WithNamespace -

func WithProperties

func WithProperties(properties *starlark.Dict) ChartOption

WithProperties -

func WithReadOnly

func WithReadOnly(value bool) ChartOption

WithReadOnly -

func WithSkipChart

func WithSkipChart(value bool) ChartOption

WithSkipChart -

func WithSuffix

func WithSuffix(suffix string) ChartOption

WithSuffix -

func WithValues

func WithValues(values map[string]interface{}) ChartOption

WithValues -

func WithVersion

func WithVersion(value *semver.Version) ChartOption

WithVersion -

type ChartOptions

type ChartOptions struct {
	GenusAndVersion
	// contains filtered or unexported fields
}

ChartOptions -

func (*ChartOptions) AddFlags

func (v *ChartOptions) AddFlags(flagsSet *pflag.FlagSet)

AddFlags -

func (*ChartOptions) KwArgs

func (v *ChartOptions) KwArgs(f *starlark.Function) []starlark.Tuple

func (*ChartOptions) Merge

func (v *ChartOptions) Merge() ChartOption

Merge -

type ChartValue

type ChartValue interface {
	Chart
	StructPropertyValue
}

ChartValue -

type ComplexJewelBackend

type ComplexJewelBackend interface {
	JewelBackend
	Template() (map[string][]byte, error)
	Delete(map[string][]byte) error
}

ComplexJewelBackend -

type DeleteOptions

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

DeleteOptions -

func (*DeleteOptions) AddFlags

func (s *DeleteOptions) AddFlags(flagsSet *pflag.FlagSet)

AddFlags -

type DirCache

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

DirCache -

func NewDirCache

func NewDirCache(baseDir string) *DirCache

NewDirCache -

func (*DirCache) WrapDir

func (d *DirCache) WrapDir(load LoadDir) OpenDirCache

WrapDir -

func (*DirCache) WrapReader

func (d *DirCache) WrapReader(load LoadReader) OpenReaderCache

WrapReader -

type GenusAndVersion

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

func NewGenusAndVersion

func NewGenusAndVersion(url string) *GenusAndVersion

func (*GenusAndVersion) AsOptions

func (s *GenusAndVersion) AsOptions() []ChartOption

type JewelBackend

type JewelBackend interface {
	Name() string
	Keys() map[string]JewelValue
	Apply(map[string][]byte) (map[string][]byte, error)
}

JewelBackend -

type JewelValue

type JewelValue struct {
	Name      string
	Converter func(data []byte) (starlark.Value, error)
}

JewelValue -

type LoadDir

type LoadDir = func(name string, targetDir func() (string, error), etagOld string) (etagNew string, err error)

LoadDir -

type LoadReader

type LoadReader = func(name string, etagOld string) (reader io.ReadCloser, etagNew string, err error)

LoadReader -

type OpenDirCache

type OpenDirCache = func(name string) (cachedDir string, err error)

OpenDirCache -

type OpenReaderCache

type OpenReaderCache = func(name string) (io.ReadCloser, error)

OpenReaderCache -

type Properties

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

Properties -

func (*Properties) GetValue

func (p *Properties) GetValue() starlark.Value

GetValue -

func (*Properties) Set

func (p *Properties) Set(val string) error

Set -

func (Properties) String

func (p Properties) String() string

func (Properties) Type

func (p Properties) Type() string

Type -

type Property

type Property interface {
	ReadProperty
	SetValue(value starlark.Value) error
}

Property -

type PropertyValue

type PropertyValue interface {
	Property
	starlark.HasAttrs
}

PropertyValue -

type ReadProperty

type ReadProperty interface {
	GetValue() starlark.Value
	GetValueOrDefault() starlark.Value
}

ReadProperty -

type Repo

type Repo interface {
	// Get -
	Get(thread *starlark.Thread, url string, options ...ChartOption) (ChartValue, error)
	// GetFromSpec -
	GetFromSpec(thread *starlark.Thread, spec *kdov1a2.ChartSpec, options ...ChartOption) (ChartValue, error)
	// List -
	List(thread *starlark.Thread, k8s k8s.K8s, listOptions *RepoListOptions) ([]ChartValue, error)
}

Repo -

func NewRepo

func NewRepo(config ...RepoConfig) (Repo, error)

NewRepo -

type RepoConfig

type RepoConfig func(r *repoConfigs) error

RepoConfig -

func WithBasicAuth

func WithBasicAuth(url string, username string, password string) RepoConfig

WithBasicAuth -

func WithCatalog

func WithCatalog(url string) RepoConfig

WithCatalog -

func WithConfigFile

func WithConfigFile(filename string) RepoConfig

WithConfigFile -

func WithTokenAuth

func WithTokenAuth(url string, token string) RepoConfig

WithTokenAuth -

type RepoListOptions

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

RepoListOptions -

func (*RepoListOptions) AddFlags

func (s *RepoListOptions) AddFlags(flagsSet *pflag.FlagSet)

AddFlags -

type StructPropertyValue

type StructPropertyValue interface {
	Property
	starlark.HasSetField
}

type Vault

type Vault interface {
	Write(name string, data map[string][]byte) error
	Read(name string) (map[string][]byte, error)
	IsNotExist(err error) bool
}

Vault -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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