packages

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	APIVersion = "kudo.dev/v1beta1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Files added in v0.9.0

type Files struct {
	Templates Templates
	Operator  *OperatorFile
	Params    *ParamsFile
}

Files represents the raw operator package format the way it is found in the tgz packages

type Group added in v0.17.0

type Group struct {
	Name        string `json:"name,omitempty"`
	DisplayName string `json:"displayName,omitempty"`
	Description string `json:"description,omitempty"`
	Priority    int    `json:"prio,omitempty"`
}

type Groups added in v0.17.0

type Groups []Group

type OperatorFile added in v0.9.0

type OperatorFile struct {
	APIVersion        string                  `json:"apiVersion,omitempty"`
	Name              string                  `json:"name"`
	Description       string                  `json:"description,omitempty"`
	OperatorVersion   string                  `json:"operatorVersion"`
	AppVersion        string                  `json:"appVersion,omitempty"`
	KUDOVersion       string                  `json:"kudoVersion,omitempty"`
	KubernetesVersion string                  `json:"kubernetesVersion,omitempty"`
	Maintainers       []*kudoapi.Maintainer   `json:"maintainers,omitempty"`
	URL               string                  `json:"url,omitempty"`
	Tasks             []kudoapi.Task          `json:"tasks"`
	Plans             map[string]kudoapi.Plan `json:"plans"`
	NamespaceManifest string                  `json:"namespaceManifest,omitempty"`
}

OperatorFile is a representation of the package operator.yaml

type PackageScope added in v0.18.0

type PackageScope struct {
	Resources            *Resources
	DependenciesResolver Resolver
}

PackageScope type provides operator resources together with a "scope-aware" dependency resolver. For example, a dependency like `./child-operator` in an local directory needs the host system to be resolved, but when found in a tarball, it needs the contents of the tarball because the dependency is not allowed to "escape" into the host system.

type Parameter added in v0.9.0

type Parameter struct {
	DisplayName string                `json:"displayName,omitempty"`
	Name        string                `json:"name,omitempty"`
	Description string                `json:"description,omitempty"`
	Required    *bool                 `json:"required,omitempty"`
	Default     interface{}           `json:"default,omitempty"`
	Trigger     string                `json:"trigger,omitempty"`
	Type        kudoapi.ParameterType `json:"type,omitempty"`
	Immutable   *bool                 `json:"immutable,omitempty"`
	Enum        *[]interface{}        `json:"enum,omitempty"`

	// The following fields are descriptive only and are not used in the OperatorVersion. They are only used on the
	// package level and are not converted to the CRDs, as they are only used during installation of an operator and
	// are not necessary server-side.
	Group    string `json:"group,omitempty"`
	Advanced *bool  `json:"advanced,omitempty"`
	Hint     string `json:"hint,omitempty"`
}

Modified kudoapi.Parameter that allows for defaults provided as YAML.

func (*Parameter) EnumValues added in v0.17.0

func (p *Parameter) EnumValues() []interface{}

func (*Parameter) HasDefault added in v0.16.0

func (p *Parameter) HasDefault() bool

func (Parameter) IsAdvanced added in v0.17.0

func (p Parameter) IsAdvanced() bool

func (Parameter) IsEnum added in v0.17.0

func (p Parameter) IsEnum() bool

func (Parameter) IsImmutable added in v0.16.0

func (p Parameter) IsImmutable() bool

func (Parameter) IsRequired added in v0.16.0

func (p Parameter) IsRequired() bool

func (*Parameter) ValidateDefault added in v0.17.0

func (p *Parameter) ValidateDefault() error

type Parameters added in v0.11.0

type Parameters []Parameter

func (Parameters) Len added in v0.11.0

func (p Parameters) Len() int

Len returns the number of params. This is needed to allow sorting of params.

func (Parameters) Less added in v0.11.0

func (p Parameters) Less(x, y int) bool

Less returns true if the name of a param a is less than the name of param b. This is needed to allow sorting of params.

func (Parameters) Swap added in v0.11.0

func (p Parameters) Swap(i, j int)

Swap swaps the position of two items in the params slice. This is needed to allow sorting of params.

type ParamsFile added in v0.9.0

type ParamsFile struct {
	APIVersion string     `json:"apiVersion,omitempty"`
	Groups     Groups     `json:"groups,omitempty"`
	Parameters Parameters `json:"parameters"`
}

ParamsFile is a representation of the package params.yaml

type Resolver added in v0.18.0

type Resolver interface {
	Resolve(name string, appVersion string, operatorVersion string) (*PackageScope, error)
}

Resolver will try to resolve a given package name to either local tarball, folder, remote url or an operator in the remote repository.

type Resources added in v0.8.0

type Resources struct {
	Operator        *kudoapi.Operator
	OperatorVersion *kudoapi.OperatorVersion
	Instance        *kudoapi.Instance
}

Resources is collection of CRDs that are used when installing operator during installation, package format is converted to this structure

func (*Resources) AppVersionString added in v0.18.0

func (p *Resources) AppVersionString() string

func (*Resources) OperatorName added in v0.18.0

func (p *Resources) OperatorName() string

func (*Resources) OperatorVersionString added in v0.18.0

func (p *Resources) OperatorVersionString() string

type Templates added in v0.9.0

type Templates map[string]string

Templates is a map of file names and stringified files in the template folder of an operator

type Verifier added in v0.11.0

type Verifier interface {
	Verify(pf *Files) verifier.Result
}

Verifier defines the interface for all parameter verifiers

Directories

Path Synopsis
Package install provides function to install package resources on a Kubernetes cluster.
Package install provides function to install package resources on a Kubernetes cluster.
verifier

Jump to

Keyboard shortcuts

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