Documentation ¶
Index ¶
- func OverrideAnnotations(base map[string]string, outputDir string) error
- func OverrideClusterServiceVersion(base *v1alpha1.ClusterServiceVersion, outputDir string) error
- func Validate(resources []*unstructured.Unstructured) error
- type CustomResourceDefinition
- type Deployment
- type Embedder
- type Scanner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OverrideAnnotations ¶ added in v0.5.0
OverrideAnnotations reads the local annotations file and merges it with the given annotations map.
func OverrideClusterServiceVersion ¶ added in v0.5.0
func OverrideClusterServiceVersion(base *v1alpha1.ClusterServiceVersion, outputDir string) error
OverrideClusterServiceVersion reads the override file in the output directory and makes sure it's applied to the given base 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.