Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BytesSource ¶
type BytesSource struct {
Data []byte
}
BytesSource loads resources from an in-memory multi-document YAML stream. It is the in-memory counterpart to FileSource, for consumers that already hold manifests in memory (for example a controller reading them from a ConfigMap) rather than on disk.
func NewBytesSource ¶
func NewBytesSource(data []byte) *BytesSource
NewBytesSource creates a BytesSource over the given YAML bytes.
func (*BytesSource) Load ¶
func (b *BytesSource) Load() ([]Resource, error)
Load parses the in-memory YAML stream into resources, applying the same multi-document parsing and skip rules as FileSource.
type FileSource ¶
type FileSource struct {
Path string
}
FileSource loads resources from plain YAML files.
func NewFileSource ¶
func NewFileSource(path string) *FileSource
func (*FileSource) Load ¶
func (f *FileSource) Load() ([]Resource, error)
type HelmSource ¶
HelmSource loads resources by running helm template.
func NewHelmSource ¶
func NewHelmSource(chartPath, releaseName string, valuesFiles []string) *HelmSource
func (*HelmSource) Load ¶
func (h *HelmSource) Load() ([]Resource, error)
type KustomizeSource ¶
type KustomizeSource struct {
Path string
}
KustomizeSource loads resources by running kustomize build.
func NewKustomizeSource ¶
func NewKustomizeSource(path string) *KustomizeSource
func (*KustomizeSource) Load ¶
func (k *KustomizeSource) Load() ([]Resource, error)
type Resource ¶
type Resource struct {
APIVersion string
Kind string
Name string
Namespace string
Object *unstructured.Unstructured
}
Resource represents a parsed Kubernetes resource from a local source.