helpers

package
v1.77.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
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

func DefineHelperCommands

func DefineHelperCommands(rootCmd *cobra.Command, logger *log.Logger)

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

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 (*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

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 (*ModuleUpdatePolicySpecContainer) Set added in v1.64.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL