Documentation
¶
Index ¶
Constants ¶
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 ¶
func ApplyTo(c *collector.Manifests, csv *operatorsv1alpha1.ClusterServiceVersion) error
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
// OperatorType determines what code API types are written in for getBase.
OperatorType projutil.OperatorType
// Version is the CSV current version.
Version string
// Collector holds all manifests relevant to the Generator.
Collector *collector.Manifests
// contains filtered or unexported fields
}
ClusterServiceVersion configures ClusterServiceVersion manifest generation.
func (*Generator) GenerateLegacy ¶
func (g *Generator) GenerateLegacy(opts ...LegacyOption) (err error)
GenerateLegacy configures the generator with opts then runs it. Used for generating files for legacy project layouts.
type LegacyOption ¶
type LegacyOption Option
LegacyOption is a function that modifies a Generator for legacy project layouts.
func WithBundleBase ¶
func WithBundleBase(inputDir, apisDir string, ilvl projutil.InteractiveLevel) LegacyOption
WithBundleBase sets a Generator's base CSV to a legacy-style bundle base.
type Option ¶
Option is a function that modifies a Generator.
func WithBase ¶
func WithBase(inputDir, apisDir string, ilvl projutil.InteractiveLevel) Option
WithBase sets a Generator's base CSV to a kustomize-style base.
func WithBaseWriter ¶
WithBaseWriter sets a Generator's writer to a kustomize-style base file under <dir>/bases.
func WithBundleWriter ¶
WithBundleWriter sets a Generator's writer to a bundle CSV file under <dir>/manifests.