v1beta1

package
v0.0.0-...-86260ac Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1beta1 contains API Schema definitions for the cluster v1beta1 API group +kubebuilder:object:generate=true +groupName=cluster.open-cluster-management-extension.io

Index

Constants

View Source
const (
	NotStartedState  = "NotStarted"
	InitializedState = "Initialized"
	PartialState     = string(configv1.PartialUpdate)
	CompleteState    = string(configv1.CompletedUpdate)
	FailedState      = "Failed"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "cluster.open-cluster-management-extension.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 ClusterStatus

type ClusterStatus struct {
	// ManagedCluster generated ID
	ClusterID string `json:"clusterID"`
	// ManagedCluster Name
	Name string `json:"name"`
	// ManagedCluster upgrade status
	ClusterUpgradeStatus ClusterUpgradeStatus `json:"clusterUpgradeStatus,omitempty"`
	// ManagedCluster Operators Upgrade status
	OperatorsStatus OperatorsStatus `json:"operatorsStatus,omitempty"`
}

ClusterStatus indicate the selected clusters upgrade status

func (*ClusterStatus) DeepCopy

func (in *ClusterStatus) DeepCopy() *ClusterStatus

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

func (*ClusterStatus) DeepCopyInto

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

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

type ClusterUpgradeStatus

type ClusterUpgradeStatus struct {
	// state reflects whether the update was fully applied. The NotStart state
	// indicates the update is not start yet. The Initialized state indicates the update
	// has been initialized for the spoke. The Partial state indicates the update is not fully applied.
	// while the Completed state indicates the update was successfully rolled out at least once (all parts of the update successfully applied).
	State string `json:"state,omitempty"`

	// verified indicates whether the provided update was properly verified
	// before it was installed. If this is false the cluster may not be trusted.
	//+kubebuilder:default=false
	Verified bool `json:"verified,omitempty"`

	// message reflect the upgrade state output
	Message string `json:"message,omitempty"`
}

ClusterUpgradeStatus is a single attempted update to the cluster. The original definition is from https://github.com/openshift/api/blob/master/config/v1/types_cluster_version.go

func (*ClusterUpgradeStatus) DeepCopy

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

func (*ClusterUpgradeStatus) DeepCopyInto

func (in *ClusterUpgradeStatus) DeepCopyInto(out *ClusterUpgradeStatus)

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

type ClusterVersionSpec

type ClusterVersionSpec struct {
	// version for cluster upgrade
	Version string `json:"version"`
	// channel name for cluster upgrade
	Channel string `json:"channel"`
	// +optional
	// upstream url for cluster upgrade
	Upstream string `json:"upstream,omitempty"`
	// +optional
	// Image url for cluster upgrade
	Image string `json:"image,omitempty"`
}

ClusterVersion define 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 GenericOperatorReference

type GenericOperatorReference struct {
	// Operator->Subscription Name
	Name string `json:"name"`
	// Operator->Subscription Namespace
	Namespace string `json:"namespace"`
}

Generic Operator Reference

func (*GenericOperatorReference) DeepCopy

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

func (*GenericOperatorReference) DeepCopyInto

func (in *GenericOperatorReference) DeepCopyInto(out *GenericOperatorReference)

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

type ManagedClustersUpgrade

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

	Spec   ManagedClustersUpgradeSpec   `json:"spec,omitempty"`
	Status ManagedClustersUpgradeStatus `json:"status,omitempty"`
}

ManagedClustersUpgrade is the Schema for the managedclustersupgrades API

func (*ManagedClustersUpgrade) DeepCopy

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

func (*ManagedClustersUpgrade) DeepCopyInto

func (in *ManagedClustersUpgrade) DeepCopyInto(out *ManagedClustersUpgrade)

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

func (*ManagedClustersUpgrade) DeepCopyObject

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

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

type ManagedClustersUpgradeList

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

ManagedClustersUpgradeList contains a list of ManagedClustersUpgrade

func (*ManagedClustersUpgradeList) DeepCopy

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

func (*ManagedClustersUpgradeList) DeepCopyInto

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

func (*ManagedClustersUpgradeList) DeepCopyObject

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

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

type ManagedClustersUpgradeSpec

