Documentation ¶
Index ¶
- func DiscardLogger() *log.Entry
- func ExtractBundleImage(ctx context.Context, logger *log.Entry, image string, local bool, ...) (string, error)
- func GetImageLabels(ctx context.Context, logger *log.Entry, image string, local bool) (map[string]string, error)
- func RewriteAnnotationsYaml(filename string, content map[string]string) error
- func ValidateBundleContent(logger *log.Entry, bundle *apimanifests.Bundle, mediaType string) []apierrors.ManifestResult
- type LabelsMap
- type MetadataNotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscardLogger ¶
DiscardLogger returns a logger that throws away input.
func ExtractBundleImage ¶
func ExtractBundleImage(ctx context.Context, logger *log.Entry, image string, local bool, skipTLSVerify bool, useHTTP bool) (string, error)
ExtractBundleImage returns a bundle directory containing files extracted from image. If local is true, the image will not be pulled.
func GetImageLabels ¶
func GetImageLabels(ctx context.Context, logger *log.Entry, image string, local bool) (map[string]string, error)
GetImageLabels returns the set of labels on image.
func RewriteAnnotationsYaml ¶
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 LabelsMap ¶
Labels is a set of key:value labels from an operator-registry object.
func FindBundleMetadata ¶
FindBundleMetadata walks bundleRoot searching for metadata (ex. annotations.yaml), and returns metadata and its path if found. If one is not found, an error is returned.
func (LabelsMap) GetManifestsDir ¶
GetManifestsDir returns the manifests directory name in ls using a predefined key, or false if it does not exist.
type MetadataNotFoundError ¶
type MetadataNotFoundError string
func (MetadataNotFoundError) Error ¶
func (e MetadataNotFoundError) Error() string