v1beta1

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: BSD-3-Clause Imports: 9 Imported by: 2

Documentation

Overview

Package v1beta1 contains API Schema definitions for the managedupgrade v1beta1 API group +kubebuilder:object:generate=true +groupName=managedupgrade.appuio.io

Index

Constants

View Source
const (
	// UpgradeJobConditionFailed is the condition type for a failed upgrade job
	UpgradeJobConditionFailed = "Failed"
	// UpgradeJobConditionSucceeded is the condition type for a succeeded upgrade job
	UpgradeJobConditionSucceeded = "Succeeded"
	// UpgradeJobConditionStarted is the condition type for a started upgrade job
	UpgradeJobConditionStarted = "Started"
	// UpgradeJobConditionPreHealthCheckDone is the condition type for a pre health check done upgrade job
	UpgradeJobConditionPreHealthCheckDone = "PreHealthCheckDone"
	// UpgradeJobConditionUpgradeCompleted is the condition type for a started upgrade job
	UpgradeJobConditionUpgradeCompleted = "UpgradeCompleted"
	// UpgradeJobConditionPostHealthCheckDone is the condition type for a post health check done upgrade job
	UpgradeJobConditionPostHealthCheckDone = "PostHealthCheckDone"
	// UpgradeJobConditionPaused is the condition type for a paused upgrade job.
	// A upgrade job can be paused if `.spec.machineConfigPools` matches a pool and `delayUpgrade` is set.
	UpgradeJobConditionPaused = "Paused"
	// UpgradeJobConditionMachineConfigPoolsPaused is true if the controller paused any machine config pools.
	// Does not correlate with any upgrade specific condition.
	UpgradeJobConditionMachineConfigPoolsPaused = "MachineConfigPoolsPaused"

	// UpgradeJobReasonFailed is the generic reason for a failed upgrade job
	UpgradeJobReasonFailed = "Failed"
	// UpgradeJobReasonExpired is used when the upgrade job is not started before the startBefore time
	UpgradeJobReasonExpired = "Expired"
	// UpgradeJobReasonUnpausingPoolsExpired is used when the upgrade job was not able to unpause the machine config pools before the delayMax time
	UpgradeJobReasonUnpausingPoolsExpired = "UnpausingPoolsExpired"
	// UpgradeJobReasonTimedOut is used when the upgrade job is not completed before the upgradeTimeout time
	UpgradeJobReasonTimedOut = "TimedOut"
	// UpgradeJobReasonPreHealthCheckFailed is used when the health check failed
	UpgradeJobReasonPreHealthCheckFailed = "PreHealthCheckFailed"
	// UpgradeJobReasonPostHealthCheckFailed is used when the health check failed
	UpgradeJobReasonPostHealthCheckFailed = "PostHealthCheckFailed"
	// UpgradeJobReasonUpgradeWithdrawn is used when the upgrade was retracted by the upstream after the upgrade job was created
	UpgradeJobReasonUpgradeWithdrawn = "UpgradeWithdrawn"
	// UpgradeJobReasonHookFailed is used when a hook failed
	UpgradeJobReasonHookFailed = "HookFailed"
	// UpgradeJobReasonStarted is used when a step of the upgrade job was started
	UpgradeJobReasonStarted = "Started"
	// UpgradeJobReasonSucceeded is used when a step of the upgrade job did succeed
	UpgradeJobReasonSucceeded = "Succeeded"
	// UpgradeJobReasonSkipped is used when the upgrade job was skipped due to a suspension window
	UpgradeJobReasonSkipped = "Skipped"
	// UpgradeJobReasonCompleted is used when a step of the upgrade job did succeed
	UpgradeJobReasonCompleted = "Completed"
	// UpgradeJobReasonInProgress is used when the pre health check was done
	UpgradeJobReasonInProgress = "InProgress"
	// UpgradeJobReasonNoManagedPools is used when no machine config pools are managed by the upgrade job
	UpgradeJobReasonNoManagedPools = "NoManagedPools"
	// UpgradeJobReasonDelaySet is used if the upgrade job paused machine config pools due to delayUpgrade
	UpgradeJobReasonDelaySet = "DelaySet"
)
View Source
const (
	// EventCreate is the event type for when a job is created.
	// The version is pinned at this point and the job is waiting for startAfter.
	// This can be used to communicate the pending upgrade to other systems.
	// See `pinVersionWindow` in `UpgradeConfig`.
	EventCreate UpgradeEvent = "Create"
	// EventStart is the event type for when a job is started.
	EventStart UpgradeEvent = "Start"
	// UpgradeCompleted is the event type for when the upgrade is completed and health checks have passed,
	// but before any paused MachineConfigPools are done upgrading.
	EventUpgradeComplete UpgradeEvent = "UpgradeComplete"

	// EventFinish is the event type for when a job is finished regardless of outcome.
	EventFinish UpgradeEvent = "Finish"
	// EventSuccess is the event type for when a job is finished successfully.
	EventSuccess UpgradeEvent = "Success"
	// EventFailure is the event type for when a job is finished with a failure.
	EventFailure UpgradeEvent = "Failure"

	// FailurePolicyAbort is the failure policy for aborting the upgrade.
	FailurePolicyAbort = "Abort"
	// FailurePolicyIgnore is the failure policy for ignoring the failure.
	FailurePolicyIgnore = "Ignore"

	// RunNext is the run type for running the hook for the next job.
	RunNext = "Next"
	// RunAll is the run type for running the hook for all jobs.
	RunAll = "All"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "managedupgrade.appuio.io", Version: "v1beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type ClaimReference

type ClaimReference struct {
	// API version of the referent.
	APIVersion string `json:"apiVersion" protobuf:"bytes,5,opt,name=apiVersion"`
	// Kind of the referent.
	Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
	// Name of the referent.
	Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
	// UID of the referent.
	UID types.UID `json:"uid" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
}

ClaimReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field. +structType=atomic

func (*ClaimReference) DeepCopy

func (in *ClaimReference) DeepCopy() *ClaimReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClaimReference.

func (*ClaimReference) DeepCopyInto

func (in *ClaimReference) DeepCopyInto(out *ClaimReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterVersion

type ClusterVersion struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ClusterVersionSpec   `json:"spec,omitempty"`
	Status ClusterVersionStatus `json:"status,omitempty"`
}

ClusterVersion is the Schema for the clusterversions API

func (*ClusterVersion) DeepCopy

func (in *ClusterVersion) DeepCopy() *ClusterVersion

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersion.

func (*ClusterVersion) DeepCopyInto

func (in *ClusterVersion) DeepCopyInto(out *ClusterVersion)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterVersion) DeepCopyObject

func (in *ClusterVersion) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterVersionList

type ClusterVersionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ClusterVersion `json:"items"`
}

ClusterVersionList contains a list of ClusterVersion

func (*ClusterVersionList) DeepCopy

func (in *ClusterVersionList) DeepCopy() *ClusterVersionList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionList.

func (*ClusterVersionList) DeepCopyInto

func (in *ClusterVersionList) DeepCopyInto(out *ClusterVersionList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterVersionList) DeepCopyObject

func (in *ClusterVersionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterVersionOverlay added in v0.7.0

type ClusterVersionOverlay struct {
	// Spec is the spec overlaid to the base ClusterVersion object
	Spec ConfigV1ClusterVersionSpec `json:"spec,omitempty"`
}

ClusterVersionOverlay defines the overlay applied to the base ClusterVersion object.

func (*ClusterVersionOverlay) DeepCopy added in v0.7.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionOverlay.

func (*ClusterVersionOverlay) DeepCopyInto added in v0.7.0

func (in *ClusterVersionOverlay) DeepCopyInto(out *ClusterVersionOverlay)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterVersionOverlayConfig added in v0.7.0

type ClusterVersionOverlayConfig struct {
	// From is the time from which the overlay is applied.
	// +kubebuilder:validation:Required
	// +required
	From metav1.Time `json:"from"`
	// Overlay is the overlay applied to the base ClusterVersion object
	Overlay ClusterVersionOverlay `json:"overlay"`
}

ClusterVersionOverlayConfig defines the overlay applied to the base ClusterVersion object.

func (*ClusterVersionOverlayConfig) DeepCopy added in v0.7.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionOverlayConfig.

func (*ClusterVersionOverlayConfig) DeepCopyInto added in v0.7.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterVersionSpec

type ClusterVersionSpec struct {

	// Template is the template applied to the ClusterVersion object
	Template ClusterVersionTemplate `json:"template,omitempty"`
	// Overlays are the overlays applied to the base ClusterVersion object at the time specified in the From field.
	// Overlays do not combine, the overlay with the latest From timestamp is applied.
	// If two overlays have the same From timestamp, the behavior is undefined.
	// Overlays can't remove fields from the base ClusterVersion object.
	// You can work around this by setting the field to an empty value in the base ClusterVersion and applying an overlay in the past with the field set;
	// this allows the next overlay to remove the field.
	Overlays []ClusterVersionOverlayConfig `json:"overlays,omitempty"`
}

ClusterVersionSpec defines the desired state of ClusterVersion

func (*ClusterVersionSpec) DeepCopy

func (in *ClusterVersionSpec) DeepCopy() *ClusterVersionSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionSpec.

func (*ClusterVersionSpec) DeepCopyInto

func (in *ClusterVersionSpec) DeepCopyInto(out *ClusterVersionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterVersionStatus

type ClusterVersionStatus struct {
	// Current is the ClusterVersion object that is currently applied.
	Current configv1.ClusterVersionSpec `json:"current,omitempty"`
	// Overlays shows the ClusterVersion objects that will be applied if their From timestamp is reached.
	Overlays []ClusterVersionStatusOverlays `json:"overlays,omitempty"`
	// OverlayApplied is the from timestamp of the currently applied overlay
	OverlayApplied metav1.Time `json:"overlayApplied,omitempty"`
}

ClusterVersionStatus defines the observed state of ClusterVersion

func (*ClusterVersionStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionStatus.

func (*ClusterVersionStatus) DeepCopyInto

func (in *ClusterVersionStatus) DeepCopyInto(out *ClusterVersionStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterVersionStatusOverlays added in v0.7.0

type ClusterVersionStatusOverlays struct {
	// From is the time from which this preview will be applied.
	From metav1.Time `json:"from"`
	// Preview is the spec applied to the ClusterVersion object at the time of From.
	Preview ClusterVersionStatusPreview `json:"preview,omitempty"`
}

ClusterVersionStatusOverlays defines the ClusterVersion objects that will be applied if their From timestamp is reached.

func (*ClusterVersionStatusOverlays) DeepCopy added in v0.7.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionStatusOverlays.

func (*ClusterVersionStatusOverlays) DeepCopyInto added in v0.7.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterVersionStatusPreview added in v0.7.0

type ClusterVersionStatusPreview struct {
	// Spec is the spec applied to the ClusterVersion object
	Spec configv1.ClusterVersionSpec `json:"spec,omitempty"`
}

ClusterVersionStatusPreview defines the spec applied to the ClusterVersion object.

func (*ClusterVersionStatusPreview) DeepCopy added in v0.7.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionStatusPreview.

func (*ClusterVersionStatusPreview) DeepCopyInto added in v0.7.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterVersionTemplate

type ClusterVersionTemplate struct {
	// Spec is the spec applied to the ClusterVersion object
	Spec configv1.ClusterVersionSpec `json:"spec,omitempty"`
}

ClusterVersionTemplate defines the template applied to the ClusterVersion object.

func (*ClusterVersionTemplate) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionTemplate.

func (*ClusterVersionTemplate) DeepCopyInto

func (in *ClusterVersionTemplate) DeepCopyInto(out *ClusterVersionTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConfigV1ClusterVersionSpec added in v0.7.0

type ConfigV1ClusterVersionSpec struct {
	// clusterID uniquely identifies this cluster. This is expected to be
	// an RFC4122 UUID value (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx in
	// hexadecimal values).
	//
	// +optional
	ClusterID configv1.ClusterID `json:"clusterID,omitempty"`

	// desiredUpdate is an optional field that indicates the desired value of
	// the cluster version. Setting this value will trigger an upgrade (if
	// the current version does not match the desired version). The set of
	// recommended update values is listed as part of available updates in
	// status, and setting values outside that range may cause the upgrade
	// to fail. You may specify the version field without setting image if
	// an update exists with that version in the availableUpdates or history.
	//
	// If an upgrade fails the operator will halt and report status
	// about the failing component. Setting the desired update value back to
	// the previous version will cause a rollback to be attempted. Not all
	// rollbacks will succeed.
	//
	// +optional
	DesiredUpdate *configv1.Update `json:"desiredUpdate,omitempty"`

	// upstream may be used to specify the preferred update server. By default
	// it will use the appropriate update server for the cluster and region.
	//
	// +optional
	Upstream configv1.URL `json:"upstream,omitempty"`
	// channel is an identifier for explicitly requesting that a non-default
	// set of updates be applied to this cluster. The default channel will be
	// contain stable updates that are appropriate for production clusters.
	//
	// +optional
	Channel string `json:"channel,omitempty"`

	// capabilities configures the installation of optional, core
	// cluster components.  A null value here is identical to an
	// empty object; see the child properties for default semantics.
	// +optional
	Capabilities *configv1.ClusterVersionCapabilitiesSpec `json:"capabilities,omitempty"`

	// overrides is list of overides for components that are managed by
	// cluster version operator. Marking a component unmanaged will prevent
	// the operator from creating or updating the object.
	// +optional
	Overrides []configv1.ComponentOverride `json:"overrides,omitempty"`
}

ConfigV1ClusterVersionSpec is a copy of configv1.ClusterVersionSpec to allow for partial updates. It makes the cluster id optional. It is checked against configv1.ClusterVersionSpec to ensure that it is always up to date. TODO(bastjan): Make codegen generate this type.

func (*ConfigV1ClusterVersionSpec) DeepCopy added in v0.7.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigV1ClusterVersionSpec.

func (*ConfigV1ClusterVersionSpec) DeepCopyInto added in v0.7.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HookJobTracker

type HookJobTracker struct {
	// HookEvent is the event of the hook
	HookEvent string `json:"hookEvent,omitempty"`
	// UpdgradeJobHook is the hook that was executed
	UpgradeJobHookName string `json:"upgradeJobHook,omitempty"`

	// Status is the status of the hook
	Status HookJobTrackerStatus `json:"status,omitempty"`
	// Message is the message for the status
	Message string `json:"message,omitempty"`
}

HookJobTracker keeps track of the hooks that have been executed

func (*HookJobTracker) DeepCopy

func (in *HookJobTracker) DeepCopy() *HookJobTracker

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HookJobTracker.

func (*HookJobTracker) DeepCopyInto

func (in *HookJobTracker) DeepCopyInto(out *HookJobTracker)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HookJobTrackerStatus

type HookJobTrackerStatus string
const (
	HookJobTrackerStatusComplete HookJobTrackerStatus = "complete"
	HookJobTrackerStatusFailed   HookJobTrackerStatus = "failed"
	HookJobTrackerStatusActive   HookJobTrackerStatus = "active"
)

type UpgradeConfig

type UpgradeConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec UpgradeConfigSpec `json:"spec"`
	// +optional
	Status UpgradeConfigStatus `json:"status"`
}

UpgradeConfig is the Schema for the upgradeconfigs API

func (*UpgradeConfig) DeepCopy

func (in *UpgradeConfig) DeepCopy() *UpgradeConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeConfig.

func (*UpgradeConfig) DeepCopyInto

func (in *UpgradeConfig) DeepCopyInto(out *UpgradeConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UpgradeConfig) DeepCopyObject

func (in *UpgradeConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type UpgradeConfigJobTemplate

type UpgradeConfigJobTemplate struct {
	// Standard object's metadata of the jobs created from this template.
	// +optional
	Metadata metav1.ObjectMeta `json:"metadata"`
	// Specification of the desired behavior of the job.
	Spec UpgradeConfigJobTemplateSpec `json:"spec"`
}

UpgradeConfigJobTemplate defines the desired state of UpgradeJob

func (*UpgradeConfigJobTemplate) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeConfigJobTemplate.

func (*UpgradeConfigJobTemplate) DeepCopyInto

func (in *UpgradeConfigJobTemplate) DeepCopyInto(out *UpgradeConfigJobTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpgradeConfigJobTemplateSpec

type UpgradeConfigJobTemplateSpec struct {
	Config UpgradeJobConfig `json:"config"`
}

UpgradeConfigJobTemplateSpec defines the desired state of UpgradeJob

func (*UpgradeConfigJobTemplateSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeConfigJobTemplateSpec.

func (*UpgradeConfigJobTemplateSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpgradeConfigList

type UpgradeConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []UpgradeConfig `json:"items"`
}

UpgradeConfigList contains a list of UpgradeConfig

func (*UpgradeConfigList) DeepCopy

func (in *UpgradeConfigList) DeepCopy() *UpgradeConfigList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeConfigList.

func (*UpgradeConfigList) DeepCopyInto

func (in *UpgradeConfigList) DeepCopyInto(out *UpgradeConfigList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UpgradeConfigList) DeepCopyObject

func (in *UpgradeConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type UpgradeConfigSchedule

type UpgradeConfigSchedule struct {
	// Cron defines the cron schedule for the upgrade as per https://pkg.go.dev/github.com/robfig/cron/v3#hdr-CRON_Expression_Format
	Cron string `json:"cron"`
	// IsoWeek defines the week of the year according to ISO 8601 week number to schedule the upgrade.
	// Currently supported values are `@odd` and `@even`.
	// +optional
	// +kubebuilder:validation:Pattern:=`^(@odd|@even|\d{1,2})$`
	IsoWeek string `json:"isoWeek"`
	// Location defines the location to use for the cron schedule. Defaults to the local time zone.
	// +kubebuilder:default:=Local
	Location string `json:"location"`
	// Suspend defines whether the upgrade should be suspended. Defaults to false.
	// +optional
	Suspend bool `json:"suspend"`
}

UpgradeConfigSchedule defines the schedule for the upgrade

func (*UpgradeConfigSchedule) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeConfigSchedule.

func (*UpgradeConfigSchedule) DeepCopyInto

func (in *UpgradeConfigSchedule) DeepCopyInto(out *UpgradeConfigSchedule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpgradeConfigSpec

type UpgradeConfigSpec struct {
	// Schedule defines the schedule for the upgrade
	Schedule UpgradeConfigSchedule `json:"schedule"`
	// PinVersionWindow defines the time window before the maintenance window in which the upgrade version is pinned.
	// `UpgradeJobs` are created at `schedule - pinVersionWindow`.
	// +optional
	PinVersionWindow metav1.Duration `json:"pinVersionWindow"`
	// MaxSchedulingDelay defines the maximum time after which the upgrade job should be scheduled.
	// If the upgrade job is not scheduled before this time, it will not be scheduled.
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=duration
	// +kubebuilder:default:="1h"
	MaxSchedulingDelay metav1.Duration `json:"maxSchedulingDelay"`
	// MaxUpgradeStartDelay defines the maximum time after which the upgrade job should be started.
	// If the upgrade job is not started before this time, it is considered failed.
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=duration
	// +kubebuilder:default:="1h"
	MaxUpgradeStartDelay metav1.Duration `json:"maxUpgradeStartDelay"`

	// JobTemplate defines the template for the upgrade job
	JobTemplate UpgradeConfigJobTemplate `json:"jobTemplate"`
}

UpgradeConfigSpec defines the desired state of UpgradeConfig

func (*UpgradeConfigSpec) DeepCopy

func (in *UpgradeConfigSpec) DeepCopy() *UpgradeConfigSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeConfigSpec.

func (*UpgradeConfigSpec) DeepCopyInto

func (in *UpgradeConfigSpec) DeepCopyInto(out *UpgradeConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpgradeConfigStatus

type UpgradeConfigStatus struct {
	// LastScheduledUpgrade is the time at which the cluster version was last checked for updates.
	// Matches the startAfter time of the upgrade job that was created, or would have been created if an update was available.
	// Also is increased when a job would have been created, but was not created due to the config being suspended.
	// +optional
	LastScheduledUpgrade *metav1.Time `json:"lastScheduledUpgrade,omitempty"`
}

UpgradeConfigStatus defines the observed state of UpgradeConfig

func (*UpgradeConfigStatus) DeepCopy

func (in *UpgradeConfigStatus) DeepCopy() *UpgradeConfigStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeConfigStatus.

func (*UpgradeConfigStatus) DeepCopyInto

func (in *UpgradeConfigStatus) DeepCopyInto(out *UpgradeConfigStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpgradeEvent

type UpgradeEvent string

UpgradeEvent is the type for upgrade events. +kubebuilder:validation:Enum=Create;Start;UpgradeComplete;Finish;Success;Failure

func (UpgradeEvent) InfluencesOutcome

func (e UpgradeEvent) InfluencesOutcome() bool

type UpgradeJob

type UpgradeJob struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   UpgradeJobSpec   `json:"spec,omitempty"`
	Status UpgradeJobStatus `json:"status,omitempty"`
}

UpgradeJob is the Schema for the upgradejobs API

func (*UpgradeJob) DeepCopy

func (in *UpgradeJob) DeepCopy() *UpgradeJob

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeJob.

func (*UpgradeJob) DeepCopyInto

func (in *UpgradeJob) DeepCopyInto(out *UpgradeJob)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UpgradeJob) DeepCopyObject

func (in *UpgradeJob) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type UpgradeJobConfig

type UpgradeJobConfig struct {
	// UpgradeTimeout defines the timeout after which the upgrade is considered failed.
	// Relative to the `.spec.startAfter` timestamp of the upgrade job.
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=duration
	// +kubebuilder:default:="12h"
	UpgradeTimeout metav1.Duration `json:"upgradeTimeout"`

	// PreUpgradeHealthChecks defines the health checks to be performed before the upgrade
	PreUpgradeHealthChecks UpgradeJobHealthCheck `json:"preUpgradeHealthChecks"`
	// PostUpgradeHealthChecks defines the health checks to be performed after the upgrade
	PostUpgradeHealthChecks UpgradeJobHealthCheck `json:"postUpgradeHealthChecks"`

	// MachineConfigPools defines the machine config pool specific configuration for the upgrade job
	// +optional
	MachineConfigPools []UpgradeJobMachineConfigPoolSpec `json:"machineConfigPools,omitempty"`
}

UpgradeJobConfig defines the configuration for the upgrade job

func (*UpgradeJobConfig) DeepCopy

func (in *UpgradeJobConfig) DeepCopy() *UpgradeJobConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeJobConfig.

func (*UpgradeJobConfig) DeepCopyInto

func (in *UpgradeJobConfig) DeepCopyInto(out *UpgradeJobConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpgradeJobHealthCheck

type UpgradeJobHealthCheck struct {
	// Timeout defines the timeout after which the health check is considered failed
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=duration
	// +kubebuilder:default:="1h"
	Timeout metav1.Duration `json:"timeout"`

	// SkipDegradedOperatorsCheck defines whether to check the ClusterVersion object for degraded operators when performing the health check
	// +optional
	SkipDegradedOperatorsCheck bool `json:"skipDegradedOperatorsCheck"`
}

UpgradeJobHealthCheck defines the health checks to be performed

func (*UpgradeJobHealthCheck) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeJobHealthCheck.

func (*UpgradeJobHealthCheck) DeepCopyInto

func (in *UpgradeJobHealthCheck) DeepCopyInto(out *UpgradeJobHealthCheck)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpgradeJobHook

type UpgradeJobHook struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   UpgradeJobHookSpec   `json:"spec,omitempty"`
	Status UpgradeJobHookStatus `json:"status,omitempty"`
}

UpgradeJobHook is the Schema for the upgradejobhooks API

func (*UpgradeJobHook) Claim

func (u *UpgradeJobHook) Claim(claimer client.Object) (ok, updated bool)

Claim claims the hook for the given claimer. Returns true if the hook was claimed, or does not need to be claimed, false if it was already claimed. Second return value is true if the hooks status was updated.

func (*UpgradeJobHook) DeepCopy

func (in *UpgradeJobHook) DeepCopy() *UpgradeJobHook

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeJobHook.

func (*UpgradeJobHook) DeepCopyInto

func (in *UpgradeJobHook) DeepCopyInto(out *UpgradeJobHook)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UpgradeJobHook) DeepCopyObject

func (in *UpgradeJobHook) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*UpgradeJobHook) WouldExecute added in v0.5.0

func (u *UpgradeJobHook) WouldExecute(claimer client.Object) bool

WouldExecute returns true if the hook would be executed for the given claimer.

type UpgradeJobHookList

type UpgradeJobHookList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []UpgradeJobHook `json:"items"`
}

UpgradeJobHookList contains a list of UpgradeJobHook

func (*UpgradeJobHookList) DeepCopy

func (in *UpgradeJobHookList) DeepCopy() *UpgradeJobHookList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeJobHookList.

func (*UpgradeJobHookList) DeepCopyInto

func (in *UpgradeJobHookList) DeepCopyInto(out *UpgradeJobHookList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UpgradeJobHookList) DeepCopyObject

func (in *UpgradeJobHookList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type UpgradeJobHookSpec

type UpgradeJobHookSpec struct {
	// Events is the list of events to trigger the hook to be executed.
	// Events should be idempotent and not assume any prior events have been executed.
	// `Create`, `Start`, and `UpgradeComplete` are the events that influence the outcome of the upgrade.
	// `Finish`, `Success`, and `Failure` do not influence the outcome of the upgrade,
	// Job completion will not be checked, they are only used for informational purposes.
	Events []UpgradeEvent `json:"events,omitempty"`
	// Run defines if the hook is executed for the `Next` or `All` jobs.
	// Defaults to `All`.
	// +kubebuilder:validation:Enum=Next;All
	Run string `json:"run,omitempty"`
	// FailurePolicy defines the policy for handling failures.
	// If `Abort` the upgrade is aborted and the job is marked as failed.
	// If `Ignore` the upgrade continues and the job is marked as success.
	// Defaults to `Ignore`.
	// More advanced failure policies can be handled through the upstream Job failure handling mechanisms.
	// +kubebuilder:validation:Enum=Abort;Ignore
	FailurePolicy string `json:"failurePolicy,omitempty"`
	// Disruptive defines if the code run by the hook is potentially disruptive.
	// Added to the job metrics and injected as an environment variable to all hooks matching the job.
	// This is currently only informational, but can be used to make decisions in jobs.
	// The default is `false`.
	Disruptive bool `json:"disruptive,omitempty"`
	// Selector is the label selector that determines which upgrade jobs the hook is executed for.
	Selector metav1.LabelSelector `json:"selector,omitempty"`
	// Template is the job template that is executed.
	Template batchv1.JobTemplateSpec `json:"template,omitempty"`
}

UpgradeJobHookSpec defines the desired state of UpgradeJobHook

func (*UpgradeJobHookSpec) DeepCopy

func (in *UpgradeJobHookSpec) DeepCopy() *UpgradeJobHookSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeJobHookSpec.

func (*UpgradeJobHookSpec) DeepCopyInto

func (in *UpgradeJobHookSpec) DeepCopyInto(out *UpgradeJobHookSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (UpgradeJobHookSpec) GetFailurePolicy

func (s UpgradeJobHookSpec) GetFailurePolicy() string

func (UpgradeJobHookSpec) GetRun

func (s UpgradeJobHookSpec) GetRun() string

type UpgradeJobHookStatus

type UpgradeJobHookStatus struct {
	// ClaimedBy is the owner reference of the job that claimed the hook.
	// Only used for hooks with `run: Next`.
	ClaimedBy ClaimReference `json:"claimedBy,omitempty"`
}

UpgradeJobHookStatus defines the observed state of UpgradeJobHook

func (*UpgradeJobHookStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeJobHookStatus.

func (*UpgradeJobHookStatus) DeepCopyInto

func (in *UpgradeJobHookStatus) DeepCopyInto(out *UpgradeJobHookStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpgradeJobList

type UpgradeJobList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []UpgradeJob `json:"items"`
}

UpgradeJobList contains a list of UpgradeJob

func (*UpgradeJobList) DeepCopy

func (in *UpgradeJobList) DeepCopy() *UpgradeJobList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeJobList.

func (*UpgradeJobList) DeepCopyInto

func (in *UpgradeJobList) DeepCopyInto(out *UpgradeJobList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UpgradeJobList) DeepCopyObject

func (in *UpgradeJobList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type UpgradeJobMachineConfigPoolDelayUpgradeSpec added in v0.6.0

type UpgradeJobMachineConfigPoolDelayUpgradeSpec struct {
	// DelayMin defines the delay after which the upgrade of the machine config pool should start.
	// Relative to the `.spec.startAfter` timestamp of the upgrade job.
	// +optional
	DelayMin metav1.Duration `json:"delayMin,omitempty"`
	// DelayMax defines the maximum delay after which the upgrade of the machine config pool should start.
	// Relative to the `.spec.startBefore` timestamp of the upgrade job.
	// If the upgrade of the machine config pool can't be started before this time, it is considered failed.
	// +optional
	DelayMax metav1.Duration `json:"delayMax,omitempty"`
}

UpgradeJobMachineConfigPoolDelayUpgradeSpec defines the delay for the upgrade of a machine config pool

func (*UpgradeJobMachineConfigPoolDelayUpgradeSpec) DeepCopy added in v0.6.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeJobMachineConfigPoolDelayUpgradeSpec.

func (*UpgradeJobMachineConfigPoolDelayUpgradeSpec) DeepCopyInto added in v0.6.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpgradeJobMachineConfigPoolSpec added in v0.6.0

type UpgradeJobMachineConfigPoolSpec struct {
	// MatchLabels defines the labels to match the machine config pool.
	// If empty, all machine config pools are matched.
	// If nil, no machine config pools are matched.
	// +optional
	MatchLabels *metav1.LabelSelector `json:"matchLabels,omitempty"`

	// DelayUpgrade defines whether to delay the upgrade of the machine config pool
	// +optional
	DelayUpgrade UpgradeJobMachineConfigPoolDelayUpgradeSpec `json:"delayUpgrade,omitempty"`
}

UpgradeJobMachineConfigPoolSpec allows configuring the upgrade of a machine config pool

func (*UpgradeJobMachineConfigPoolSpec) DeepCopy added in v0.6.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeJobMachineConfigPoolSpec.

func (*UpgradeJobMachineConfigPoolSpec) DeepCopyInto added in v0.6.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpgradeJobSpec

type UpgradeJobSpec struct {
	// StartAfter defines the time after which the upgrade job should start
	StartAfter metav1.Time `json:"startAfter"`
	// StartBefore defines the time before which the upgrade job should start.
	// If the upgrade job is not started before this time, it is considered failed.
	StartBefore metav1.Time `json:"startBefore"`

	// DesiredVersion defines the desired version to upgrade to.
	// Can be empty if the upgrade job was created when there was no new version available.
	// +optional
	DesiredVersion *configv1.Update `json:"desiredVersion,omitempty"`

	// UpgradeJobConfig defines the configuration for the upgrade job
	UpgradeJobConfig `json:"config"`
}

UpgradeJobSpec defines the desired state of UpgradeJob

func (*UpgradeJobSpec) DeepCopy

func (in *UpgradeJobSpec) DeepCopy() *UpgradeJobSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeJobSpec.

func (*UpgradeJobSpec) DeepCopyInto

func (in *UpgradeJobSpec) DeepCopyInto(out *UpgradeJobSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpgradeJobStatus

type UpgradeJobStatus struct {
	// Conditions is a list of conditions for the UpgradeJob
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// HookJobTracker keeps track of the hooks that have been executed
	HookJobTracker []HookJobTracker `json:"hookTracker,omitempty"`
}

UpgradeJobStatus defines the observed state of UpgradeJob

func (*UpgradeJobStatus) DeepCopy

func (in *UpgradeJobStatus) DeepCopy() *UpgradeJobStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeJobStatus.

func (*UpgradeJobStatus) DeepCopyInto

func (in *UpgradeJobStatus) DeepCopyInto(out *UpgradeJobStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpgradeSuspensionWindow added in v0.8.0

type UpgradeSuspensionWindow struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   UpgradeSuspensionWindowSpec   `json:"spec,omitempty"`
	Status UpgradeSuspensionWindowStatus `json:"status,omitempty"`
}

UpgradeSuspensionWindow is the Schema for the upgradejobs API

func (*UpgradeSuspensionWindow) DeepCopy added in v0.8.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeSuspensionWindow.

func (*UpgradeSuspensionWindow) DeepCopyInto added in v0.8.0

func (in *UpgradeSuspensionWindow) DeepCopyInto(out *UpgradeSuspensionWindow)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UpgradeSuspensionWindow) DeepCopyObject added in v0.8.0

func (in *UpgradeSuspensionWindow) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type UpgradeSuspensionWindowList added in v0.8.0

type UpgradeSuspensionWindowList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []UpgradeSuspensionWindow `json:"items"`
}

UpgradeSuspensionWindowList contains a list of UpgradeSuspensionWindow

func (*UpgradeSuspensionWindowList) DeepCopy added in v0.8.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeSuspensionWindowList.

func (*UpgradeSuspensionWindowList) DeepCopyInto added in v0.8.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UpgradeSuspensionWindowList) DeepCopyObject added in v0.8.0

func (in *UpgradeSuspensionWindowList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type UpgradeSuspensionWindowSpec added in v0.8.0

type UpgradeSuspensionWindowSpec struct {
	// Start is the time when the suspension window starts.
	// +kubebuilder:validation:Required
	// +required
	Start metav1.Time `json:"start"`
	// End is the time when the suspension window ends.
	// +kubebuilder:validation:Required
	// +required
	End    metav1.Time `json:"end"`
	Reason string      `json:"reason"`

	// ConfigSelector is the selector for UpgradeConfigs to suspend upgrades for.
	// An empty label selector matches all objects. A null label selector matches no objects.
	// Matching UpgradeConfig objects won’t create UpgradeJob objects during the time window.
	ConfigSelector *metav1.LabelSelector `json:"configSelector,omitempty"`
	// JobSelector is the selector for UpgradeJobs to suspend upgrades for.
	// An empty label selector matches all objects. A null label selector matches no objects.
	// Matching UpgradeJob objects won’t start the upgrade during the time window.
	// Skipped jobs will be marked as successful with reason skipped.
	// Success and Finish hooks will be executed as normal.
	// If the job was owned by a UpgradeConfig object, the object creates a new job with the current (possibly same) version in the next non-suspended time window.
	// Already running jobs will be allowed to finish.
	JobSelector *metav1.LabelSelector `json:"jobSelector,omitempty"`
}

UpgradeSuspensionWindowSpec defines the desired state of UpgradeSuspensionWindow

func (*UpgradeSuspensionWindowSpec) DeepCopy added in v0.8.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeSuspensionWindowSpec.

func (*UpgradeSuspensionWindowSpec) DeepCopyInto added in v0.8.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpgradeSuspensionWindowStatus added in v0.8.0

type UpgradeSuspensionWindowStatus struct {
}

UpgradeSuspensionWindowStatus defines the observed state of UpgradeSuspensionWindow

func (*UpgradeSuspensionWindowStatus) DeepCopy added in v0.8.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeSuspensionWindowStatus.

func (*UpgradeSuspensionWindowStatus) DeepCopyInto added in v0.8.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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