v1beta1

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: BSD-3-Clause Imports: 9 Imported by: 3

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"

	// 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"
	// 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"
	// 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"
)
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.
	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 ClusterVersionSpec

type ClusterVersionSpec struct {

	// Template is the template applied to the ClusterVersion object
	Template ClusterVersionTemplate `json:"template,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{}

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 ClusterVersionTemplate

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

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 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
	// +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"`
}

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.
	// `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 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.

Jump to

Keyboard shortcuts

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