Documentation
¶
Index ¶
- type Builder
- type BuilderOptionFunc
- func WithClientConfig(rcg *genericclioptions.ConfigFlags, clientOpts *runclient.Options) BuilderOptionFunc
- func WithDryRun(dryRun bool) BuilderOptionFunc
- func WithIgnore(ignore []string) BuilderOptionFunc
- func WithKustomizationFile(file string) BuilderOptionFunc
- func WithLocalSources(localSources map[string]string) BuilderOptionFunc
- func WithNamespace(namespace string) BuilderOptionFunc
- func WithProgressBar() BuilderOptionFunc
- func WithRecursive(recursive bool) BuilderOptionFunc
- func WithSingleKustomization() BuilderOptionFunc
- func WithStrictSubstitute(strictSubstitute bool) BuilderOptionFunc
- func WithTimeout(timeout time.Duration) BuilderOptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder builds yaml manifests It retrieves the kustomization object from the k8s cluster and overlays the manifests with the resources specified in the resourcesPath
func NewBuilder ¶
func NewBuilder(name, resources string, opts ...BuilderOptionFunc) (*Builder, error)
NewBuilder returns a new Builder It takes a kustomization name and a path to the resources It also takes a list of BuilderOptionFunc to configure the builder One of the options is WithClientConfig, that must be provided for the builder to work with the k8s cluster One other option is WithKustomizationFile, that must be provided for the builder to work with a local kustomization file. If the kustomization file is not provided, the builder will try to retrieve the kustomization object from the k8s cluster. WithDryRun sets the dry-run flag, and needs to be provided if the builder is used for a dry-run. This flag works in conjunction with WithKustomizationFile, because the kustomization object is not retrieved from the k8s cluster when the dry-run flag is set.
func (*Builder) Build ¶
func (b *Builder) Build() ([]*unstructured.Unstructured, error)
Build builds the yaml manifests from the kustomization object and overlays the manifests with the resources specified in the resourcesPath It expects a kustomization.yaml file in the resourcesPath, and it will generate a kustomization.yaml file if it doesn't exist
func (*Builder) StartSpinner ¶ added in v2.4.0
func (*Builder) StopSpinner ¶ added in v2.4.0
type BuilderOptionFunc ¶
BuilderOptionFunc is a function that configures a Builder
func WithClientConfig ¶
func WithClientConfig(rcg *genericclioptions.ConfigFlags, clientOpts *runclient.Options) BuilderOptionFunc
WithClientConfig sets the client configuration
func WithKustomizationFile ¶
func WithKustomizationFile(file string) BuilderOptionFunc
WithKustomizationFile sets the kustomization file
func WithLocalSources ¶ added in v2.4.0
func WithLocalSources(localSources map[string]string) BuilderOptionFunc
WithLocalSources sets the local sources field
func WithNamespace ¶
func WithNamespace(namespace string) BuilderOptionFunc
WithNamespace sets the namespace
func WithProgressBar ¶
func WithProgressBar() BuilderOptionFunc
func WithRecursive ¶ added in v2.4.0
func WithRecursive(recursive bool) BuilderOptionFunc
WithRecursive sets the recursive field
func WithSingleKustomization ¶ added in v2.4.0
func WithSingleKustomization() BuilderOptionFunc
WithSingleKustomization sets the single kustomization field to true
func WithStrictSubstitute ¶ added in v2.3.0
func WithStrictSubstitute(strictSubstitute bool) BuilderOptionFunc
WithStrictSubstitute sets the strict substitute flag
func WithTimeout ¶
func WithTimeout(timeout time.Duration) BuilderOptionFunc
WithTimeout sets the timeout for the builder