Documentation
¶
Index ¶
- Variables
- func NewDeckhouseReleaseController(ctx context.Context, mgr manager.Manager, dc dependency.Container, ...) error
- type CanaryChannelData
- type CanarySettings
- type DeckhouseReleaseFetcher
- type DeckhouseReleaseFetcherConfig
- type MetricsUpdater
- type ReleaseImageInfo
- type ReleaseMetadata
- type ReleaseUpdateInfo
- type ReleaseVersionData
- type TimeResult
Constants ¶
This section is empty.
Variables ¶
var ErrDeploymentContainerIsNotFound = errors.New("deployment container is not found")
var ErrImageIsNil = errors.New("image is nil")
var ErrImageNotChanged = errors.New("image not changed")
var ErrPreApplyCheckIsFailed = errors.New("pre apply check is failed")
Functions ¶
func NewDeckhouseReleaseController ¶
func NewDeckhouseReleaseController(ctx context.Context, mgr manager.Manager, dc dependency.Container, exts extenders.IExtendersStack, moduleManager moduleManager, updateSettings *helpers.DeckhouseSettingsContainer, metricStorage metricsstorage.Storage, logger *log.Logger, ) error
Types ¶
type CanaryChannelData ¶ added in v1.78.0
type CanaryChannelData struct {
Enabled bool `json:"enabled"`
Waves uint `json:"waves"`
Interval libapi.Duration `json:"interval"`
}
CanaryChannelData is the canary block of version.json for a single release channel.
type CanarySettings ¶ added in v1.78.0
CanarySettings is the canary rollout configuration of a single release channel.
type DeckhouseReleaseFetcher ¶ added in v1.68.2
type DeckhouseReleaseFetcher struct {
// contains filtered or unexported fields
}
func NewDeckhouseReleaseFetcher ¶ added in v1.68.2
func NewDeckhouseReleaseFetcher(cfg *DeckhouseReleaseFetcherConfig) *DeckhouseReleaseFetcher
func (*DeckhouseReleaseFetcher) GetReleaseChannel ¶ added in v1.68.2
func (f *DeckhouseReleaseFetcher) GetReleaseChannel() string
func (*DeckhouseReleaseFetcher) GetReleaseImageInfo ¶ added in v1.71.0
func (f *DeckhouseReleaseFetcher) GetReleaseImageInfo(ctx context.Context, previousImageHash string) (*ReleaseImageInfo, error)
GetReleaseImageInfo get Image, Digest and release metadata using imageTag with existing registry client return error if version.json not found in metadata return ErrImageNotChanged with ReleaseImageInfo if image hash matches with previousImageHash
type DeckhouseReleaseFetcherConfig ¶ added in v1.68.2
type DeckhouseReleaseFetcherConfig struct {
// contains filtered or unexported fields
}
type MetricsUpdater ¶ added in v1.68.0
type MetricsUpdater interface {
UpdateReleaseMetric(string, releaseUpdater.MetricLabels)
PurgeReleaseMetric(string)
}
type ReleaseImageInfo ¶ added in v1.71.0
type ReleaseImageInfo struct {
Metadata *ReleaseMetadata
Image registryv1.Image
Digest registryv1.Hash
}
type ReleaseMetadata ¶ added in v1.65.0
type ReleaseMetadata struct {
Version string
Changelog map[string]any
Canary map[string]CanarySettings
Requirements map[string]string
Disruptions map[string][]string
Suspend bool
}
ReleaseMetadata describes a Deckhouse release as assembled from the files of a release image: version.json, changelog.yaml and, when the image carries one, module.yaml.
func (*ReleaseMetadata) CalculateReleaseDelay ¶ added in v1.68.2
func (m *ReleaseMetadata) CalculateReleaseDelay(channel string, ts metav1.Time, clusterUUID string) *metav1.Time
CalculateReleaseDelay spreads clusters over the canary waves of the channel and returns the time this cluster may apply the release at, or nil for the first wave. Only call it for a channel IsCanaryRelease reports true for. https://github.com/deckhouse/deckhouse/issues/332
func (*ReleaseMetadata) IsCanaryRelease ¶ added in v1.68.2
func (m *ReleaseMetadata) IsCanaryRelease(channel string) bool
IsCanaryRelease reports whether canary is switched on for the given channel.
type ReleaseUpdateInfo ¶ added in v1.73.0
type ReleaseUpdateInfo struct {
TaskCalculation struct {
TaskType string `json:"taskType,omitempty"`
IsPatch bool `json:"isPatch"`
IsMajor bool `json:"isMajor"`
IsFromTo bool `json:"isFromTo"`
IsSingle bool `json:"isSingle"`
IsLatest bool `json:"isLatest"`
} `json:"taskCalculation"`
UpdatePolicy struct {
Mode string `json:"mode,omitempty"`
} `json:"updatePolicy"`
ForceRelease struct {
IsForced bool `json:"isForced"`
} `json:"forceRelease"`
PodReadiness struct {
IsReady bool `json:"isReady"`
} `json:"podReadiness"`
RequirementsCheck struct {
RequirementsMet bool `json:"requirementsMet"`
} `json:"requirementsCheck"`
}
type ReleaseVersionData ¶ added in v1.78.0
type ReleaseVersionData struct {
Version string `json:"version"`
Canary map[string]CanaryChannelData `json:"canary"`
Requirements map[string]string `json:"requirements"`
Disruptions map[string][]string `json:"disruptions"`
Suspend bool `json:"suspend"`
}
ReleaseVersionData is the wire format of the version.json file shipped inside a Deckhouse release image. It exists only to decode the registry payload: past the registry boundary the controller works with ReleaseMetadata.
func (*ReleaseVersionData) ToMetadata ¶ added in v1.78.0
func (d *ReleaseVersionData) ToMetadata() *ReleaseMetadata
ToMetadata converts the decoded version.json into the domain entity.
type TimeResult ¶ added in v1.68.0
type TimeResult struct {
*releaseUpdater.ProcessedDeployTimeResult
Notified bool
}