Documentation ¶
Index ¶
- Constants
- func IsFBC(ctx context.Context, indexImage string) (bool, error)
- func NullLogger() *log.Entry
- func RenderRefs(ctx context.Context, refs []string, skipTLSVerify bool, useHTTP bool) (*declarativeconfig.DeclarativeConfig, error)
- func ValidateAndStringify(declcfg *declarativeconfig.DeclarativeConfig) (string, error)
- type BundleDeclcfg
- type FBCContext
Constants ¶
const ( SchemaChannel = "olm.channel" SchemaPackage = "olm.package" DefaultChannel = "operator-sdk-run-bundle" DefaultCacheDir = "operator-sdk-run-bundle-cache" )
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" // DefaultInitImage is the default image to be used in the registry init container DefaultInitImage = "docker.io/library/busybox:1.36.0" )
Variables ¶
This section is empty.
Functions ¶
func IsFBC ¶
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 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 ¶
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.