Documentation ¶
Overview ¶
The declarative package contains tools for building the manifests that the operators use in a declarative manner. A Builder can be used to build all the manifests of a package. The build process includes transforming specific manifests, common transformations for all the manifests in a package and mutating the kustomization file in the package. A builder instance can be used to apply or delete the built resource manifest.
Index ¶
- func IsKustomization(path string) bool
- func ManifestTransformForPackage(fs filesys.FileSystem, packageName string) (transform.ManifestTransform, error)
- type Builder
- type BuilderOption
- func WithCommonTransforms(commonTransforms []transform.TransformFunc) BuilderOption
- func WithKubectlClient(kubectl kubectl.KubectlClient) BuilderOption
- func WithKustomizeMutationFunc(kMutateFuncs []kustomize.MutateFunc) BuilderOption
- func WithManifestTransform(manifestTransform transform.ManifestTransform) BuilderOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsKustomization ¶
isKustomization takes a path and returns true if the path is a kustomization file.
func ManifestTransformForPackage ¶
func ManifestTransformForPackage(fs filesys.FileSystem, packageName string) (transform.ManifestTransform, error)
ManifestTransformForPackage returns a ManifestTransform of all the manifests in a package.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder helps build resources declaratively and apply or delete them.
func NewBuilder ¶
func NewBuilder(packageName string, fs filesys.FileSystem, opts ...BuilderOption) (*Builder, error)
NewBuilder builds a package, given a filesystem and build options and returns a builder which can be used to apply or delete the built resource manifests.
type BuilderOption ¶
type BuilderOption func(*Builder)
BuilderOption is used to configure Builder.
func WithCommonTransforms ¶
func WithCommonTransforms(commonTransforms []transform.TransformFunc) BuilderOption
WithCommonTransforms sets the common manifest transforms to be used by the builder.
func WithKubectlClient ¶
func WithKubectlClient(kubectl kubectl.KubectlClient) BuilderOption
WithKubectlClient sets the kubectl client used by the builder.
func WithKustomizeMutationFunc ¶
func WithKustomizeMutationFunc(kMutateFuncs []kustomize.MutateFunc) BuilderOption
WithKustomizeMutationFunc sets the kustomization mutation functions.
func WithManifestTransform ¶
func WithManifestTransform(manifestTransform transform.ManifestTransform) BuilderOption
WithManifestTransform sets the ManifestTransform of the builder.
Directories ¶
Path | Synopsis |
---|---|
Package deleter provides a kubectl deleter that can be easily imported and used to delete resources.
|
Package deleter provides a kubectl deleter that can be easily imported and used to delete resources. |
Package kubectl provides interface and default implementation of kubectl client to be used declaratively.
|
Package kubectl provides interface and default implementation of kubectl client to be used declaratively. |
Package kustomize provides tools to interact with kustomization files.
|
Package kustomize provides tools to interact with kustomization files. |