clusterserviceversion

package
v1.25.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// WatchNamespaceEnv is a constant for internal use.
	WatchNamespaceEnv = "WATCH_NAMESPACE"
	// TargetNamespacesRef references the target namespaces a CSV is installed in.
	// This is required by legacy project Deployments.
	TargetNamespacesRef = "metadata.annotations['olm.targetNamespaces']"
)

Variables

This section is empty.

Functions

func ApplyTo

ApplyTo applies relevant manifests in c to csv, sorts the applied updates, and validates the result.

Types

type Generator

type Generator struct {
	// OperatorName is the operator's name, ex. app-operator.
	OperatorName string
	// Version is the CSV current version.
	Version string
	// FromVersion is the version of a previous CSV to upgrade from.
	FromVersion string
	// Collector holds all manifests relevant to the Generator.
	Collector *collector.Manifests
	// Annotations are applied to the resulting CSV.
	Annotations map[string]string
	// ExtraServiceAccounts are ServiceAccount names to consider when matching
	// {Cluster}Roles to include in a CSV via their Bindings.
	ExtraServiceAccounts []string
	// RelatedImages are additional images used by the operator.
	RelatedImages []operatorsv1alpha1.RelatedImage
	// contains filtered or unexported fields
}

ClusterServiceVersion configures ClusterServiceVersion manifest generation.

func (*Generator) Generate

func (g *Generator) Generate(opts ...Option) (err error)

Generate configures the generator with col and opts then runs it.

type Option

type Option func(*Generator) error

Option is a function that modifies a Generator.

func WithBundleWriter

func WithBundleWriter(dir string) Option

WithBundleWriter sets a Generator's writer to a bundle CSV file under <dir>/manifests.

func WithPackageWriter added in v0.19.0

func WithPackageWriter(dir string) Option

WithPackageWriter sets a Generator's writer to a package CSV file under <dir>/<version>.

func WithWriter

func WithWriter(w io.Writer) Option

WithWriter sets a Generator's writer to w.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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