Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterLocalConfig ¶ added in v0.20.3
func FilterLocalConfig(objs []*unstructured.Unstructured) []*unstructured.Unstructured
FilterLocalConfig returns a new slice of Unstructured where all resources with the LocalConfig annotation is filtered out.
func SetNamespaces ¶ added in v0.20.3
func SetNamespaces(mapper meta.RESTMapper, objs []*unstructured.Unstructured, defaultNamespace string, enforceNamespace bool) error
SetNamespaces verifies that every namespaced resource has the namespace set, and if one does not, it will set the namespace to the provided defaultNamespace. This implementation will check each resource (that doesn't already have the namespace set) on whether it is namespace or cluster scoped. It does this by first checking the RESTMapper, and it there is not match there, it will look for CRDs in the provided Unstructureds.
Types ¶
type ManifestReader ¶
type ManifestReader interface {
Read() ([]*unstructured.Unstructured, error)
}
ManifestReader defines the interface for reading a set of manifests into info objects.
type PathManifestReader ¶
type PathManifestReader struct { Path string ReaderOptions }
PathManifestReader reads manifests from the provided path and returns them as Info objects. The returned Infos will not have client or mapping set.
func (*PathManifestReader) Read ¶
func (p *PathManifestReader) Read() ([]*unstructured.Unstructured, error)
Read reads the manifests and returns them as Info objects.
type ReaderOptions ¶
type ReaderOptions struct { Mapper meta.RESTMapper Validate bool Namespace string EnforceNamespace bool }
ReaderOptions defines the shared inputs for the different implementations of the ManifestReader interface.
type StreamManifestReader ¶
type StreamManifestReader struct { ReaderName string Reader io.Reader ReaderOptions }
StreamManifestReader reads manifest from the provided io.Reader and returns them as Info objects. The returned Infos will not have client or mapping set.
func (*StreamManifestReader) Read ¶
func (r *StreamManifestReader) Read() ([]*unstructured.Unstructured, error)
Read reads the manifests and returns them as Info objects.