Documentation
¶
Index ¶
- Constants
- func DefaultExecutorRegistry() map[schema.GroupVersionKind]ifc.ExecutorFactory
- func NewClient(helper ifc.Helper, opts ...Option) ifc.Client
- func NewHelper(cfg *config.Config) (ifc.Helper, error)
- type ClusterListCommand
- type ExecutorRegistry
- type GenericRunFlags
- type Helper
- func (helper *Helper) ClusterMap() (clustermap.ClusterMap, error)
- func (helper *Helper) ClusterMapAPIobj() (*v1alpha1.ClusterMap, error)
- func (helper *Helper) DocEntryPointPrefix() string
- func (helper *Helper) ExecutorDoc(phaseID ifc.ID) (document.Document, error)
- func (helper *Helper) Inventory() inventoryifc.Inventory
- func (helper *Helper) ListPhases(o ifc.ListPhaseOptions) ([]*v1alpha1.Phase, error)
- func (helper *Helper) ListPlans() ([]*v1alpha1.PhasePlan, error)
- func (helper *Helper) Phase(phaseID ifc.ID) (*v1alpha1.Phase, error)
- func (helper *Helper) PhaseBundleRoot() string
- func (helper *Helper) PhaseConfigBundle() document.Bundle
- func (helper *Helper) PhaseEntryPointBasePath() string
- func (helper *Helper) PhaseRepoDir() string
- func (helper *Helper) Plan(planID ifc.ID) (*v1alpha1.PhasePlan, error)
- func (helper *Helper) TargetPath() string
- func (helper *Helper) WorkDir() string
- type ListCommand
- type Option
- type PlanListCommand
- type PlanListFlags
- type PlanRunCommand
- type PlanRunFlags
- type PlanValidateCommand
- type PlanValidateFlags
- type RenderCommand
- type RunCommand
- type RunFlags
- type StatusCommand
- type StatusFlags
- type TreeCommand
- type ValidateCommand
- type ValidateFlags
Constants ¶
const ( // TableOutputFormat table TableOutputFormat = "table" // YamlOutputFormat yaml YamlOutputFormat = "yaml" )
const ( // RenderSourceConfig will render a bundle that comes from site metadata file // and contains phase and executor docs RenderSourceConfig = "config" // RenderSourceExecutor indicates that rendering will be delegated to phase executor RenderSourceExecutor = "executor" // RenderSourcePhase the source will use kustomize root at phase entry point RenderSourcePhase = "phase" )
Variables ¶
This section is empty.
Functions ¶
func DefaultExecutorRegistry ¶
func DefaultExecutorRegistry() map[schema.GroupVersionKind]ifc.ExecutorFactory
DefaultExecutorRegistry returns map with executor factories
Types ¶
type ClusterListCommand ¶
ClusterListCommand options for cluster list command
func (*ClusterListCommand) RunE ¶
func (c *ClusterListCommand) RunE() error
RunE executes cluster list command
type ExecutorRegistry ¶
type ExecutorRegistry func() map[schema.GroupVersionKind]ifc.ExecutorFactory
ExecutorRegistry returns map with executor factories
type GenericRunFlags ¶
GenericRunFlags generic options for run command
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
Helper provides functions built around phase bundle to filter and build documents
func (*Helper) ClusterMap ¶
func (helper *Helper) ClusterMap() (clustermap.ClusterMap, error)
ClusterMap associated with the the manifest
func (*Helper) ClusterMapAPIobj ¶
func (helper *Helper) ClusterMapAPIobj() (*v1alpha1.ClusterMap, error)
ClusterMapAPIobj associated with the the manifest
func (*Helper) DocEntryPointPrefix ¶
DocEntryPointPrefix returns the prefix which if not empty is prepended to the DocumentEntryPoint field in the phase struct so the full entry point is DocEntryPointPrefix + DocumentEntryPoint
func (*Helper) ExecutorDoc ¶
ExecutorDoc returns executor document associated with phase
func (*Helper) Inventory ¶
func (helper *Helper) Inventory() inventoryifc.Inventory
Inventory return inventory interface
func (*Helper) ListPhases ¶
ListPhases returns all phases associated with manifest
func (*Helper) PhaseBundleRoot ¶
PhaseBundleRoot returns path to document root with phase documents
func (*Helper) PhaseConfigBundle ¶
PhaseConfigBundle returns bundle based on phaseBundleRoot
func (*Helper) PhaseEntryPointBasePath ¶
PhaseEntryPointBasePath returns path to current site directory
func (*Helper) PhaseRepoDir ¶
PhaseRepoDir returns the last part of the repo url E.g. http://dummy.org/reponame.git -> reponame
func (*Helper) TargetPath ¶
TargetPath returns manifest root
type ListCommand ¶
type ListCommand struct { Factory config.Factory Writer io.Writer ClusterName string PlanID ifc.ID OutputFormat string }
ListCommand phase list command
type Option ¶
type Option func(*client)
Option allows to add various options to a phase
func InjectRegistry ¶
func InjectRegistry(registry ExecutorRegistry) Option
InjectRegistry is an option that allows to inject executor registry into phase client
type PlanListCommand ¶
type PlanListCommand struct { Options PlanListFlags Factory config.Factory Writer io.Writer }
PlanListCommand phase list command
type PlanListFlags ¶
type PlanListFlags struct {
FormatType string
}
PlanListFlags flags given for plan list command
type PlanRunCommand ¶
PlanRunCommand phase run command
type PlanRunFlags ¶
type PlanRunFlags struct { GenericRunFlags ResumeFromPhase string }
PlanRunFlags options for phase run command
type PlanValidateCommand ¶
type PlanValidateCommand struct { Options PlanValidateFlags Factory config.Factory }
PlanValidateCommand plan validate command
func (*PlanValidateCommand) RunE ¶
func (c *PlanValidateCommand) RunE() error
RunE runs the plan validate command
type PlanValidateFlags ¶
PlanValidateFlags options for plan validate command
type RenderCommand ¶
type RenderCommand struct { // Label filters documents by label string Label string // Annotation filters documents by annotation string Annotation string // APIVersion filters documents by API group and version APIVersion string // Kind filters documents by document kind Kind string // Source identifies source of the bundle, these can be [phase|config|executor] // phase the source will use kustomize root at phase entry point // config will render a bundle that comes from site metadata file, and contains phase and executor docs // executor means that rendering will be delegated to phase executor Source string // FailOnDecryptionError makes sure that encrypted documents are getting decrypted by avoiding setting // env variable TOLERATE_DECRYPTION_FAILURES=true FailOnDecryptionError bool PhaseID ifc.ID }
RenderCommand holds filters for selector
func (*RenderCommand) Validate ¶
func (fo *RenderCommand) Validate() (err error)
Validate checks if command options are valid
type RunCommand ¶
RunCommand phase run command
type StatusCommand ¶
type StatusCommand struct { Options StatusFlags Factory config.Factory }
StatusCommand is a struct which defines status
func (*StatusCommand) RunE ¶
func (s *StatusCommand) RunE() error
RunE returns the status of the given phase
type StatusFlags ¶
StatusFlags is a struct to define status type
type TreeCommand ¶
TreeCommand plan command
type ValidateCommand ¶
type ValidateCommand struct { Options ValidateFlags Factory config.Factory }
ValidateCommand phase validate command
func (*ValidateCommand) RunE ¶
func (c *ValidateCommand) RunE() error
RunE runs the phase validate command
type ValidateFlags ¶
ValidateFlags options for phase validate command