Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAnnotations ¶
NewAnnotations returns a new annotation object. If outputDir contains a template, it will be read and added.
func NewClusterServiceVersion ¶
func NewClusterServiceVersion(outputDir string) (*v1alpha1.ClusterServiceVersion, error)
NewClusterServiceVersion returns a new *ClusterServiceVersion with the YAML in outputDir if it exists, otherwise it will return an empty *ClusterServiceVersion.
func Validate ¶
func Validate(resources []*unstructured.Unstructured) error
Validate checks whether objects can be included in an OLM bundle.
Types ¶
type CustomResourceDefinition ¶
type CustomResourceDefinition struct{}
CustomResourceDefinition adds metadata of given CustomResourceDefinitions to ClusterServiceVersion as owned CRD.
func (*CustomResourceDefinition) Run ¶
func (*CustomResourceDefinition) Run(manifest *unstructured.Unstructured, csv *v1alpha1.ClusterServiceVersion) (bool, error)
Run adds CRD ownership information to ClusterServiceVersion if given manifest is a CRD.
type Deployment ¶
type Deployment struct{}
Deployment scans Deployments to add their spec to ClusterServiceVersion.
func (*Deployment) Run ¶
func (*Deployment) Run(manifest *unstructured.Unstructured, csv *v1alpha1.ClusterServiceVersion) (bool, error)
Run adds the spec of Deployment manifests to ClusterServiceVersion. If successful, their manifests should not be included in the bundle separately.
type Embedder ¶
type Embedder struct {
Scanners []Scanner
}
Embedder runs given Scanners in order.
func (*Embedder) Embed ¶
func (g *Embedder) Embed(manifests []*unstructured.Unstructured, csv *v1alpha1.ClusterServiceVersion) ([]*unstructured.Unstructured, error)
Embed runs all scanners and validates whether the final list of manifests are of supported types by OLM.
type Scanner ¶
type Scanner interface {
Run(manifest *unstructured.Unstructured, csv *v1alpha1.ClusterServiceVersion) (ignore bool, err error)
}
Scanner is a struct that can take information from a manifest to add it to given ClusterServiceVersion and return whether the manifest should be ignored in the final package.