type ManagedClustersUpgradeSpec struct {

	// +optional
	common.GenericPlacementFields `json:",inline"`

	UpgradeStrategy *UpgradeStrategySpec `json:"upgradeStrategy,omitempty"`
	// +optional
	ClusterVersion *ClusterVersionSpec `json:"clusterVersion,omitempty"`
	// +optional
	OcpOperators *OcpOperatorsSpec `json:"ocpOperators,omitempty"`
}

ManagedClustersUpgrade defines the desired state of ManagedClustersUpgrade

func (*ManagedClustersUpgradeSpec) DeepCopy

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

func (*ManagedClustersUpgradeSpec) DeepCopyInto

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

type ManagedClustersUpgradeStatus

type ManagedClustersUpgradeStatus struct {

	// Conditions contains the different condition statuses for ManagedClustersUpgrade
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// List of the selected managedClusters with its upgrade status
	Clusters []*ClusterStatus `json:"clusters,omitempty"`

	// List of the selected Canary managedClusters with its upgrade status
	CanaryClusters []*ClusterStatus `json:"canaryClusters,omitempty"`
}

ManagedClustersUpgradeStatus defines the observed state of ManagedClustersUpgrade

func (*ManagedClustersUpgradeStatus) DeepCopy

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

func (*ManagedClustersUpgradeStatus) DeepCopyInto

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

type OcpOperatorsSpec

type OcpOperatorsSpec struct {
	// ApproveAllUpgrade is a boolean flag to approve all the installed operators installPlan for the selected
	// managed clusters after cluster upgrade is done. When set to false only selected operator in the include list
	// will be approved
	//+kubebuilder:default=false
	ApproveAllUpgrades bool `json:"approveAllUpgrades"`
	// List of the selected operators to approve its installPlan after cluster upgrade done.
	Include []GenericOperatorReference `json:"include,omitempty"`
	// List of the selected operators to not approve its installPlan after cluster upgrade done.
	Exclude []GenericOperatorReference `json:"exclude,omitempty"`
}

OcpOperators define the desire action for ocp operator upgrade

func (*OcpOperatorsSpec) DeepCopy

func (in *OcpOperatorsSpec) DeepCopy() *OcpOperatorsSpec

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

func (*OcpOperatorsSpec) DeepCopyInto

func (in *OcpOperatorsSpec) DeepCopyInto(out *OcpOperatorsSpec)

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

type OperatorsStatus

type OperatorsStatus struct {
	// UpgradeApproveState reflects whether the operator install plan approve fully applied. The NotStart state
	// indicates the install plan approve not start yet. The Initialized state indicates the install plan approve
	// has been initialized. The Partial state indicates the install plan approve is not fully applied
	// while the Completed state indicates install plan approve is running
	UpgradeApproveState string `json:"upgradeApproveState,omitempty"`
}

OperatorStatus indicate that operators installPlan approved

func (*OperatorsStatus) DeepCopy

func (in *OperatorsStatus) DeepCopy() *OperatorsStatus

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

func (*OperatorsStatus) DeepCopyInto

func (in *OperatorsStatus) DeepCopyInto(out *OperatorsStatus)

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

type UpgradeStrategySpec

type UpgradeStrategySpec struct {
	// CanaryClusters defines the list of managedClusters that should be remediated first
	CanaryClusters common.GenericPlacementFields `json:"canaryClusters,omitempty"`
	//kubebuilder:validation:Minimum=1
	//+kubebuilder:default=10
	// Max number of clusters to perform upgrade at the same time
	MaxConcurrency int `json:"maxConcurrency"`
	//+kubebuilder:default="3h"
	// TimeOut for cluster upgrade process in hours default is (3h) or in min ex; 180m
	ClusterUpgradeTimeout string `json:"clusterUpgradeTimeout,omitempty"`
	//+kubebuilder:default="20m"
	// TimeOut for operators upgrade process in min default is (20m) or in hours ex; 1h
	OperatorsUpgradeTimeout string `json:"operatorsUpgradeTimeout,omitempty"`
}

UpgradeStrategy defines the upgrades Strategy

func (*UpgradeStrategySpec) DeepCopy

func (in *UpgradeStrategySpec) DeepCopy() *UpgradeStrategySpec

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

func (*UpgradeStrategySpec) DeepCopyInto

func (in *UpgradeStrategySpec) DeepCopyInto(out *UpgradeStrategySpec)

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