Documentation ¶
Index ¶
- type Builder
- type BuilderOptionFunc
- func WithClientConfig(rcg *genericclioptions.ConfigFlags, clientOpts *runclient.Options) BuilderOptionFunc
- func WithDryRun(dryRun bool) BuilderOptionFunc
- func WithKustomizationFile(file string) BuilderOptionFunc
- func WithNamespace(namespace string) BuilderOptionFunc
- func WithProgressBar() 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 ¶
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
type BuilderOptionFunc ¶
BuilderOptionFunc is a function that configures a Builder
func WithClientConfig ¶ added in v0.37.0
func WithClientConfig(rcg *genericclioptions.ConfigFlags, clientOpts *runclient.Options) BuilderOptionFunc
WithClientConfig sets the client configuration
func WithDryRun ¶ added in v0.37.0
func WithDryRun(dryRun bool) BuilderOptionFunc
WithDryRun sets the dry-run flag
func WithKustomizationFile ¶ added in v0.29.0
func WithKustomizationFile(file string) BuilderOptionFunc
WithKustomizationFile sets the kustomization file
func WithNamespace ¶ added in v0.38.0
func WithNamespace(namespace string) BuilderOptionFunc
WithNamespace sets the namespace
func WithProgressBar ¶ added in v0.27.1
func WithProgressBar() BuilderOptionFunc
func WithTimeout ¶
func WithTimeout(timeout time.Duration) BuilderOptionFunc
WithTimeout sets the timeout for the builder