fbcutil

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemaChannel   = "olm.channel"
	SchemaPackage   = "olm.package"
	DefaultChannel  = "operator-sdk-run-bundle"
	DefaultCacheDir = "operator-sdk-run-bundle-cache"
)
View Source
const (
	// defaultIndexImageBase is the base for defaultIndexImage. It is necessary to separate
	// them for string comparison when defaulting bundle add mode.
	DefaultIndexImageBase = "quay.io/operator-framework/opm:"
	// DefaultIndexImage is the index base image used if none is specified. It contains no bundles.
	// TODO(v2.0.0): pin this image tag to a specific version.
	DefaultIndexImage = DefaultIndexImageBase + "latest"
)

Variables

This section is empty.

Functions

func IsFBC

func IsFBC(ctx context.Context, indexImage string) (bool, error)

IsFBC will determine if an index image uses the File-Based Catalog or SQLite index image format. The default index image will adopt the File-Based Catalog format.

func NullLogger added in v1.22.2

func NullLogger() *log.Entry

func RenderRefs

func RenderRefs(ctx context.Context, refs []string, skipTLSVerify bool, useHTTP bool) (*declarativeconfig.DeclarativeConfig, error)

RenderRefs will invoke Operator Registry APIs and return a declarative config object representation of the references that are passed in as a string array.

func ValidateAndStringify

func ValidateAndStringify(declcfg *declarativeconfig.DeclarativeConfig) (string, error)

ValidateAndStringify first converts the generated declarative config to a model and validates it. If the declarative config model is valid, it will convert the declarative config to a YAML string and return it.

Types

type BundleDeclcfg

type BundleDeclcfg struct {
	Package declcfg.Package
	Channel declcfg.Channel
	Bundle  declcfg.Bundle
}

BundleDeclcfg represents a minimal File-Based Catalog. This struct only consists of one Package, Bundle, and Channel blob. It is used to represent the bundle image in the File-Based Catalog format.

type FBCContext

type FBCContext struct {
	Package       string
	ChannelName   string
	Refs          []string
	ChannelEntry  declarativeconfig.ChannelEntry
	SkipTLSVerify bool
	UseHTTP       bool
}

FBCContext is a struct that stores all the required information while constructing a new File-Based Catalog on the fly. The fields from this struct are passed as parameters to Operator Registry API calls to generate declarative config objects.

func (*FBCContext) CreateFBC

func (f *FBCContext) CreateFBC(ctx context.Context) (BundleDeclcfg, error)

CreateFBC generates an FBC by creating bundle, package and channel blobs.

Jump to

Keyboard shortcuts

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