registry

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractBundleImage added in v0.19.0

func ExtractBundleImage(ctx context.Context, logger *log.Entry, image string, local bool) (string, error)

ExtractBundleImage returns a bundle directory containing files extracted from image. If local is true, the image will not be pulled.

func FindMetadataDir added in v0.19.0

func FindMetadataDir(bundleRoot string) (metadataDir string, err error)

FindMetadataDir walks bundleRoot searching for metadata, and returns that directory if found. If one is not found, an error is returned.

func RewriteAnnotationsYaml added in v0.19.0

func RewriteAnnotationsYaml(filename string, content map[string]string) error

RewriteAnnotationsYaml unmarshalls the specified yaml file, appends the content and converts it again to yaml.

func ValidateBundleContent

func ValidateBundleContent(logger *log.Entry, bundle *apimanifests.Bundle,
	mediaType string) []apierrors.ManifestResult

ValidateBundleContent confirms that the CSV and CRD files inside the bundle directory are valid and can be installed in a cluster. Other GVK types are also validated to confirm if they are "kubectl-able" to a cluster meaning if they can be applied to a cluster using `kubectl` provided users have all necessary permissions and configurations.

Types

type Labels added in v0.19.0

type Labels map[string]string

Labels is a set of key:value labels from an operator-registry object.

func GetImageLabels added in v0.19.0

func GetImageLabels(ctx context.Context, logger *log.Entry, image string, local bool) (Labels, error)

GetImageLabels returns the set of labels on image.

func GetMetadataLabels added in v0.19.0

func GetMetadataLabels(metadataDir string) (Labels, error)

GetMetadataLabels reads annotations from file(s) in metadataDir and returns them as Labels.

func (Labels) GetManifestsDir added in v0.19.0

func (ls Labels) GetManifestsDir() (string, bool)

GetManifestsDir returns the manifests directory name in ls using a predefined key, or false if it does not exist.

Jump to

Keyboard shortcuts

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