Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the upgrade v1alpha1 API group +kubebuilder:object:generate=true +groupName=upgrade.managed.openshift.io
Index ¶
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- type Conditions
- func (in Conditions) DeepCopy() Conditions
- func (in Conditions) DeepCopyInto(out *Conditions)
- func (conditions Conditions) GetCondition(t UpgradeConditionType) *UpgradeCondition
- func (conditions Conditions) IsFalseFor(t UpgradeConditionType) bool
- func (conditions Conditions) IsTrueFor(t UpgradeConditionType) bool
- func (conditions Conditions) IsUnknownFor(t UpgradeConditionType) bool
- func (conditions *Conditions) RemoveCondition(t UpgradeConditionType) bool
- func (conditions *Conditions) SetCondition(newCond UpgradeCondition) bool
- type FeatureGate
- type Update
- type UpgradeCondition
- type UpgradeConditionType
- type UpgradeConfig
- type UpgradeConfigList
- type UpgradeConfigSpec
- type UpgradeConfigStatus
- type UpgradeHistories
- type UpgradeHistory
- type UpgradePhase
- type UpgradeType
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "upgrade.managed.openshift.io", Version: "v1alpha1"} // 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 ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
Types ¶
type Conditions ¶
type Conditions []UpgradeCondition
Conditions is a set of Condition instances.
func NewConditions ¶
func NewConditions(conds ...UpgradeCondition) Conditions
NewConditions initializes a set of conditions with the given list of conditions.
func (Conditions) DeepCopy ¶
func (in Conditions) DeepCopy() Conditions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions.
func (Conditions) DeepCopyInto ¶
func (in Conditions) DeepCopyInto(out *Conditions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Conditions) GetCondition ¶
func (conditions Conditions) GetCondition(t UpgradeConditionType) *UpgradeCondition
GetCondition searches the set of conditions for the condition with the given ConditionType and returns it. If the matching condition is not found, GetCondition returns nil.
func (Conditions) IsFalseFor ¶
func (conditions Conditions) IsFalseFor(t UpgradeConditionType) bool
IsFalseFor searches the set of conditions for a condition with the given ConditionType. If found, it returns `condition.IsFalse()`. If not found, it returns false.
func (Conditions) IsTrueFor ¶
func (conditions Conditions) IsTrueFor(t UpgradeConditionType) bool
IsTrueFor searches the set of conditions for a condition with the given ConditionType. If found, it returns `condition.IsTrue()`. If not found, it returns false.
func (Conditions) IsUnknownFor ¶
func (conditions Conditions) IsUnknownFor(t UpgradeConditionType) bool
IsUnknownFor searches the set of conditions for a condition with the given ConditionType. If found, it returns `condition.IsUnknown()`. If not found, it returns true.
func (*Conditions) RemoveCondition ¶
func (conditions *Conditions) RemoveCondition(t UpgradeConditionType) bool
RemoveCondition removes the condition with the given ConditionType from the conditions set. If no condition with that type is found, RemoveCondition returns without performing any action. If the passed condition type is not found in the set of conditions, RemoveCondition returns false.
func (*Conditions) SetCondition ¶
func (conditions *Conditions) SetCondition(newCond UpgradeCondition) bool
SetCondition adds (or updates) the set of conditions with the given condition. It returns a boolean value indicating whether the set condition is new or was a change to the existing condition with the same type.
type FeatureGate ¶
type FeatureGate string
FeatureGate type defines the feature that managed-upgrade-operator should enable/disable when deployed. By default, if a feature is not listed then it's disabled.
const ( // PreHealthCheckFeatureGate enables running the PreHealthCheck in "New" upgrade phase if the upgrade is scheduled // beyond two hours from current time. PreHealthCheck during "Upgrading" phase is always run irregard of whether // the featuregate is enabled or not. PreHealthCheckFeatureGate FeatureGate = "PreHealthCheck" // ServiceLogNotificationFeatureGate enables sending the additional servicelog notifications from managed-upgrade-operator during an upgrade. // This feature can be optionally enabled/disabled based on the featureGate configuration in the configmap. ServiceLogNotificationFeatureGate FeatureGate = "ServiceLogNotification" )
type Update ¶
type Update struct { // Version of openshift release // +kubebuilder:validation:Type=string // +optional Version string `json:"version,omitempty"` // Channel used for upgrades // +optional Channel string `json:"channel,omitempty"` // Image reference used for upgrades // +optional Image string `json:"image,omitempty"` }
Update represents a release go gonna upgraded to
func (*Update) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Update.
func (*Update) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpgradeCondition ¶
type UpgradeCondition struct { // Type of upgrade condition Type UpgradeConditionType `json:"type"` // Status of condition, one of True, False, Unknown Status corev1.ConditionStatus `json:"status"` // Last time the condition was checked. // +kubebuilder:validation:Optional LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"` // Last time the condition transit from one status to another. // +kubebuilder:validation:Optional LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` // Start time of this condition. // +kubebuilder:validation:Optional StartTime *metav1.Time `json:"startTime,omitempty"` // Complete time of this condition. // +kubebuilder:validation:Optional CompleteTime *metav1.Time `json:"completeTime,omitempty"` // (brief) reason for the condition's last transition. // +kubebuilder:validation:Optional Reason string `json:"reason,omitempty"` // Human readable message indicating details about last transition. // +kubebuilder:validation:Optional Message string `json:"message,omitempty"` }
UpgradeCondition houses fields that describe the state of an Upgrade including metadata.
func (*UpgradeCondition) DeepCopy ¶
func (in *UpgradeCondition) DeepCopy() *UpgradeCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeCondition.
func (*UpgradeCondition) DeepCopyInto ¶
func (c *UpgradeCondition) DeepCopyInto(cpy *UpgradeCondition)
DeepCopyInto copies in into out.
func (UpgradeCondition) IsFalse ¶
func (c UpgradeCondition) IsFalse() bool
IsFalse returns whether the condition status is "False".
func (UpgradeCondition) IsTrue ¶
func (c UpgradeCondition) IsTrue() bool
IsTrue Condition whether the condition status is "True".
func (UpgradeCondition) IsUnknown ¶
func (c UpgradeCondition) IsUnknown() bool
IsUnknown returns whether the condition status is "Unknown".
type UpgradeConditionType ¶
type UpgradeConditionType string
UpgradeConditionType is a Go string type.
const ( // SendStartedNotification is an UpgradeConditionType SendStartedNotification UpgradeConditionType = "StartedNotificationSent" // UpgradePreHealthCheck is an UpgradeConditionType UpgradePreHealthCheck UpgradeConditionType = "ClusterHealthyBeforeUpgrade" // ExtDepAvailabilityCheck is an UpgradeConditionType ExtDepAvailabilityCheck UpgradeConditionType = "ExternalDependenciesAvailable" // UpgradeScaleUpExtraNodes is an UpgradeConditionType UpgradeScaleUpExtraNodes UpgradeConditionType = "ComputeCapacityReserved" // ControlPlaneMaintWindow is an UpgradeConditionType ControlPlaneMaintWindow UpgradeConditionType = "ControlPlaneMaintenanceWindowCreated" // CommenceUpgrade is an UpgradeConditionType CommenceUpgrade UpgradeConditionType = "UpgradeCommenced" // ControlPlaneUpgraded is an UpgradeConditionType ControlPlaneUpgraded UpgradeConditionType = "ControlPlaneUpgraded" // RemoveControlPlaneMaintWindow is an UpgradeConditionType RemoveControlPlaneMaintWindow UpgradeConditionType = "ControlPlaneMaintenanceWindowRemoved" // WorkersMaintWindow is an UpgradeConditionType WorkersMaintWindow UpgradeConditionType = "WorkersMaintenanceWindowCreated" // AllWorkerNodesUpgraded is an UpgradeConditionType AllWorkerNodesUpgraded UpgradeConditionType = "WorkerNodesUpgraded" // RemoveExtraScaledNodes is an UpgradeConditionType RemoveExtraScaledNodes UpgradeConditionType = "ComputeCapacityRemoved" // RemoveMaintWindow is an UpgradeConditionType RemoveMaintWindow UpgradeConditionType = "WorkersMaintenanceWindowRemoved" // PostClusterHealthCheck is an UpgradeConditionType PostClusterHealthCheck UpgradeConditionType = "ClusterHealthyAfterUpgrade" // PostUpgradeProcedures is an UpgradeConditionType PostUpgradeProcedures UpgradeConditionType = "PostUpgradeTasksCompleted" // SendCompletedNotification is an UpgradeConditionType SendCompletedNotification UpgradeConditionType = "CompletedNotificationSent" // IsClusterUpgradable is an UpgradeConditionType IsClusterUpgradable UpgradeConditionType = "IsClusterUpgradable" )
type UpgradeConfig ¶
type UpgradeConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec UpgradeConfigSpec `json:"spec,omitempty"` Status UpgradeConfigStatus `json:"status,omitempty"` }
UpgradeConfig is the Schema for the upgradeconfigs API +kubebuilder:subresource:status +kubebuilder:resource:path=upgradeconfigs,scope=Namespaced,shortName=upgrade +kubebuilder:printcolumn:name="desired_version",type="string",JSONPath=".spec.desired.version" +kubebuilder:printcolumn:name="phase",type="string",JSONPath=".status.history[0].phase" +kubebuilder:printcolumn:name="stage",type="string",JSONPath=".status.history[0].conditions[0].type" +kubebuilder:printcolumn:name="status",type="string",JSONPath=".status.history[0].conditions[0].status" +kubebuilder:printcolumn:name="reason",type="string",JSONPath=".status.history[0].conditions[0].reason" +kubebuilder:printcolumn:name="message",type="string",JSONPath=".status.history[0].conditions[0].message"
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.
func (*UpgradeConfig) GetHealthCheckDuration ¶
func (uc *UpgradeConfig) GetHealthCheckDuration() time.Duration
GetHealthCheckDuration returns the duration to perform HealthCheck in hours
func (*UpgradeConfig) GetPDBDrainTimeoutDuration ¶
func (uc *UpgradeConfig) GetPDBDrainTimeoutDuration() time.Duration
GetPDBDrainTimeoutDuration returns the PDB timeout
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 UpgradeConfigSpec ¶
type UpgradeConfigSpec struct { // Specify the desired OpenShift release Desired Update `json:"desired"` // Specify the upgrade start time UpgradeAt string `json:"upgradeAt"` // +kubebuilder:validation:Minimum:=0 // The maximum grace period granted to a node whose drain is blocked by a Pod Disruption Budget, before that drain is forced. Measured in minutes. The minimum accepted value is 0 and in this case it will trigger force drain after the expectedNodeDrainTime lapsed. PDBForceDrainTimeout int32 `json:"PDBForceDrainTimeout"` // +kubebuilder:validation:Enum={"OSD","ARO"} // Type indicates the ClusterUpgrader implementation to use to perform an upgrade of the cluster Type UpgradeType `json:"type"` // Specify if scaling up an extra node for capacity reservation before upgrade starts is needed CapacityReservation bool `json:"capacityReservation,omitempty"` }
UpgradeConfigSpec defines the desired state of UpgradeConfig and upgrade window and freeze window
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 { // This record history of every upgrade // +kubebuilder:validation:Optional History UpgradeHistories `json:"history,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 UpgradeHistories ¶
type UpgradeHistories []UpgradeHistory
UpgradeHistories is a slice of UpgradeHistory
func (UpgradeHistories) DeepCopy ¶
func (in UpgradeHistories) DeepCopy() UpgradeHistories
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeHistories.
func (UpgradeHistories) DeepCopyInto ¶
func (in UpgradeHistories) DeepCopyInto(out *UpgradeHistories)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (UpgradeHistories) GetHistory ¶
func (histories UpgradeHistories) GetHistory(version string) *UpgradeHistory
GetHistory returns UpgradeHistory
func (*UpgradeHistories) SetHistory ¶
func (histories *UpgradeHistories) SetHistory(history UpgradeHistory)
SetHistory appends new history to current
type UpgradeHistory ¶
type UpgradeHistory struct { //Desired version of this upgrade Version string `json:"version,omitempty"` //Version preceding this upgrade PrecedingVersion string `json:"precedingVersion,omitempty"` // +kubebuilder:validation:Enum={"New","Pending","Upgrading","Upgraded", "Failed"} // This describe the status of the upgrade process Phase UpgradePhase `json:"phase"` // Conditions is a set of Condition instances. Conditions Conditions `json:"conditions,omitempty"` // +kubebuilder:validation:Optional StartTime *metav1.Time `json:"startTime,omitempty"` // +kubebuilder:validation:Optional CompleteTime *metav1.Time `json:"completeTime,omitempty"` WorkerStartTime *metav1.Time `json:"workerStartTime,omitempty"` WorkerCompleteTime *metav1.Time `json:"workerCompleteTime,omitempty"` }
UpgradeHistory record history of upgrade
func (*UpgradeHistory) DeepCopy ¶
func (in *UpgradeHistory) DeepCopy() *UpgradeHistory
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeHistory.
func (*UpgradeHistory) DeepCopyInto ¶
func (in *UpgradeHistory) DeepCopyInto(out *UpgradeHistory)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpgradePhase ¶
type UpgradePhase string
UpgradePhase is a Go string type.
const ( // UpgradePhaseNew defines that an upgrade is new. UpgradePhaseNew UpgradePhase = "New" // UpgradePhasePending defines that an upgrade has been scheduled. UpgradePhasePending UpgradePhase = "Pending" // UpgradePhaseUpgrading defines the state of an ongoing upgrade. UpgradePhaseUpgrading UpgradePhase = "Upgrading" // UpgradePhaseUpgraded defines a completed upgrade. UpgradePhaseUpgraded UpgradePhase = "Upgraded" // UpgradePhaseFailed defines a failed upgrade. UpgradePhaseFailed UpgradePhase = "Failed" // UpgradePhaseUnknown defines an unknown upgrade state. UpgradePhaseUnknown UpgradePhase = "Unknown" )
type UpgradeType ¶
type UpgradeType string
UpgradeType provides a type to declare upgrade types with
const ( // OSD is a type of upgrade OSD UpgradeType = "OSD" // ARO is a type of upgrade ARO UpgradeType = "ARO" )