Documentation
¶
Index ¶
- Constants
- Variables
- func CalculatePlannedChanges(deployType common.DeployType, releaseName string, releaseNamespace string, ...) (createdChanges []*CreatedResourceChange, ...)
- func CurrentReleaseExistingResourcesUIDs(standaloneCRDsInfos []*info.DeployableStandaloneCRDInfo, ...) (existingUIDs []types.UID, present bool)
- func LogPlannedChanges(ctx context.Context, releaseName string, releaseNamespace string, ...)
- type AppliedResourceChange
- type CreatedResourceChange
- type DeletedResourceChange
- type DeployFailurePlanBuilder
- type DeployFailurePlanBuilderOptions
- type DeployPlanBuilder
- type DeployPlanBuilderOptions
- type Plan
- func (p *Plan) AddDependency(fromOpID, toOpID string) error
- func (p *Plan) AddInStagedOperation(op operation.Operation, stageInID string)
- func (p *Plan) AddOperation(op operation.Operation)
- func (p *Plan) AddOutStagedOperation(op operation.Operation, stageOutID string)
- func (p *Plan) AddStagedOperation(op operation.Operation, stageInID, stageOutID string)
- func (p *Plan) CanceledOperations() (canceledOps []operation.Operation, found bool, err error)
- func (p *Plan) CompletedOperations() (completedOps []operation.Operation, found bool, err error)
- func (p *Plan) DOT() ([]byte, error)
- func (p *Plan) FailedOperations() (failedOps []operation.Operation, found bool, err error)
- func (p *Plan) Operation(idFormat string, a ...any) (op operation.Operation, found bool)
- func (p *Plan) Operations() (operations []operation.Operation, found bool, err error)
- func (p *Plan) OperationsMatch(regex *regexp.Regexp) (ops []operation.Operation, found bool, err error)
- func (p *Plan) Optimize() error
- func (p *Plan) PredecessorMap() (map[string]map[string]graph.Edge[string], error)
- func (p *Plan) SaveDOT(path string) error
- func (p *Plan) Useless() (bool, error)
- func (p *Plan) WorthyCanceledOperations() (worthyCanceledOps []operation.Operation, found bool, err error)
- func (p *Plan) WorthyCompletedOperations() (worthyCompletedOps []operation.Operation, found bool, err error)
- func (p *Plan) WorthyFailedOperations() (worthyFailedOps []operation.Operation, found bool, err error)
- type PlanExecutor
- type PlanExecutorOptions
- type RecreatedResourceChange
- type StageOpNamePrefix
- type UninstallPlanBuilder
- type UninstallPlanBuilderOptions
- type UpdatedResourceChange
Constants ¶
View Source
const ( HiddenInsignificantOutput = "<hidden insignificant output>" HiddenInsignificantChanges = "<hidden insignificant changes>" HiddenSensitiveOutput = "<hidden sensitive output>" HiddenSensitiveChanges = "<hidden sensitive changes>" )
View Source
const ( StageOpNameSuffixStart = "start" StageOpNameSuffixEnd = "end" )
View Source
const ( StageOpNamePrefixInit = operation.TypeStageOperation + "/initialization" StageOpNamePrefixStandaloneCRDs = operation.TypeStageOperation + "/standalone-crds" StageOpNamePrefixHookCRDs = operation.TypeStageOperation + "/pre-hook-crds" StageOpNamePrefixHookResources = operation.TypeStageOperation + "/pre-hook-resources" StageOpNamePrefixGeneralCRDs = operation.TypeStageOperation + "/general-crds" StageOpNamePrefixGeneralResources = operation.TypeStageOperation + "/general-resources" StageOpNamePrefixPostHookCRDs = operation.TypeStageOperation + "/post-hook-crds" StageOpNamePrefixPostHookResources = operation.TypeStageOperation + "/post-hooks-resources" StageOpNamePrefixFinal = operation.TypeStageOperation + "/finalization" )
Variables ¶
View Source
var StageOpNamesOrdered = []string{ StageOpNamePrefixInit, StageOpNamePrefixStandaloneCRDs, StageOpNamePrefixHookCRDs, StageOpNamePrefixHookResources, StageOpNamePrefixGeneralCRDs, StageOpNamePrefixGeneralResources, StageOpNamePrefixPostHookCRDs, StageOpNamePrefixPostHookResources, StageOpNamePrefixFinal, }
Functions ¶
func CalculatePlannedChanges ¶
func CalculatePlannedChanges( deployType common.DeployType, releaseName string, releaseNamespace string, standaloneCRDsInfos []*info.DeployableStandaloneCRDInfo, hookResourcesInfos []*info.DeployableHookResourceInfo, generalResourcesInfos []*info.DeployableGeneralResourceInfo, prevReleaseGeneralResourceInfos []*info.DeployablePrevReleaseGeneralResourceInfo, prevRelFailed bool, ) ( createdChanges []*CreatedResourceChange, recreatedChanges []*RecreatedResourceChange, updatedChanges []*UpdatedResourceChange, appliedChanges []*AppliedResourceChange, deletedChanges []*DeletedResourceChange, anyChangesPlanned bool, )
func CurrentReleaseExistingResourcesUIDs ¶
func CurrentReleaseExistingResourcesUIDs( standaloneCRDsInfos []*info.DeployableStandaloneCRDInfo, hookResourcesInfos []*info.DeployableHookResourceInfo, generalResourcesInfos []*info.DeployableGeneralResourceInfo, ) (existingUIDs []types.UID, present bool)
func LogPlannedChanges ¶
func LogPlannedChanges( ctx context.Context, releaseName string, releaseNamespace string, releaseChangesPlanned bool, createdChanges []*CreatedResourceChange, recreatedChanges []*RecreatedResourceChange, updatedChanges []*UpdatedResourceChange, appliedChanges []*AppliedResourceChange, deletedChanges []*DeletedResourceChange, )
Types ¶
type AppliedResourceChange ¶
type AppliedResourceChange struct {
*id.ResourceID
Udiff string
CleanedUpOnSuccess bool
CleanedUpOnFailure bool
}
type CreatedResourceChange ¶
type CreatedResourceChange struct {
*id.ResourceID
Udiff string
CleanedUpOnSuccess bool
CleanedUpOnFailure bool
}
type DeletedResourceChange ¶
type DeletedResourceChange struct {
*id.ResourceID
Udiff string
}
type DeployFailurePlanBuilder ¶
type DeployFailurePlanBuilder struct {
// contains filtered or unexported fields
}
func NewDeployFailurePlanBuilder ¶
func NewDeployFailurePlanBuilder( releaseName string, releaseNamespace string, deployType common.DeployType, deployPlan *Plan, taskStore *statestore.TaskStore, hookResourcesInfos []*info.DeployableHookResourceInfo, generalResourceInfos []*info.DeployableGeneralResourceInfo, history release.Historier, kubeClient kube.KubeClienter, dynamicClient dynamic.Interface, mapper meta.ResettableRESTMapper, opts DeployFailurePlanBuilderOptions, ) *DeployFailurePlanBuilder
type DeployPlanBuilder ¶
type DeployPlanBuilder struct {
// contains filtered or unexported fields
}
func NewDeployPlanBuilder ¶
func NewDeployPlanBuilder( releaseNamespace string, deployType common.DeployType, taskStore *statestore.TaskStore, logStore *kdutil.Concurrent[*logstore.LogStore], standaloneCRDsInfos []*info.DeployableStandaloneCRDInfo, hookResourcesInfos []*info.DeployableHookResourceInfo, generalResourcesInfos []*info.DeployableGeneralResourceInfo, prevReleaseGeneralResourceInfos []*info.DeployablePrevReleaseGeneralResourceInfo, newRelease *release.Release, history release.Historier, kubeClient kube.KubeClienter, staticClient kubernetes.Interface, dynamicClient dynamic.Interface, discoveryClient discovery.CachedDiscoveryInterface, mapper meta.ResettableRESTMapper, opts DeployPlanBuilderOptions, ) *DeployPlanBuilder
type Plan ¶
type Plan struct {
// contains filtered or unexported fields
}
func (*Plan) AddDependency ¶
func (*Plan) AddInStagedOperation ¶
func (*Plan) AddOperation ¶
func (*Plan) AddOutStagedOperation ¶
func (*Plan) AddStagedOperation ¶
func (*Plan) CanceledOperations ¶
func (*Plan) CompletedOperations ¶
func (*Plan) FailedOperations ¶
func (*Plan) Operations ¶
func (*Plan) OperationsMatch ¶
func (*Plan) PredecessorMap ¶
func (*Plan) WorthyCanceledOperations ¶
func (*Plan) WorthyCompletedOperations ¶
type PlanExecutor ¶
type PlanExecutor struct {
// contains filtered or unexported fields
}
func NewPlanExecutor ¶
func NewPlanExecutor(plan *Plan, opts PlanExecutorOptions) *PlanExecutor
type PlanExecutorOptions ¶
type PlanExecutorOptions struct {
NetworkParallelism int
}
type RecreatedResourceChange ¶
type RecreatedResourceChange struct {
*id.ResourceID
Udiff string
CleanedUpOnSuccess bool
CleanedUpOnFailure bool
}
type StageOpNamePrefix ¶
type StageOpNamePrefix string
type UninstallPlanBuilder ¶ added in v1.5.0
type UninstallPlanBuilder struct {
// contains filtered or unexported fields
}
func NewUninstallPlanBuilder ¶ added in v1.5.0
func NewUninstallPlanBuilder( releaseName string, releaseNamespace string, taskStore *statestore.TaskStore, logStore *kdutil.Concurrent[*logstore.LogStore], prevReleaseHookResourceInfos []*info.DeployablePrevReleaseHookResourceInfo, prevReleaseGeneralResourceInfos []*info.DeployablePrevReleaseGeneralResourceInfo, prevRelease *release.Release, history release.Historier, kubeClient kube.KubeClienter, staticClient kubernetes.Interface, dynamicClient dynamic.Interface, discoveryClient discovery.CachedDiscoveryInterface, mapper meta.ResettableRESTMapper, opts UninstallPlanBuilderOptions, ) *UninstallPlanBuilder
type UninstallPlanBuilderOptions ¶ added in v1.5.0
type UpdatedResourceChange ¶
type UpdatedResourceChange struct {
*id.ResourceID
Udiff string
CleanedUpOnSuccess bool
CleanedUpOnFailure bool
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.