manifests

package
v0.3.25 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: Apache-2.0 Imports: 11 Imported by: 29

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetManifestsDir

func GetManifestsDir(dir string) (*PackageManifest, []*Bundle, error)

GetManifestsDir parses all bundles and a package manifest from a directory

func NewBundleLoader

func NewBundleLoader(dir string) bundleLoader

func NewPackageManifestLoader

func NewPackageManifestLoader(dir string) packageManifestLoader

Types

type Annotations

type Annotations struct {
	// PackageName is the name of the overall package, ala `etcd`.
	PackageName string `json:"operators.operatorframework.io.bundle.package.v1" yaml:"operators.operatorframework.io.bundle.package.v1"`

	// Channels are a comma separated list of the declared channels for the bundle, ala `stable` or `alpha`.
	Channels string `json:"operators.operatorframework.io.bundle.channels.v1" yaml:"operators.operatorframework.io.bundle.channels.v1"`

	// DefaultChannelName is, if specified, the name of the default channel for the package. The
	// default channel will be installed if no other channel is explicitly given. If the package
	// has a single channel, then that channel is implicitly the default.
	DefaultChannelName string `` /* 127-byte string literal not displayed */
}

Annotations is a list of annotations for a given bundle

type AnnotationsFile

type AnnotationsFile struct {
	// annotations is a list of annotations for a given bundle
	Annotations Annotations `json:"annotations" yaml:"annotations"`
}

AnnotationsFile holds annotation information about a bundle

type Bundle

type Bundle struct {
	Name           string
	Objects        []*unstructured.Unstructured
	Package        string
	Channels       []string
	DefaultChannel string
	BundleImage    string
	CSV            *operatorsv1alpha1.ClusterServiceVersion
	V1beta1CRDs    []*apiextensionsv1beta1.CustomResourceDefinition
	V1CRDs         []*apiextensionsv1.CustomResourceDefinition
	Dependencies   []*Dependency
}

func GetBundleFromDir

func GetBundleFromDir(dir string) (*Bundle, error)

GetBundleFromDir takes a raw directory containg an Operator Bundle and serializes its component files (CSVs, CRDs, other native kube manifests) and returns it as a Bundle

func (*Bundle) ObjectsToValidate

func (b *Bundle) ObjectsToValidate() []interface{}

type DependenciesFile

type DependenciesFile struct {
	// Dependencies is a list of dependencies for a given bundle
	Dependencies []Dependency `json:"dependencies" yaml:"dependencies"`
}

DependenciesFile holds dependency information about a bundle

type Dependency

type Dependency struct {
	// The type of dependency. It can be `olm.package` for operator-version based
	// dependency or `olm.gvk` for gvk based dependency. This field is required.
	Type string `json:"type" yaml:"type"`

	// The value of the dependency (either GVKDependency or PackageDependency)
	Value string `json:"value" yaml:"value"`
}

Dependencies is a list of dependencies for a given bundle

type PackageChannel

type PackageChannel struct {
	// Name is the name of the channel, e.g. `alpha` or `stable`
	Name string `json:"name" yaml:"name"`

	// CurrentCSVName defines a reference to the CSV holding the version of this package currently
	// for the channel.
	CurrentCSVName string `json:"currentCSV" yaml:"currentCSV"`
}

PackageChannel defines a single channel under a package, pointing to a version of that package.

type PackageManifest

type PackageManifest struct {
	// PackageName is the name of the overall package, ala `etcd`.
	PackageName string `json:"packageName" yaml:"packageName"`

	// Channels are the declared channels for the package, ala `stable` or `alpha`.
	Channels []PackageChannel `json:"channels" yaml:"channels"`

	// DefaultChannelName is, if specified, the name of the default channel for the package. The
	// default channel will be installed if no other channel is explicitly given. If the package
	// has a single channel, then that channel is implicitly the default.
	DefaultChannelName string `json:"defaultChannel" yaml:"defaultChannel"`
}

PackageManifest holds information about a package, which is a reference to one (or more) channels under a single package.

func (*PackageManifest) IsEmpty

func (p *PackageManifest) IsEmpty() bool

IsEmpty returns true if the PackageManifest instance is equal to the zero value

Jump to

Keyboard shortcuts

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