Documentation
¶
Index ¶
- Constants
- func DefineHelperCommands(rootCmd *cobra.Command, logger *log.Logger)
- type ApplicationsSettingsContainer
- type DeckhouseSettings
- type DeckhouseSettingsContainer
- func (c *DeckhouseSettingsContainer) ExperimentalModuleAllowed(name string) bool
- func (c *DeckhouseSettingsContainer) Get() *DeckhouseSettings
- func (c *DeckhouseSettingsContainer) GetUpdateSettings() releaseUpdater.Settings
- func (c *DeckhouseSettingsContainer) Set(settings *DeckhouseSettings)
- func (c *DeckhouseSettingsContainer) SubscribeUpdate() <-chan struct{}
- type ModuleUpdatePolicySpecContainer
Constants ¶
const DefaultBlockOnAlertsSeverity = 4
DefaultBlockOnAlertsSeverity is the default of update.blockOnAlerts.severity in the deckhouse settings, in global.applications.update and in the Application spec alike.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApplicationsSettingsContainer ¶ added in v1.77.3
type ApplicationsSettingsContainer struct {
// contains filtered or unexported fields
}
ApplicationsSettingsContainer holds global.applications.update, parsed once per change of the global settings, the way DeckhouseSettingsContainer holds the deckhouse ones.
func NewApplicationsSettingsContainer ¶ added in v1.77.3
func NewApplicationsSettingsContainer() *ApplicationsSettingsContainer
func (*ApplicationsSettingsContainer) GetUpdateSettings ¶ added in v1.77.3
func (c *ApplicationsSettingsContainer) GetUpdateSettings() (releaseUpdater.Settings, bool)
GetUpdateSettings returns global.applications.update, and false while the global settings do not set it.
func (*ApplicationsSettingsContainer) Set ¶ added in v1.77.3
func (c *ApplicationsSettingsContainer) Set(global addonutils.Values) error
Set parses applications.update out of the global settings and signals the subscribers if it changed. Settings that fail to parse leave the stored ones in place.
func (*ApplicationsSettingsContainer) SubscribeUpdate ¶ added in v1.77.3
func (c *ApplicationsSettingsContainer) SubscribeUpdate() <-chan struct{}
SubscribeUpdate returns a channel signalled whenever Set changes applications.update. Signals do not queue up: a subscriber that reads late gets one for all the changes in between, so it has to read the settings back rather than count the signals.
type DeckhouseSettings ¶ added in v1.63.0
type DeckhouseSettings struct {
Update struct {
Mode string `json:"mode"`
DisruptionApprovalMode string `json:"disruptionApprovalMode"`
Windows update.Windows `json:"windows"`
NotificationConfig releaseUpdater.NotificationConfig `json:"notification"`
BlockOnAlerts releaseUpdater.BlockOnAlerts `json:"blockOnAlerts"`
} `json:"update"`
ReleaseChannel string `json:"releaseChannel"`
AllowExperimentalModules bool `json:"allowExperimentalModules"`
AllowedExperimentalModules []string `json:"allowedExperimentalModules"`
}
DeckhouseSettings is an openapi spec for deckhouse settings, it's not a part of DeckhouseReleaseSpec but rather it's a part of DeckhouseReleaseController
func DefaultDeckhouseSettings ¶ added in v1.63.12
func DefaultDeckhouseSettings() *DeckhouseSettings
type DeckhouseSettingsContainer ¶ added in v1.63.0
type DeckhouseSettingsContainer struct {
// contains filtered or unexported fields
}
func NewDeckhouseSettingsContainer ¶ added in v1.63.0
func NewDeckhouseSettingsContainer(spec *DeckhouseSettings, metricStorage metricsstorage.Storage) *DeckhouseSettingsContainer
func (*DeckhouseSettingsContainer) ExperimentalModuleAllowed ¶ added in v1.77.0
func (c *DeckhouseSettingsContainer) ExperimentalModuleAllowed(name string) bool
ExperimentalModuleAllowed reports whether the named module may be enabled despite being experimental: either all experimental modules are allowed, or the module is named in the allowlist. It reads the settings under the lock.
func (*DeckhouseSettingsContainer) Get ¶ added in v1.63.0
func (c *DeckhouseSettingsContainer) Get() *DeckhouseSettings
func (*DeckhouseSettingsContainer) GetUpdateSettings ¶ added in v1.77.3
func (c *DeckhouseSettingsContainer) GetUpdateSettings() releaseUpdater.Settings
GetUpdateSettings returns the update settings in the form the release updater takes them. They are read under the lock, which reading them through Get is not, and Set replaces the windows and the notification settings rather than changing them in place, so the result cannot be torn. It blocks until the settings are first set, the same as Get.
func (*DeckhouseSettingsContainer) Set ¶ added in v1.63.0
func (c *DeckhouseSettingsContainer) Set(settings *DeckhouseSettings)
Set update settings in container TODO: requeue all releases on a change, as SubscribeUpdate lets the Application controller do
func (*DeckhouseSettingsContainer) SubscribeUpdate ¶ added in v1.77.3
func (c *DeckhouseSettingsContainer) SubscribeUpdate() <-chan struct{}
SubscribeUpdate returns a channel signalled whenever Set changes the update settings, the first Set included. Signals do not queue up: a subscriber that reads late gets one for all the changes in between, so it has to read the settings back rather than count the signals.
type ModuleUpdatePolicySpecContainer ¶ added in v1.64.0
type ModuleUpdatePolicySpecContainer struct {
// contains filtered or unexported fields
}
func NewModuleUpdatePolicySpecContainer ¶ added in v1.64.0
func NewModuleUpdatePolicySpecContainer(spec *v1alpha2.ModuleUpdatePolicySpec) *ModuleUpdatePolicySpecContainer
func (*ModuleUpdatePolicySpecContainer) Get ¶ added in v1.64.0
func (c *ModuleUpdatePolicySpecContainer) Get() *v1alpha2.ModuleUpdatePolicySpec
func (*ModuleUpdatePolicySpecContainer) Set ¶ added in v1.64.0
func (c *ModuleUpdatePolicySpecContainer) Set(settings *DeckhouseSettings)