v1alpha1

package
v0.0.0-...-75a2d0c Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Prep             = "Prep"
	Upgrade          = "Upgrade"
	Rollback         = "Rollback"
	Abort            = "Abort"
	AbortOnFailure   = "AbortOnFailure"
	FinalizeRollback = "FinalizeRollback"
	FinalizeUpgrade  = "FinalizeUpgrade"
)

Variables

View Source
var (
	// SchemeBuilder initializes a scheme builder
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: imagebasedgroupupgrades.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ActionMessage

type ActionMessage struct {
	Action  string `json:"action"`
	Message string `json:"message,omitempty"`
}

ActionMessage defines the action and its message

func (*ActionMessage) DeepCopy

func (in *ActionMessage) DeepCopy() *ActionMessage

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

func (*ActionMessage) DeepCopyInto

func (in *ActionMessage) DeepCopyInto(out *ActionMessage)

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

type ClusterState

type ClusterState struct {
	Name             string          `json:"name"`
	CompletedActions []ActionMessage `json:"completedActions,omitempty"`
	FailedActions    []ActionMessage `json:"failedActions,omitempty"`
	CurrentAction    *ActionMessage  `json:"currentAction,omitempty"`
}

ClusterState defines the current state of a cluster

func (*ClusterState) DeepCopy

func (in *ClusterState) DeepCopy() *ClusterState

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

func (*ClusterState) DeepCopyInto

func (in *ClusterState) DeepCopyInto(out *ClusterState)

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

type ImageBasedGroupUpgrade

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

	Spec   ImageBasedGroupUpgradeSpec   `json:"spec,omitempty"`
	Status ImageBasedGroupUpgradeStatus `json:"status,omitempty"`
}

ImageBasedGroupUpgrade is the schema for upgrading a group of clusters using IBU +operator-sdk:csv:customresourcedefinitions:displayName="Image-Based Group Upgrade",resources={{Namespace, v1},{Deployment,apps/v1}}

func (*ImageBasedGroupUpgrade) DeepCopy

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

func (*ImageBasedGroupUpgrade) DeepCopyInto

func (in *ImageBasedGroupUpgrade) DeepCopyInto(out *ImageBasedGroupUpgrade)

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

func (*ImageBasedGroupUpgrade) DeepCopyObject

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

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

type ImageBasedGroupUpgradeList

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

ImageBasedGroupUpgradeList contains a list of ImageBasedGroupUpgrade

func (*ImageBasedGroupUpgradeList) DeepCopy

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

func (*ImageBasedGroupUpgradeList) DeepCopyInto

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

func (*ImageBasedGroupUpgradeList) DeepCopyObject

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

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

type ImageBasedGroupUpgradeSpec

type ImageBasedGroupUpgradeSpec struct {
	//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="IBU Spec",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:text"}
	//+kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ibuSpec is immutable"
	IBUSpec lcav1.ImageBasedUpgradeSpec `json:"ibuSpec"`
	//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Cluster Label Selectors",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:text"}
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="clusterLabelSelectors is immutable"
	ClusterLabelSelectors []metav1.LabelSelector `json:"clusterLabelSelectors,omitempty"`
	//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Plan",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:text"}
	// +kubebuilder:validation:MaxItems=6
	// +kubebuilder:validation:XValidation:rule="oldSelf.all(element, element in self)",message="plan is append only"
	// +kubebuilder:validation:XValidation:rule="[[['Prep']], [['Prep'], ['Upgrade']], [['Prep', 'Upgrade']], [['Prep'], ['Upgrade'], ['FinalizeUpgrade']], [['Prep'], ['Upgrade', 'FinalizeUpgrade']], [['Prep', 'Upgrade'], ['FinalizeUpgrade']], [['Prep', 'Upgrade', 'FinalizeUpgrade']], [['Rollback']], [['Rollback'], ['FinalizeRollback']], [['Rollback', 'FinalizeRollback']], [['Upgrade']], [['Upgrade'], ['FinalizeUpgrade']], [['Upgrade', 'FinalizeUpgrade']], [['FinalizeUpgrade']],[['FinalizeRollback']], [['Abort']],[['AbortOnFailure']], [['Prep'], ['Abort']], [['Prep'], ['AbortOnFailure']],[['Prep'], ['AbortOnFailure'], ['Upgrade']],[['Prep'], ['AbortOnFailure'], ['Upgrade'], ['AbortOnFailure']],[['Prep'], ['Upgrade'], ['AbortOnFailure']],[['Prep', 'Upgrade'], ['AbortOnFailure']],[['Prep'], ['AbortOnFailure'], ['Upgrade'], ['AbortOnFailure'], ['FinalizeUpgrade']],[['Prep'], ['Upgrade'], ['AbortOnFailure'], ['FinalizeUpgrade']],[['Prep', 'Upgrade'], ['AbortOnFailure'], ['FinalizeUpgrade']]].exists(x, x==self.map(y, y.actions))",message="invalid combinations of actions in the plan"
	Plan []PlanItem `json:"plan"`
}

ImageBasedGroupUpgradeSpec defines the desired state of ImageBasedGroupUpgrade

func (*ImageBasedGroupUpgradeSpec) DeepCopy

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

func (*ImageBasedGroupUpgradeSpec) DeepCopyInto

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

type ImageBasedGroupUpgradeStatus

type ImageBasedGroupUpgradeStatus struct {
	// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="Status"
	ObservedGeneration int64       `json:"observedGeneration,omitempty"`
	StartedAt          metav1.Time `json:"startedAt,omitempty"`
	CompletedAt        metav1.Time `json:"completedAt,omitempty"`
	// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="Conditions"
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	Clusters   []ClusterState     `json:"clusters,omitempty"`
}

ImageBasedGroupUpgradeStatus is the status field for ImageBasedGroupUpgrade

func (*ImageBasedGroupUpgradeStatus) DeepCopy

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

func (*ImageBasedGroupUpgradeStatus) DeepCopyInto

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

type PlanItem

type PlanItem struct {
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MaxItems=4
	Actions []string `json:"actions"`
	// +kubebuilder:validation:Required
	RolloutStrategy RolloutStrategy `json:"rolloutStrategy"`
}

func (*PlanItem) DeepCopy

func (in *PlanItem) DeepCopy() *PlanItem

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

func (*PlanItem) DeepCopyInto

func (in *PlanItem) DeepCopyInto(out *PlanItem)

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

type RolloutStrategy

type RolloutStrategy struct {
	//kubebuilder:validation:Minimum=1
	MaxConcurrency int `json:"maxConcurrency"`
	//+kubebuilder:default=240
	Timeout int `json:"timeout,omitempty"`
}

RolloutStrategy defines how to rollout ibu

func (*RolloutStrategy) DeepCopy

func (in *RolloutStrategy) DeepCopy() *RolloutStrategy

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

func (*RolloutStrategy) DeepCopyInto

func (in *RolloutStrategy) DeepCopyInto(out *RolloutStrategy)

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