updater

package
v1.59.8 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth added in v1.43.0

type Auth struct {
	Basic *BasicAuth `json:"basic,omitempty"`
	Token *string    `json:"bearerToken,omitempty"`
}

func (*Auth) Fill added in v1.43.0

func (a *Auth) Fill(req *http.Request)

type BasicAuth added in v1.43.0

type BasicAuth struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type ByVersion

type ByVersion []DeckhouseRelease

func (ByVersion) Len

func (a ByVersion) Len() int

func (ByVersion) Less

func (a ByVersion) Less(i, j int) bool

func (ByVersion) Swap

func (a ByVersion) Swap(i, j int)

type DeckhouseRelease

type DeckhouseRelease struct {
	Name    string
	Version *semver.Version

	ManuallyApproved bool
	AnnotationFlags  DeckhouseReleaseAnnotationsFlags

	Requirements  map[string]string
	ChangelogLink string
	Disruptions   []string
	ApplyAfter    *time.Time
	CooldownUntil *time.Time

	Status v1alpha1.DeckhouseReleaseStatus // don't set transition time here to avoid snapshot overload
}

type DeckhouseReleaseAnnotationsFlags

type DeckhouseReleaseAnnotationsFlags struct {
	Suspend            bool
	Force              bool
	ApplyNow           bool
	DisruptionApproved bool
	NotificationShift  bool // time shift by the notification process
}

type DeckhouseReleaseData

type DeckhouseReleaseData struct {
	IsUpdating bool
	Notified   bool
}

type DeckhouseUpdater

type DeckhouseUpdater struct {
	// contains filtered or unexported fields
}

func NewDeckhouseUpdater

func NewDeckhouseUpdater(input *go_hook.HookInput, mode string, data DeckhouseReleaseData, podIsReady, isBootstrapping bool) (*DeckhouseUpdater, error)

func (*DeckhouseUpdater) ApplyForcedRelease

func (du *DeckhouseUpdater) ApplyForcedRelease()

ApplyForcedRelease deploys forced release without any checks (windows, requirements, approvals and so on)

func (*DeckhouseUpdater) ApplyPredictedRelease

func (du *DeckhouseUpdater) ApplyPredictedRelease(updateWindows update.Windows)

ApplyPredictedRelease applies predicted release, checks everything:

  • Deckhouse is ready (except patch)
  • Canary settings
  • Manual approving
  • Release requirements

func (*DeckhouseUpdater) ChangeUpdatingFlag

func (du *DeckhouseUpdater) ChangeUpdatingFlag(fl bool)

func (*DeckhouseUpdater) FetchAndPrepareReleases

func (du *DeckhouseUpdater) FetchAndPrepareReleases(snap []go_hook.FilterResult)

FetchAndPrepareReleases fetches releases from snapshot and then:

  • patch releases with empty status (just created)
  • handle suspended releases (patch status and remove annotation)
  • patch manual releases (change status)

func (*DeckhouseUpdater) HasForceRelease

func (du *DeckhouseUpdater) HasForceRelease() bool

HasForceRelease check the existence of the forced release

func (*DeckhouseUpdater) InManualMode

func (du *DeckhouseUpdater) InManualMode() bool

func (*DeckhouseUpdater) LastReleaseDeployed

func (du *DeckhouseUpdater) LastReleaseDeployed() bool

LastReleaseDeployed returns the equality of the latest existed release with the latest deployed

func (*DeckhouseUpdater) PredictNextRelease

func (du *DeckhouseUpdater) PredictNextRelease()

PredictNextRelease runs prediction of the next release to deploy. it skips patch releases and save only the latest one

func (*DeckhouseUpdater) PredictedReleaseIsPatch

func (du *DeckhouseUpdater) PredictedReleaseIsPatch() bool

PredictedReleaseIsPatch shows if the predicted release is a patch with respect to the Deployed one

func (*DeckhouseUpdater) ReleasesCount

func (du *DeckhouseUpdater) ReleasesCount() int

type NotificationConfig

type NotificationConfig struct {
	WebhookURL              string
	SkipTLSVerify           bool
	MinimalNotificationTime v1alpha1.Duration
	Auth                    *Auth `json:"auth,omitempty"`
}

func ParseNotificationConfigFromValues

func ParseNotificationConfigFromValues(input *go_hook.HookInput) (*NotificationConfig, error)

type StatusPatch

type StatusPatch v1alpha1.DeckhouseReleaseStatus

func (StatusPatch) MarshalJSON

func (sp StatusPatch) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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