Documentation ¶
Index ¶
- Constants
- Variables
- type Action
- type ApplyRegistryConfigEvent
- type ApplyRegistryConfigFailedEvent
- type AwaitSelfUpgradeEvent
- type Blueprint
- type BlueprintApplicationPreProcessedEvent
- type BlueprintAppliedEvent
- type BlueprintConfiguration
- type BlueprintDryRunEvent
- type BlueprintMask
- type BlueprintSpec
- func (spec *BlueprintSpec) CalculateEffectiveBlueprint() error
- func (spec *BlueprintSpec) CensorSensitiveData()
- func (spec *BlueprintSpec) CheckEcosystemHealthAfterwards(healthResult ecosystem.HealthResult)
- func (spec *BlueprintSpec) CheckEcosystemHealthUpfront(healthResult ecosystem.HealthResult)
- func (spec *BlueprintSpec) CompletePostProcessing()
- func (spec *BlueprintSpec) CompletePreProcessing()
- func (spec *BlueprintSpec) DetermineStateDiff(ecosystemState ecosystem.EcosystemState) error
- func (spec *BlueprintSpec) GetDogusThatNeedARestart() []common.SimpleDoguName
- func (spec *BlueprintSpec) MarkApplyRegistryConfigFailed(err error)
- func (spec *BlueprintSpec) MarkBlueprintApplicationFailed(err error)
- func (spec *BlueprintSpec) MarkBlueprintApplied()
- func (spec *BlueprintSpec) MarkInvalid(err error)
- func (spec *BlueprintSpec) MarkRegistryConfigApplied()
- func (spec *BlueprintSpec) MarkSelfUpgradeCompleted()
- func (spec *BlueprintSpec) MarkWaitingForSelfUpgrade()
- func (spec *BlueprintSpec) ShouldBeApplied() bool
- func (spec *BlueprintSpec) StartApplyRegistryConfig()
- func (spec *BlueprintSpec) StartApplying()
- func (spec *BlueprintSpec) ValidateDynamically(possibleInvalidDependenciesError error)
- func (spec *BlueprintSpec) ValidateStatically() error
- type BlueprintSpecInvalidEvent
- type BlueprintSpecStaticallyValidatedEvent
- type BlueprintSpecValidatedEvent
- type CombinedDoguConfig
- type CombinedDoguConfigDiffs
- type CompletedEvent
- type Component
- type ComponentDiff
- type ComponentDiffState
- type ComponentDiffs
- type Config
- type ConfigAction
- type ConfigValueState
- type Dogu
- type DoguConfig
- type DoguConfigDiffDeterminedEvent
- type DoguConfigDiffs
- type DoguConfigEntryDiff
- type DoguConfigValueState
- type DoguDiff
- type DoguDiffState
- type DoguDiffs
- type EcosystemHealthyAfterwardsEvent
- type EcosystemHealthyUpfrontEvent
- type EcosystemUnhealthyAfterwardsEvent
- type EcosystemUnhealthyUpfrontEvent
- type EffectiveBlueprint
- type EffectiveBlueprintCalculatedEvent
- type Event
- type ExecutionFailedEvent
- type GlobalConfig
- type GlobalConfigDiffDeterminedEvent
- type GlobalConfigDiffs
- type GlobalConfigEntryDiff
- type GlobalConfigValueState
- type InProgressEvent
- type InvalidBlueprintError
- type MaskDogu
- type RegistryConfigAppliedEvent
- type SelfUpgradeCompletedEvent
- type SensitiveConfigDataCensoredEvent
- type SensitiveDoguConfig
- type SensitiveDoguConfigDiffs
- type SensitiveDoguConfigEntryDiff
- type StateDiff
- type StateDiffComponentDeterminedEvent
- type StateDiffDoguDeterminedEvent
- type StatusPhase
- type TargetState
Constants ¶
const ( ActionInstall = "install" ActionUninstall = "uninstall" ActionUpgrade = "upgrade" ActionDowngrade = "downgrade" ActionSwitchDoguNamespace = "dogu namespace switch" ActionUpdateDoguProxyBodySize = "update proxy body size" ActionUpdateDoguProxyRewriteTarget = "update proxy rewrite target" ActionUpdateDoguProxyAdditionalConfig = "update proxy additional config" ActionUpdateDoguResourceMinVolumeSize = "update resource minimum volume size" ActionSwitchComponentNamespace = "component namespace switch" ActionUpdateComponentDeployConfig = "update component package config" )
const ( // TargetStatePresent is the default state. If selected the chosen item must be present after the blueprint was // applied. TargetStatePresent = iota // TargetStateAbsent sets the state of the item to absent. If selected the chosen item must be absent after the // blueprint was applied. TargetStateAbsent )
Variables ¶
var PossibleTargetStates = []TargetState{ TargetStatePresent, TargetStateAbsent, }
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action string
Action represents a needed Action for a dogu to reach the expected state.
func (Action) IsDoguProxyAction ¶
type ApplyRegistryConfigEvent ¶
type ApplyRegistryConfigEvent struct{}
func (ApplyRegistryConfigEvent) Message ¶
func (e ApplyRegistryConfigEvent) Message() string
func (ApplyRegistryConfigEvent) Name ¶
func (e ApplyRegistryConfigEvent) Name() string
type ApplyRegistryConfigFailedEvent ¶
type ApplyRegistryConfigFailedEvent struct {
// contains filtered or unexported fields
}
func (ApplyRegistryConfigFailedEvent) Message ¶
func (e ApplyRegistryConfigFailedEvent) Message() string
func (ApplyRegistryConfigFailedEvent) Name ¶
func (e ApplyRegistryConfigFailedEvent) Name() string
type AwaitSelfUpgradeEvent ¶
type AwaitSelfUpgradeEvent struct{}
func (AwaitSelfUpgradeEvent) Message ¶
func (e AwaitSelfUpgradeEvent) Message() string
func (AwaitSelfUpgradeEvent) Name ¶
func (e AwaitSelfUpgradeEvent) Name() string
type Blueprint ¶
type Blueprint struct { // Dogus contains a set of exact dogu versions which should be present or absent in the CES instance after which this // blueprint was applied. Optional. Dogus []Dogu // Components contains a set of exact components versions which should be present or absent in the CES instance after which // this blueprint was applied. Optional. Components []Component // Config contains all config entries to set via blueprint. Config Config }
Blueprint describes an abstraction of CES components that should be absent or present within one or more CES instances. When the same Blueprint is applied to two different CES instances it is required to leave two equal instances in terms of the components.
In general additions without changing the version are fine, as long as they don't change semantics. Removal or renaming are breaking changes and require a new blueprint API version.
type BlueprintApplicationPreProcessedEvent ¶
type BlueprintApplicationPreProcessedEvent struct { }
func (BlueprintApplicationPreProcessedEvent) Message ¶
func (e BlueprintApplicationPreProcessedEvent) Message() string
func (BlueprintApplicationPreProcessedEvent) Name ¶
func (e BlueprintApplicationPreProcessedEvent) Name() string
type BlueprintAppliedEvent ¶
type BlueprintAppliedEvent struct{}
func (BlueprintAppliedEvent) Message ¶
func (e BlueprintAppliedEvent) Message() string
func (BlueprintAppliedEvent) Name ¶
func (e BlueprintAppliedEvent) Name() string
type BlueprintConfiguration ¶
type BlueprintConfiguration struct { // IgnoreDoguHealth forces blueprint upgrades even if dogus are unhealthy IgnoreDoguHealth bool // IgnoreComponentHealth forces blueprint upgrades even if components are unhealthy IgnoreComponentHealth bool // AllowDoguNamespaceSwitch allows the blueprint upgrade to switch a dogus namespace AllowDoguNamespaceSwitch bool // DryRun lets the user test a blueprint run to check if all attributes of the blueprint are correct and avoid a result with a failure state. DryRun bool }
type BlueprintDryRunEvent ¶
type BlueprintDryRunEvent struct{}
func (BlueprintDryRunEvent) Message ¶
func (b BlueprintDryRunEvent) Message() string
func (BlueprintDryRunEvent) Name ¶
func (b BlueprintDryRunEvent) Name() string
type BlueprintMask ¶
type BlueprintMask struct { // Dogus contains a set of dogus which alters the states of the dogus in the blueprint this mask is applied on. // The names and target states of all dogus must not be empty. Dogus []MaskDogu }
BlueprintMask describes an abstraction of CES components that should alter a blueprint definition before applying it to a CES system via a blueprint upgrade. The blueprint mask does not change the blueprint itself, but is applied to the information in it to generate a new, effective blueprint.
func (*BlueprintMask) FindDoguByName ¶
func (blueprintMask *BlueprintMask) FindDoguByName(name common.SimpleDoguName) (MaskDogu, error)
func (*BlueprintMask) Validate ¶
func (blueprintMask *BlueprintMask) Validate() error
Validate checks the structure and data of a blueprint mask and returns an error if there are any problems
type BlueprintSpec ¶
type BlueprintSpec struct { Id string Blueprint Blueprint BlueprintMask BlueprintMask EffectiveBlueprint EffectiveBlueprint StateDiff StateDiff Config BlueprintConfiguration Status StatusPhase // PersistenceContext can hold generic values needed for persistence with repositories, e.g. version counters or transaction contexts. // This field has a generic map type as the values within it highly depend on the used type of repository. // This field should be ignored in the whole domain. PersistenceContext map[string]interface{} Events []Event }
func (*BlueprintSpec) CalculateEffectiveBlueprint ¶
func (spec *BlueprintSpec) CalculateEffectiveBlueprint() error
func (*BlueprintSpec) CensorSensitiveData ¶
func (spec *BlueprintSpec) CensorSensitiveData()
CensorSensitiveData censors all sensitive configuration data of the blueprint, effective blueprint and the statediff, to make the values unrecognisable.
func (*BlueprintSpec) CheckEcosystemHealthAfterwards ¶
func (spec *BlueprintSpec) CheckEcosystemHealthAfterwards(healthResult ecosystem.HealthResult)
CheckEcosystemHealthAfterwards checks with the given health result if the ecosystem is healthy and the blueprint was therefore successful.
func (*BlueprintSpec) CheckEcosystemHealthUpfront ¶
func (spec *BlueprintSpec) CheckEcosystemHealthUpfront(healthResult ecosystem.HealthResult)
CheckEcosystemHealthUpfront checks if the ecosystem is healthy with the given health result and sets the next status phase depending on that.
func (*BlueprintSpec) CompletePostProcessing ¶
func (spec *BlueprintSpec) CompletePostProcessing()
CompletePostProcessing is used to mark the blueprint as completed or failed , depending on the blueprint application result.
func (*BlueprintSpec) CompletePreProcessing ¶
func (spec *BlueprintSpec) CompletePreProcessing()
CompletePreProcessing decides if the blueprint is ready to be applied or not by setting the fitting next status phase.
func (*BlueprintSpec) DetermineStateDiff ¶
func (spec *BlueprintSpec) DetermineStateDiff( ecosystemState ecosystem.EcosystemState, ) error
DetermineStateDiff creates the StateDiff between the blueprint and the actual state of the ecosystem. if sth. is not in the lists of installed things, it is considered not installed. installedDogus are a map in the form of simpleDoguName->*DoguInstallation. There should be no nil values. The StateDiff is an 'as is' representation, therefore no error is thrown, e.g. if dogu namespaces are different and namespace changes are not allowed. If there are not allowed actions should be considered at the start of the execution of the blueprint. returns an error if the BlueprintSpec is not in the necessary state to determine the stateDiff.
func (*BlueprintSpec) GetDogusThatNeedARestart ¶ added in v1.0.0
func (spec *BlueprintSpec) GetDogusThatNeedARestart() []common.SimpleDoguName
func (*BlueprintSpec) MarkApplyRegistryConfigFailed ¶
func (spec *BlueprintSpec) MarkApplyRegistryConfigFailed(err error)
func (*BlueprintSpec) MarkBlueprintApplicationFailed ¶
func (spec *BlueprintSpec) MarkBlueprintApplicationFailed(err error)
MarkBlueprintApplicationFailed sets the blueprint state to application failed, which indicates that the blueprint could not be applied completely. In reaction to this, further post-processing will happen.
func (*BlueprintSpec) MarkBlueprintApplied ¶
func (spec *BlueprintSpec) MarkBlueprintApplied()
MarkBlueprintApplied sets the blueprint state to blueprint applied, which indicates that the blueprint was applied successful and further steps can happen then.
func (*BlueprintSpec) MarkInvalid ¶
func (spec *BlueprintSpec) MarkInvalid(err error)
MarkInvalid is used to mark the blueprint as invalid after dynamically validating it.
func (*BlueprintSpec) MarkRegistryConfigApplied ¶
func (spec *BlueprintSpec) MarkRegistryConfigApplied()
func (*BlueprintSpec) MarkSelfUpgradeCompleted ¶ added in v1.0.0
func (spec *BlueprintSpec) MarkSelfUpgradeCompleted()
func (*BlueprintSpec) MarkWaitingForSelfUpgrade ¶ added in v1.0.0
func (spec *BlueprintSpec) MarkWaitingForSelfUpgrade()
func (*BlueprintSpec) ShouldBeApplied ¶
func (spec *BlueprintSpec) ShouldBeApplied() bool
ShouldBeApplied returns true if the blueprint should be applied or an early-exit should happen, e.g. while dry run.
func (*BlueprintSpec) StartApplyRegistryConfig ¶
func (spec *BlueprintSpec) StartApplyRegistryConfig()
func (*BlueprintSpec) StartApplying ¶
func (spec *BlueprintSpec) StartApplying()
StartApplying marks the blueprint as in progress, which indicates, that the system started applying the blueprint. This state is used to detect complete failures as this state will only stay persisted if the process failed before setting the state to blueprint applied.
func (*BlueprintSpec) ValidateDynamically ¶
func (spec *BlueprintSpec) ValidateDynamically(possibleInvalidDependenciesError error)
ValidateDynamically sets the Status either to StatusPhaseInvalid or StatusPhaseValidated depending on if the dependencies or versions of the elements in the blueprint are invalid. returns a domain.InvalidBlueprintError if blueprint is invalid or nil otherwise.
func (*BlueprintSpec) ValidateStatically ¶
func (spec *BlueprintSpec) ValidateStatically() error
ValidateStatically checks the blueprintSpec for semantic errors and sets the status to the result. Here will be only checked, what can be checked without any external information, e.g. without dogu specification. returns a domain.InvalidBlueprintError if blueprint is invalid or nil otherwise.
type BlueprintSpecInvalidEvent ¶
type BlueprintSpecInvalidEvent struct {
ValidationError error
}
func (BlueprintSpecInvalidEvent) Message ¶
func (b BlueprintSpecInvalidEvent) Message() string
func (BlueprintSpecInvalidEvent) Name ¶
func (b BlueprintSpecInvalidEvent) Name() string
type BlueprintSpecStaticallyValidatedEvent ¶
type BlueprintSpecStaticallyValidatedEvent struct{}
func (BlueprintSpecStaticallyValidatedEvent) Message ¶
func (b BlueprintSpecStaticallyValidatedEvent) Message() string
func (BlueprintSpecStaticallyValidatedEvent) Name ¶
func (b BlueprintSpecStaticallyValidatedEvent) Name() string
type BlueprintSpecValidatedEvent ¶
type BlueprintSpecValidatedEvent struct{}
func (BlueprintSpecValidatedEvent) Message ¶
func (b BlueprintSpecValidatedEvent) Message() string
func (BlueprintSpecValidatedEvent) Name ¶
func (b BlueprintSpecValidatedEvent) Name() string
type CombinedDoguConfig ¶
type CombinedDoguConfig struct { DoguName common.SimpleDoguName Config DoguConfig SensitiveConfig SensitiveDoguConfig }
type CombinedDoguConfigDiffs ¶
type CombinedDoguConfigDiffs struct { DoguConfigDiff DoguConfigDiffs SensitiveDoguConfigDiff SensitiveDoguConfigDiffs }
func (CombinedDoguConfigDiffs) HasChanges ¶ added in v1.0.0
func (combinedDiff CombinedDoguConfigDiffs) HasChanges() bool
type CompletedEvent ¶
type CompletedEvent struct{}
func (CompletedEvent) Message ¶
func (e CompletedEvent) Message() string
func (CompletedEvent) Name ¶
func (e CompletedEvent) Name() string
type Component ¶
type Component struct { // Name defines the name and namespace of the component. Must not be empty. Name common.QualifiedComponentName // Version defines the version of the package that is to be installed. Must not be empty if the targetState is // "present"; otherwise it is optional and is not going to be interpreted. Version *semver.Version // TargetState defines a state of installation of this package. Optional field, but defaults to "TargetStatePresent" TargetState TargetState // DeployConfig defines generic properties for the component. This field is optional. DeployConfig ecosystem.DeployConfig }
Component represents a CES component (e.g. operators), its version, and the installation state in which it is supposed to be after a blueprint was applied.
type ComponentDiff ¶
type ComponentDiff struct { // Name contains the component's name. Name common.SimpleComponentName // Actual contains that state of a component how it is currently found in the system. Actual ComponentDiffState // Expected contains that desired state of a component how it is supposed to be. Expected ComponentDiffState // NeededActions hints how the component should be handled by the application change automaton in order to reconcile // differences between Actual and Expected in the current system. NeededActions []Action }
ComponentDiff represents the Diff for a single expected Component to the current ecosystem.ComponentInstallation.
func (ComponentDiff) HasChanges ¶
func (diff ComponentDiff) HasChanges() bool
func (ComponentDiff) IsExpectedVersion ¶ added in v1.0.0
func (diff ComponentDiff) IsExpectedVersion(actualVersion *semver.Version) bool
IsExpectedVersion checks if the given version es equal to the expected version
func (*ComponentDiff) String ¶
func (diff *ComponentDiff) String() string
String returns a string representation of the ComponentDiff.
type ComponentDiffState ¶
type ComponentDiffState struct { // Namespace is part of the address under which the component will be obtained. This namespace must NOT // to be confused with the K8s cluster namespace. Namespace common.ComponentNamespace // Version contains the component's version. Version *semver.Version // InstallationState contains the component's target state. InstallationState TargetState // DeployConfig contains generic properties for the component. DeployConfig ecosystem.DeployConfig }
ComponentDiffState contains all fields to make a diff for components in respect to another ComponentDiffState.
func (*ComponentDiffState) String ¶
func (diff *ComponentDiffState) String() string
String returns a string representation of the ComponentDiffState.
type ComponentDiffs ¶
type ComponentDiffs []ComponentDiff
ComponentDiffs contains the differences for all expected Components to the current ecosystem.ComponentInstallations.
func (ComponentDiffs) GetComponentDiffByName ¶
func (diffs ComponentDiffs) GetComponentDiffByName(name common.SimpleComponentName) ComponentDiff
GetComponentDiffByName returns the diff for the given component name or an empty struct if it was not found.
type Config ¶
type Config struct { Dogus map[common.SimpleDoguName]CombinedDoguConfig Global GlobalConfig }
func (Config) GetDoguConfigKeys ¶
func (config Config) GetDoguConfigKeys() []common.DoguConfigKey
func (Config) GetSensitiveDoguConfigKeys ¶
func (config Config) GetSensitiveDoguConfigKeys() []common.SensitiveDoguConfigKey
type ConfigAction ¶
type ConfigAction string
const ( // ConfigActionNone means that nothing is to do for this config key ConfigActionNone ConfigAction = "none" // ConfigActionSet means that the config key needs to be set as given ConfigActionSet ConfigAction = "set" // ConfigActionSetEncrypted means that the config key needs to be encrypted ConfigActionSetEncrypted ConfigAction = "setEncrypted" // ConfigActionSetToEncrypt means that the config key needs to be encrypted but another service needs to do this. // This can happen if a dogu is not yet installed and therefore no encryption key pair is available. ConfigActionSetToEncrypt ConfigAction = "setToEncrypt" // ConfigActionRemove means that the config key needs to be deleted ConfigActionRemove ConfigAction = "remove" )
type ConfigValueState ¶
type Dogu ¶
type Dogu struct { // Name defines the name of the dogu, e.g. "official/postgresql" Name common.QualifiedDoguName // Version defines the version of the dogu that is to be installed. Must not be empty if the targetState is "present"; // otherwise it is optional and is not going to be interpreted. Version core.Version // TargetState defines a state of installation of this dogu. Optional field, but defaults to "TargetStatePresent" TargetState TargetState // MinVolumeSize is the minimum storage of the dogu. This field is optional and can be nil to indicate that no // storage is needed. MinVolumeSize *ecosystem.VolumeSize // ReverseProxyConfig defines configuration for the ecosystem reverse proxy. This field is optional. ReverseProxyConfig ecosystem.ReverseProxyConfig }
Dogu defines a Dogu, its version, and the installation state in which it is supposed to be after a blueprint was applied.
func FindDoguByName ¶
func FindDoguByName(dogus []Dogu, name common.SimpleDoguName) (Dogu, bool)
type DoguConfig ¶
type DoguConfig struct { Present map[common.DoguConfigKey]common.DoguConfigValue Absent []common.DoguConfigKey }
type DoguConfigDiffDeterminedEvent ¶
type DoguConfigDiffDeterminedEvent struct {
CombinedDogusConfigDiffs map[common.SimpleDoguName]CombinedDoguConfigDiffs
}
func (DoguConfigDiffDeterminedEvent) Message ¶
func (e DoguConfigDiffDeterminedEvent) Message() string
func (DoguConfigDiffDeterminedEvent) Name ¶
func (e DoguConfigDiffDeterminedEvent) Name() string
type DoguConfigDiffs ¶
type DoguConfigDiffs []DoguConfigEntryDiff
func (DoguConfigDiffs) GetDoguConfigDiffByAction ¶
func (diffs DoguConfigDiffs) GetDoguConfigDiffByAction() map[ConfigAction][]DoguConfigEntryDiff
type DoguConfigEntryDiff ¶
type DoguConfigEntryDiff struct { Key common.DoguConfigKey Actual DoguConfigValueState Expected DoguConfigValueState NeededAction ConfigAction }
type DoguConfigValueState ¶
type DoguConfigValueState ConfigValueState
func NewDoguConfigValueStateFromEntry ¶
func NewDoguConfigValueStateFromEntry(actualEntry *ecosystem.DoguConfigEntry) DoguConfigValueState
func NewDoguConfigValueStateFromSensitiveValue ¶
func NewDoguConfigValueStateFromSensitiveValue(actualValue common.SensitiveDoguConfigValue, actualExists bool) DoguConfigValueState
type DoguDiff ¶
type DoguDiff struct { DoguName common.SimpleDoguName Actual DoguDiffState Expected DoguDiffState NeededActions []Action }
DoguDiff represents the Diff for a single expected Dogu to the current ecosystem.DoguInstallation.
type DoguDiffState ¶
type DoguDiffState struct { Namespace common.DoguNamespace Version core.Version InstallationState TargetState MinVolumeSize *ecosystem.VolumeSize ReverseProxyConfig ecosystem.ReverseProxyConfig }
DoguDiffState contains all fields to make a diff for dogus in respect to another DoguDiffState.
func (*DoguDiffState) String ¶
func (diff *DoguDiffState) String() string
String returns a string representation of the DoguDiffState.
type DoguDiffs ¶
type DoguDiffs []DoguDiff
DoguDiffs contains the Diff for all expected Dogus to the current ecosystem.DoguInstallations.
type EcosystemHealthyAfterwardsEvent ¶
type EcosystemHealthyAfterwardsEvent struct{}
func (EcosystemHealthyAfterwardsEvent) Message ¶
func (e EcosystemHealthyAfterwardsEvent) Message() string
func (EcosystemHealthyAfterwardsEvent) Name ¶
func (e EcosystemHealthyAfterwardsEvent) Name() string
type EcosystemHealthyUpfrontEvent ¶
type EcosystemHealthyUpfrontEvent struct {
// contains filtered or unexported fields
}
func (EcosystemHealthyUpfrontEvent) Message ¶
func (d EcosystemHealthyUpfrontEvent) Message() string
func (EcosystemHealthyUpfrontEvent) Name ¶
func (d EcosystemHealthyUpfrontEvent) Name() string
type EcosystemUnhealthyAfterwardsEvent ¶
type EcosystemUnhealthyAfterwardsEvent struct {
HealthResult ecosystem.HealthResult
}
func (EcosystemUnhealthyAfterwardsEvent) Message ¶
func (e EcosystemUnhealthyAfterwardsEvent) Message() string
func (EcosystemUnhealthyAfterwardsEvent) Name ¶
func (e EcosystemUnhealthyAfterwardsEvent) Name() string
type EcosystemUnhealthyUpfrontEvent ¶
type EcosystemUnhealthyUpfrontEvent struct {
HealthResult ecosystem.HealthResult
}
func (EcosystemUnhealthyUpfrontEvent) Message ¶
func (d EcosystemUnhealthyUpfrontEvent) Message() string
func (EcosystemUnhealthyUpfrontEvent) Name ¶
func (d EcosystemUnhealthyUpfrontEvent) Name() string
type EffectiveBlueprint ¶
type EffectiveBlueprint struct { // Dogus contains a set of exact dogu versions which should be present or absent in the CES instance after which this // blueprint was applied. Optional. Dogus []Dogu // Components contains a set of exact components versions which should be present or absent in the CES instance after which // this blueprint was applied. Optional. Components []Component // Config contains all config entries to set via blueprint. Config Config }
EffectiveBlueprint describes what the wanted state after evaluating the blueprint and the blueprintMask is. This is still a static description, so no actual state of the ecosystem is taken into consideration here.
func (*EffectiveBlueprint) GetWantedDogus ¶
func (effectiveBlueprint *EffectiveBlueprint) GetWantedDogus() []Dogu
GetWantedDogus returns a list of all dogus which should be installed
type EffectiveBlueprintCalculatedEvent ¶
type EffectiveBlueprintCalculatedEvent struct {
Result EffectiveBlueprint
}
func (EffectiveBlueprintCalculatedEvent) Message ¶
func (e EffectiveBlueprintCalculatedEvent) Message() string
func (EffectiveBlueprintCalculatedEvent) Name ¶
func (e EffectiveBlueprintCalculatedEvent) Name() string
type ExecutionFailedEvent ¶
type ExecutionFailedEvent struct {
// contains filtered or unexported fields
}
func (ExecutionFailedEvent) Message ¶
func (e ExecutionFailedEvent) Message() string
func (ExecutionFailedEvent) Name ¶
func (e ExecutionFailedEvent) Name() string
type GlobalConfig ¶
type GlobalConfig struct { Present map[common.GlobalConfigKey]common.GlobalConfigValue Absent []common.GlobalConfigKey }
func (GlobalConfig) GetGlobalConfigKeys ¶
func (config GlobalConfig) GetGlobalConfigKeys() []common.GlobalConfigKey
type GlobalConfigDiffDeterminedEvent ¶
type GlobalConfigDiffDeterminedEvent struct {
GlobalConfigDiffs GlobalConfigDiffs
}
func (GlobalConfigDiffDeterminedEvent) Message ¶
func (e GlobalConfigDiffDeterminedEvent) Message() string
func (GlobalConfigDiffDeterminedEvent) Name ¶
func (e GlobalConfigDiffDeterminedEvent) Name() string
type GlobalConfigDiffs ¶
type GlobalConfigDiffs []GlobalConfigEntryDiff
func (GlobalConfigDiffs) GetGlobalConfigDiffsByAction ¶
func (diffs GlobalConfigDiffs) GetGlobalConfigDiffsByAction() map[ConfigAction][]GlobalConfigEntryDiff
func (GlobalConfigDiffs) HasChanges ¶ added in v1.0.0
func (diffs GlobalConfigDiffs) HasChanges() bool
type GlobalConfigEntryDiff ¶
type GlobalConfigEntryDiff struct { Key common.GlobalConfigKey Actual GlobalConfigValueState Expected GlobalConfigValueState NeededAction ConfigAction }
type GlobalConfigValueState ¶
type GlobalConfigValueState ConfigValueState
func NewGlobalConfigValueStateFromEntry ¶
func NewGlobalConfigValueStateFromEntry(actualEntry *ecosystem.GlobalConfigEntry) GlobalConfigValueState
type InProgressEvent ¶
type InProgressEvent struct{}
func (InProgressEvent) Message ¶
func (e InProgressEvent) Message() string
func (InProgressEvent) Name ¶
func (e InProgressEvent) Name() string
type InvalidBlueprintError ¶
InvalidBlueprintError indicates that a given blueprintSpec is invalid for any reason.
func (*InvalidBlueprintError) Error ¶
func (e *InvalidBlueprintError) Error() string
Error marks the struct as an error.
func (*InvalidBlueprintError) Unwrap ¶
func (e *InvalidBlueprintError) Unwrap() error
Unwrap is used to make it work with errors.Is, errors.As.
type MaskDogu ¶
type MaskDogu struct { // Name is the qualified name of the dogu. Name common.QualifiedDoguName // Version defines the version of the dogu that is to be installed. This version is optional and overrides // the version of the dogu from the blueprint. Version core.Version // TargetState defines a state of installation of this dogu. Optional field, but defaults to "TargetStatePresent" TargetState TargetState }
MaskDogu defines a Dogu, its version, and the installation state in which it is supposed to be after a blueprint was applied for a blueprintMask.
type RegistryConfigAppliedEvent ¶
type RegistryConfigAppliedEvent struct{}
func (RegistryConfigAppliedEvent) Message ¶
func (e RegistryConfigAppliedEvent) Message() string
func (RegistryConfigAppliedEvent) Name ¶
func (e RegistryConfigAppliedEvent) Name() string
type SelfUpgradeCompletedEvent ¶
type SelfUpgradeCompletedEvent struct{}
func (SelfUpgradeCompletedEvent) Message ¶
func (e SelfUpgradeCompletedEvent) Message() string
func (SelfUpgradeCompletedEvent) Name ¶
func (e SelfUpgradeCompletedEvent) Name() string
type SensitiveConfigDataCensoredEvent ¶
type SensitiveConfigDataCensoredEvent struct{}
func (SensitiveConfigDataCensoredEvent) Message ¶
func (e SensitiveConfigDataCensoredEvent) Message() string
func (SensitiveConfigDataCensoredEvent) Name ¶
func (e SensitiveConfigDataCensoredEvent) Name() string
type SensitiveDoguConfig ¶
type SensitiveDoguConfig struct { Present map[common.SensitiveDoguConfigKey]common.SensitiveDoguConfigValue Absent []common.SensitiveDoguConfigKey }
type SensitiveDoguConfigDiffs ¶
type SensitiveDoguConfigDiffs []SensitiveDoguConfigEntryDiff
func (SensitiveDoguConfigDiffs) GetSensitiveDoguConfigDiffByAction ¶
func (diffs SensitiveDoguConfigDiffs) GetSensitiveDoguConfigDiffByAction() map[ConfigAction][]SensitiveDoguConfigEntryDiff
type SensitiveDoguConfigEntryDiff ¶
type SensitiveDoguConfigEntryDiff struct { Key common.SensitiveDoguConfigKey Actual DoguConfigValueState Expected DoguConfigValueState DoguAlreadyInstalled bool NeededAction ConfigAction }
type StateDiff ¶
type StateDiff struct { DoguDiffs DoguDiffs ComponentDiffs ComponentDiffs DoguConfigDiffs map[common.SimpleDoguName]CombinedDoguConfigDiffs GlobalConfigDiffs GlobalConfigDiffs }
StateDiff represents the diff between the defined state in the effective blueprint and the actual state in the ecosystem. If there is a state in the ecosystem, which is not represented in the effective blueprint, then the expected state is the actual state.
func (StateDiff) GetDoguConfigDiffsByAction ¶
func (diff StateDiff) GetDoguConfigDiffsByAction() map[ConfigAction]DoguConfigDiffs
func (StateDiff) GetSensitiveDoguConfigDiffsByAction ¶
func (diff StateDiff) GetSensitiveDoguConfigDiffsByAction() map[ConfigAction]SensitiveDoguConfigDiffs
type StateDiffComponentDeterminedEvent ¶
type StateDiffComponentDeterminedEvent struct {
// contains filtered or unexported fields
}
StateDiffComponentDeterminedEvent provides event information over detected changes regarding components.
func (StateDiffComponentDeterminedEvent) Message ¶
func (s StateDiffComponentDeterminedEvent) Message() string
Message contains the StateDiffComponentDeterminedEvent's statistics message.
func (StateDiffComponentDeterminedEvent) Name ¶
func (s StateDiffComponentDeterminedEvent) Name() string
Name contains the StateDiffComponentDeterminedEvent display name.
type StateDiffDoguDeterminedEvent ¶
type StateDiffDoguDeterminedEvent struct {
// contains filtered or unexported fields
}
StateDiffDoguDeterminedEvent provides event information over detected changes regarding dogus.
func (StateDiffDoguDeterminedEvent) Message ¶
func (s StateDiffDoguDeterminedEvent) Message() string
Message contains the StateDiffDoguDeterminedEvent's statistics message.
func (StateDiffDoguDeterminedEvent) Name ¶
func (s StateDiffDoguDeterminedEvent) Name() string
Name contains the StateDiffDoguDeterminedEvent display name.
type StatusPhase ¶
type StatusPhase string
const ( // StatusPhaseNew marks a newly created blueprint-CR. StatusPhaseNew StatusPhase = "" // StatusPhaseStaticallyValidated marks the given blueprint spec as validated. StatusPhaseStaticallyValidated StatusPhase = "staticallyValidated" // StatusPhaseValidated marks the given blueprint spec as validated. StatusPhaseValidated StatusPhase = "validated" // StatusPhaseEffectiveBlueprintGenerated marks that the effective blueprint was generated out of the blueprint and the mask. StatusPhaseEffectiveBlueprintGenerated StatusPhase = "effectiveBlueprintGenerated" // StatusPhaseStateDiffDetermined marks that the diff to the ecosystem state was successfully determined. StatusPhaseStateDiffDetermined StatusPhase = "stateDiffDetermined" // StatusPhaseInvalid marks the given blueprint spec is semantically incorrect. StatusPhaseInvalid StatusPhase = "invalid" // StatusPhaseEcosystemHealthyUpfront marks that all currently installed dogus are healthy. StatusPhaseEcosystemHealthyUpfront StatusPhase = "ecosystemHealthyUpfront" // StatusPhaseEcosystemUnhealthyUpfront marks that some currently installed dogus are unhealthy. StatusPhaseEcosystemUnhealthyUpfront StatusPhase = "ecosystemUnhealthyUpfront" // StatusPhaseBlueprintApplicationPreProcessed shows that all pre-processing steps for the blueprint application // were successful. StatusPhaseBlueprintApplicationPreProcessed StatusPhase = "blueprintApplicationPreProcessed" // StatusPhaseAwaitSelfUpgrade marks that the blueprint operator waits for termination for a self upgrade. StatusPhaseAwaitSelfUpgrade StatusPhase = "awaitSelfUpgrade" // StatusPhaseSelfUpgradeCompleted marks that the blueprint operator itself got successfully upgraded. StatusPhaseSelfUpgradeCompleted StatusPhase = "selfUpgradeCompleted" // StatusPhaseInProgress marks that the blueprint is currently being processed. StatusPhaseInProgress StatusPhase = "inProgress" // StatusPhaseBlueprintApplicationFailed shows that the blueprint application failed. StatusPhaseBlueprintApplicationFailed StatusPhase = "blueprintApplicationFailed" // StatusPhaseBlueprintApplied indicates that the blueprint was applied but the ecosystem is not healthy yet. StatusPhaseBlueprintApplied StatusPhase = "blueprintApplied" // StatusPhaseEcosystemHealthyAfterwards shows that the ecosystem got healthy again after applying the blueprint. StatusPhaseEcosystemHealthyAfterwards StatusPhase = "ecosystemHealthyAfterwards" // StatusPhaseEcosystemUnhealthyAfterwards shows that the ecosystem got not healthy again after applying the blueprint. StatusPhaseEcosystemUnhealthyAfterwards StatusPhase = "ecosystemUnhealthyAfterwards" // StatusPhaseFailed marks that an error occurred during processing of the blueprint. StatusPhaseFailed StatusPhase = "failed" // StatusPhaseCompleted marks the blueprint as successfully applied. StatusPhaseCompleted StatusPhase = "completed" // StatusPhaseApplyRegistryConfig indicates that the apply registry config phase is active. StatusPhaseApplyRegistryConfig StatusPhase = "applyRegistryConfig" // StatusPhaseApplyRegistryConfigFailed indicates that the phase to apply registry config phase failed. StatusPhaseApplyRegistryConfigFailed StatusPhase = "applyRegistryConfigFailed" // StatusPhaseRegistryConfigApplied indicates that the phase to apply registry config phase succeeded. StatusPhaseRegistryConfigApplied StatusPhase = "registryConfigApplied" // StatusPhaseRestartsTriggered indicates that a restart has been triggered for all Dogus that needed a restart. // Restarts are needed when the Dogu config changes. StatusPhaseRestartsTriggered StatusPhase = "restartsTriggered" )
type TargetState ¶
type TargetState int
TargetState defines an enum of values that determines a state of installation.
func (TargetState) String ¶
func (state TargetState) String() string
String returns a string representation of the given TargetState enum value.