Documentation ¶
Index ¶
- func Logs(namespace, context, kubeConfig, name, containerName string, timeout int) error
- func Status(namespace, context, kubeConfig, kind, name string) (kubernetes.RsStatus, error)
- func Wait(namespace, context, kubeConfig, kind, name string, timeout int) error
- type Config
- type ErrCyclicDependency
- type ErrMissingDependency
- type ErrWaitFailed
- type ErrWaitTimeout
- type FilterFunc
- type Formatter
- type Project
- func (p *Project) Debug(f Formatter)
- func (p *Project) Down(deleteNS, deletePVC bool) error
- func (p *Project) GetServicePods() ([]string, error)
- func (p *Project) PrintCommonInfo()
- func (p *Project) PrintConfig()
- func (p *Project) PrintDownPlan()
- func (p *Project) PrintRestartPlan(pods []string)
- func (p *Project) PrintUpPlan()
- func (p *Project) PrintUpdatePlan()
- func (p *Project) Restart(pods []string) error
- func (p *Project) SetFilter(fn func(*ResourceGroup) bool) *Project
- func (p *Project) Up() error
- func (p *Project) Update() error
- func (p *Project) Upgrade() error
- func (p *Project) WalkForward(fn func(g *ResourceGroup) error) error
- type Resource
- type ResourceFile
- type ResourceFileProcessor
- type ResourceFileProcessorFunc
- type ResourceGraph
- func (rg *ResourceGraph) WalkBackward(f func(g *ResourceGroup) error) error
- func (rg *ResourceGraph) WalkBackwardWithWait(f func(g *ResourceGroup) error, ...) error
- func (rg *ResourceGraph) WalkForward(f func(g *ResourceGroup) error) error
- func (rg *ResourceGraph) WalkForwardWithWait(f func(g *ResourceGroup) error, ...) error
- func (rg *ResourceGraph) WalkResourceBackward(f func(r *Resource, g *ResourceGroup) error, ...) error
- func (rg *ResourceGraph) WalkResourceForward(f func(r *Resource, g *ResourceGroup) error, ...) error
- type ResourceGroup
- type ResourceGroupConfig
- type WaitConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { RootDir string `yaml:"root_dir"` Namespace string `yaml:"namespace"` Variables map[string]string `yaml:"variables"` ResourceGroups []*ResourceGroupConfig `yaml:"resource_groups"` DeleteNamespace bool `yaml:"delete_namespace"` }
Config holds configuration data parsed from yaml file
func ReadProjectConfig ¶
ReadProjectConfig .
type ErrCyclicDependency ¶
type ErrCyclicDependency struct {
Node string
}
ErrCyclicDependency .
func (ErrCyclicDependency) Error ¶
func (err ErrCyclicDependency) Error() string
type ErrMissingDependency ¶
ErrMissingDependency .
func (ErrMissingDependency) Error ¶
func (err ErrMissingDependency) Error() string
type ErrWaitFailed ¶
ErrWaitFailed .
func (ErrWaitFailed) Error ¶
func (err ErrWaitFailed) Error() string
type ErrWaitTimeout ¶
ErrWaitTimeout .
func (ErrWaitTimeout) Error ¶
func (err ErrWaitTimeout) Error() string
type FilterFunc ¶ added in v1.1.3
type FilterFunc func(*ResourceGroup) bool
FilterFunc criteria if a resource group should be process by Walk function
type Project ¶
type Project struct {
// contains filtered or unexported fields
}
Project holds configuration for a rivendell task
func ReadProject ¶
func ReadProject(projectFile, namespace, context, kubeConfig string, variables map[string]string, variableFiles []string, includeResources []string, excludeResources []string) (*Project, error)
ReadProject reads a project from file
func (*Project) GetServicePods ¶ added in v1.0.8
GetServicePods
func (*Project) PrintConfig ¶ added in v1.1.6
func (p *Project) PrintConfig()
func (*Project) PrintRestartPlan ¶ added in v1.0.8
PrintRestartPlan .
func (*Project) SetFilter ¶ added in v1.1.3
func (p *Project) SetFilter(fn func(*ResourceGroup) bool) *Project
func (*Project) WalkForward ¶ added in v1.1.1
func (p *Project) WalkForward(fn func(g *ResourceGroup) error) error
type ResourceFile ¶
type ResourceFile struct { Source string ContextDir string Resources []*Resource RawContent string ExpandedContent string }
ResourceFile holds configuration for a single resource file. There are maybe multiple resources in a resource file
type ResourceFileProcessor ¶ added in v1.1.8
type ResourceFileProcessor interface {
Process(f *ResourceFile) error
}
type ResourceFileProcessorFunc ¶ added in v1.1.8
type ResourceFileProcessorFunc func(*ResourceFile) error
func (ResourceFileProcessorFunc) Process ¶ added in v1.1.8
func (f ResourceFileProcessorFunc) Process(rf *ResourceFile) error
type ResourceGraph ¶
type ResourceGraph struct { ResourceGroups map[string]*ResourceGroup RootNodes []string LeafNodes []string }
ResourceGraph .
func ReadResourceGraph ¶
func ReadResourceGraph(rootDir string, resourceGroupConfigs []*ResourceGroupConfig, variables map[string]string, includeResources []string, excludeResources []string) (*ResourceGraph, error)
ReadResourceGraph .
func (*ResourceGraph) WalkBackward ¶
func (rg *ResourceGraph) WalkBackward(f func(g *ResourceGroup) error) error
WalkBackward through the graph, BFS style
func (*ResourceGraph) WalkBackwardWithWait ¶
func (rg *ResourceGraph) WalkBackwardWithWait(f func(g *ResourceGroup) error, readyFunc func(r *Resource, g *ResourceGroup) error) error
WalkBackwardWithWait from leaf nodes
func (*ResourceGraph) WalkForward ¶
func (rg *ResourceGraph) WalkForward(f func(g *ResourceGroup) error) error
WalkForward through the graph, BFS style
func (*ResourceGraph) WalkForwardWithWait ¶
func (rg *ResourceGraph) WalkForwardWithWait(f func(g *ResourceGroup) error, readyFunc func(r *Resource, g *ResourceGroup) error, waitFunc func(name, kind string) error) error
WalkForwardWithWait from root nodes
func (*ResourceGraph) WalkResourceBackward ¶
func (rg *ResourceGraph) WalkResourceBackward(f func(r *Resource, g *ResourceGroup) error, readyFunc func(r *Resource, g *ResourceGroup) error) error
WalkResourceBackward with waiting
func (*ResourceGraph) WalkResourceForward ¶
func (rg *ResourceGraph) WalkResourceForward(f func(r *Resource, g *ResourceGroup) error, readyFunc func(r *Resource, g *ResourceGroup) error, waitFunc func(name, kind string) error) error
WalkResourceForward with waiting
type ResourceGroup ¶
type ResourceGroup struct { Name string Templater string ResourceFiles []*ResourceFile Depend []string Wait []*WaitConfig Children []string }
ResourceGroup holds configuration for a resource group
type ResourceGroupConfig ¶
type ResourceGroupConfig struct { Name string `yaml:"name"` Resources []string `yaml:"resources"` Excludes []string `yaml:"excludes"` Depend []string `yaml:"depend"` Wait []*WaitConfig `yaml:"wait"` }
ResourceGroupConfig holds configuration for resource group
type WaitConfig ¶
type WaitConfig struct { Name string `yaml:"name"` Kind string `yaml:"kind"` Timeout int `yaml:"timeout"` }
WaitConfig .