csv

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnnotations

func NewAnnotations(outputDir string) (map[string]string, error)

NewAnnotations returns a new annotation object. If outputDir contains a template, it will be read and added.

func NewClusterServiceVersion

func NewClusterServiceVersion(outputDir string) (*v1alpha1.ClusterServiceVersion, error)

NewClusterServiceVersion returns a new *ClusterServiceVersion with the YAML in outputDir if it exists, otherwise it will return an empty *ClusterServiceVersion.

func Validate

func Validate(resources []*unstructured.Unstructured) error

Validate checks whether objects can be included in an OLM bundle.

Types

type CustomResourceDefinition

type CustomResourceDefinition struct{}

CustomResourceDefinition adds metadata of given CustomResourceDefinitions to ClusterServiceVersion as owned CRD.

func (*CustomResourceDefinition) Run

Run adds CRD ownership information to ClusterServiceVersion if given manifest is a CRD.

type Deployment

type Deployment struct{}

Deployment scans Deployments to add their spec to ClusterServiceVersion.

func (*Deployment) Run

Run adds the spec of Deployment manifests to ClusterServiceVersion. If successful, their manifests should not be included in the bundle separately.

type Embedder

type Embedder struct {
	Scanners []Scanner
}

Embedder runs given Scanners in order.

func NewEmbedder

func NewEmbedder() *Embedder

NewEmbedder returns a new *Embedder.

func (*Embedder) Embed

Embed runs all scanners and validates whether the final list of manifests are of supported types by OLM.

type Scanner

type Scanner interface {
	Run(manifest *unstructured.Unstructured, csv *v1alpha1.ClusterServiceVersion) (ignore bool, err error)
}

Scanner is a struct that can take information from a manifest to add it to given ClusterServiceVersion and return whether the manifest should be ignored in the final package.

Jump to

Keyboard shortcuts

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