v1alpha1

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 45

Documentation

Overview

+kubebuilder:validation:Optional +groupName=cluster.open-cluster-management.io

Index

Constants

This section is empty.

Variables

View Source
var (
	GroupName    = "cluster.open-cluster-management.io"
	GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

	// Install is a function which adds this version to a scheme
	Install = schemeBuilder.AddToScheme

	// SchemeGroupVersion generated code relies on this name
	// Deprecated
	SchemeGroupVersion = GroupVersion
	// AddToScheme exists solely to keep the old generators creating valid code
	// DEPRECATED
	AddToScheme = schemeBuilder.AddToScheme
)
View Source
var ReservedClusterClaimNames = [...]string{

	"id.k8s.io",

	"kubeversion.open-cluster-management.io",

	"platform.open-cluster-management.io",

	"product.open-cluster-management.io",
}

ReservedClusterClaimNames includes a list of reserved names for ClusterNames. When exposing ClusterClaims created on managed cluster, the registration agent gives high priority to the reserved ClusterClaims.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource generated code relies on this being here, but it logically belongs to the group DEPRECATED

Types

type AddOnPlacementScore added in v0.6.0

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

	// Status represents the status of the AddOnPlacementScore.
	// +optional
	Status AddOnPlacementScoreStatus `json:"status,omitempty"`
}

AddOnPlacementScore represents a bundle of scores of one managed cluster, which could be used by placement. AddOnPlacementScore is a namespace scoped resource. The namespace of the resource is the cluster namespace.

func (*AddOnPlacementScore) DeepCopy added in v0.6.0

func (in *AddOnPlacementScore) DeepCopy() *AddOnPlacementScore

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

func (*AddOnPlacementScore) DeepCopyInto added in v0.6.0

func (in *AddOnPlacementScore) DeepCopyInto(out *AddOnPlacementScore)

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

func (*AddOnPlacementScore) DeepCopyObject added in v0.6.0

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

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

func (AddOnPlacementScore) SwaggerDoc added in v0.6.0

func (AddOnPlacementScore) SwaggerDoc() map[string]string

type AddOnPlacementScoreItem added in v0.6.0

type AddOnPlacementScoreItem struct {
	// Name is the name of the score
	// +kubebuilder:validation:Required
	// +required
	Name string `json:"name"`

	// Value is the value of the score. The score range is from -100 to 100.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Minimum:=-100
	// +kubebuilder:validation:Maximum:=100
	// +required
	Value int32 `json:"value"`
}

AddOnPlacementScoreItem represents the score name and value.

func (*AddOnPlacementScoreItem) DeepCopy added in v0.6.0

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

func (*AddOnPlacementScoreItem) DeepCopyInto added in v0.6.0

func (in *AddOnPlacementScoreItem) DeepCopyInto(out *AddOnPlacementScoreItem)

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

func (AddOnPlacementScoreItem) SwaggerDoc added in v0.6.0

func (AddOnPlacementScoreItem) SwaggerDoc() map[string]string

type AddOnPlacementScoreList added in v0.6.0

type AddOnPlacementScoreList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is a list of AddOnPlacementScore
	Items []AddOnPlacementScore `json:"items"`
}

AddOnPlacementScoreList is a collection of AddOnPlacementScore.

func (*AddOnPlacementScoreList) DeepCopy added in v0.6.0

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

func (*AddOnPlacementScoreList) DeepCopyInto added in v0.6.0

func (in *AddOnPlacementScoreList) DeepCopyInto(out *AddOnPlacementScoreList)

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

func (*AddOnPlacementScoreList) DeepCopyObject added in v0.6.0

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

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

func (AddOnPlacementScoreList) SwaggerDoc added in v0.6.0

func (AddOnPlacementScoreList) SwaggerDoc() map[string]string

type AddOnPlacementScoreStatus added in v0.6.0

type AddOnPlacementScoreStatus struct {
	// Conditions contain the different condition statuses for this AddOnPlacementScore.
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// Scores contain a list of score name and value of this managed cluster.
	// +listType=map
	// +listMapKey=name
	// +optional
	Scores []AddOnPlacementScoreItem `json:"scores,omitempty"`

	// ValidUntil defines the valid time of the scores.
	// After this time, the scores are considered to be invalid by placement. nil means never expire.
	// The controller owning this resource should keep the scores up-to-date.
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=date-time
	// +optional
	ValidUntil *metav1.Time `json:"validUntil"`
}

AddOnPlacementScoreStatus represents the current status of AddOnPlacementScore.

func (*AddOnPlacementScoreStatus) DeepCopy added in v0.6.0

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

func (*AddOnPlacementScoreStatus) DeepCopyInto added in v0.6.0

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

func (AddOnPlacementScoreStatus) SwaggerDoc added in v0.6.0

func (AddOnPlacementScoreStatus) SwaggerDoc() map[string]string

type ClusterClaim

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

	// Spec defines the attributes of the ClusterClaim.
	Spec ClusterClaimSpec `json:"spec,omitempty"`
}

ClusterClaim represents cluster information that a managed cluster claims ClusterClaims with well known names include,

  1. id.k8s.io, it contains a unique identifier for the cluster.
  2. clusterset.k8s.io, it contains an identifier that relates the cluster to the ClusterSet in which it belongs.

ClusterClaims created on a managed cluster will be collected and saved into the status of the corresponding ManagedCluster on hub.

func (*ClusterClaim) DeepCopy

func (in *ClusterClaim) DeepCopy() *ClusterClaim

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

func (*ClusterClaim) DeepCopyInto

func (in *ClusterClaim) DeepCopyInto(out *ClusterClaim)

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

func (*ClusterClaim) DeepCopyObject

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

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

func (ClusterClaim) SwaggerDoc

func (ClusterClaim) SwaggerDoc() map[string]string

type ClusterClaimList

type ClusterClaimList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is a list of ClusterClaim.
	Items []ClusterClaim `json:"items"`
}

ClusterClaimList is a collection of ClusterClaim.

func (*ClusterClaimList) DeepCopy

func (in *ClusterClaimList) DeepCopy() *ClusterClaimList

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

func (*ClusterClaimList) DeepCopyInto

func (in *ClusterClaimList) DeepCopyInto(out *ClusterClaimList)

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

func (*ClusterClaimList) DeepCopyObject

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

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

func (ClusterClaimList) SwaggerDoc

func (ClusterClaimList) SwaggerDoc() map[string]string

type ClusterClaimSpec

type ClusterClaimSpec struct {
	// Value is a claim-dependent string
	// +kubebuilder:validation:MaxLength=1024
	// +kubebuilder:validation:MinLength=1
	Value string `json:"value,omitempty"`
}

func (*ClusterClaimSpec) DeepCopy

func (in *ClusterClaimSpec) DeepCopy() *ClusterClaimSpec

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

func (*ClusterClaimSpec) DeepCopyInto

func (in *ClusterClaimSpec) DeepCopyInto(out *ClusterClaimSpec)

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

func (ClusterClaimSpec) SwaggerDoc

func (ClusterClaimSpec) SwaggerDoc() map[string]string

type MandatoryDecisionGroup added in v0.12.0

type MandatoryDecisionGroup struct {
	// GroupName of the decision group should match the placementDecisions label value with label key
	// cluster.open-cluster-management.io/decision-group-name
	// +optional
	GroupName string `json:"groupName,omitempty"`

	// GroupIndex of the decision group should match the placementDecisions label value with label key
	// cluster.open-cluster-management.io/decision-group-index
	// +optional
	GroupIndex int32 `json:"groupIndex,omitempty"`
}

MandatoryDecisionGroup set the decision group name or group index. GroupName is considered first to select the decisionGroups then GroupIndex.

func (*MandatoryDecisionGroup) DeepCopy added in v0.12.0

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

func (*MandatoryDecisionGroup) DeepCopyInto added in v0.12.0

func (in *MandatoryDecisionGroup) DeepCopyInto(out *MandatoryDecisionGroup)

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

func (MandatoryDecisionGroup) SwaggerDoc added in v0.12.0

func (MandatoryDecisionGroup) SwaggerDoc() map[string]string

type MandatoryDecisionGroups added in v0.12.0

type MandatoryDecisionGroups struct {
	// List of the decision groups names or indexes to apply the workload first and fail if workload
	// did not reach successful state.
	// GroupName or GroupIndex must match with the decisionGroups defined in the placement's
	// decisionStrategy
	// +optional
	MandatoryDecisionGroups []MandatoryDecisionGroup `json:"mandatoryDecisionGroups,omitempty"`
}

MandatoryDecisionGroups

func (*MandatoryDecisionGroups) DeepCopy added in v0.12.0

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

func (*MandatoryDecisionGroups) DeepCopyInto added in v0.12.0

func (in *MandatoryDecisionGroups) DeepCopyInto(out *MandatoryDecisionGroups)

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

func (MandatoryDecisionGroups) SwaggerDoc added in v0.12.0

func (MandatoryDecisionGroups) SwaggerDoc() map[string]string

type RolloutAll added in v0.12.0

type RolloutAll struct {
	// +optional
	RolloutConfig `json:",inline"`
}

RolloutAll is a RolloutStrategy Type

func (*RolloutAll) DeepCopy added in v0.12.0

func (in *RolloutAll) DeepCopy() *RolloutAll

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

func (*RolloutAll) DeepCopyInto added in v0.12.0

func (in *RolloutAll) DeepCopyInto(out *RolloutAll)

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

func (RolloutAll) SwaggerDoc added in v0.12.0

func (RolloutAll) SwaggerDoc() map[string]string

type RolloutConfig added in v0.13.0

type RolloutConfig struct {
	// MinSuccessTime is a "soak" time. In other words, the minimum amount of time the workload
	// applier controller will wait from the start of each rollout before proceeding (assuming a
	// successful state has been reached and MaxFailures wasn't breached).
	// MinSuccessTime is only considered for rollout types Progressive and ProgressivePerGroup.
	// The default value is 0 meaning the workload applier proceeds immediately after a successful
	// state is reached.
	// MinSuccessTime must be defined in [0-9h]|[0-9m]|[0-9s] format examples; 2h , 90m , 360s
	// +kubebuilder:default:="0"
	// +optional
	MinSuccessTime metav1.Duration `json:"minSuccessTime,omitempty"`
	// ProgressDeadline defines how long workload applier controller will wait for the workload to
	// reach a successful state in the cluster.
	// If the workload does not reach a successful state after ProgressDeadline, will stop waiting
	// and workload will be treated as "timeout" and be counted into MaxFailures. Once the MaxFailures
	// is breached, the rollout will stop.
	// ProgressDeadline default value is "None", meaning the workload applier will wait for a
	// successful state indefinitely.
	// ProgressDeadline must be defined in [0-9h]|[0-9m]|[0-9s] format examples; 2h , 90m , 360s
	// +kubebuilder:validation:Pattern="^(([0-9])+[h|m|s])|None$"
	// +kubebuilder:default:="None"
	// +optional
	ProgressDeadline string `json:"progressDeadline,omitempty"`
	// MaxFailures is a percentage or number of clusters in the current rollout that can fail before
	// proceeding to the next rollout. Fail means the cluster has a failed status or timeout status
	// (does not reach successful status after ProgressDeadline).
	// Once the MaxFailures is breached, the rollout will stop.
	// MaxFailures is only considered for rollout types Progressive and ProgressivePerGroup. For
	// Progressive, this is considered over the total number of clusters. For ProgressivePerGroup,
	// this is considered according to the size of the current group. For both Progressive and
	// ProgressivePerGroup, the MaxFailures does not apply for MandatoryDecisionGroups, which tolerate
	// no failures.
	// Default is that no failures are tolerated.
	// +kubebuilder:validation:Pattern="^((100|[0-9]{1,2})%|[0-9]+)$"
	// +kubebuilder:validation:XIntOrString
	// +kubebuilder:default=0
	// +optional
	MaxFailures intstr.IntOrString `json:"maxFailures,omitempty"`
}

Timeout to consider while applying the workload.

func (*RolloutConfig) DeepCopy added in v0.13.0

func (in *RolloutConfig) DeepCopy() *RolloutConfig

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

func (*RolloutConfig) DeepCopyInto added in v0.13.0

func (in *RolloutConfig) DeepCopyInto(out *RolloutConfig)

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

func (RolloutConfig) SwaggerDoc added in v0.13.0

func (RolloutConfig) SwaggerDoc() map[string]string

type RolloutProgressive added in v0.12.0

type RolloutProgressive struct {
	// +optional
	RolloutConfig `json:",inline"`

	// +optional
	MandatoryDecisionGroups `json:",inline"`

	// MaxConcurrency is the max number of clusters to deploy workload concurrently. The default value
	// for MaxConcurrency is determined from the clustersPerDecisionGroup defined in the
	// placement->DecisionStrategy.
	// +kubebuilder:validation:Pattern="^((100|[0-9]{1,2})%|[0-9]+)$"
	// +kubebuilder:validation:XIntOrString
	// +optional
	MaxConcurrency intstr.IntOrString `json:"maxConcurrency,omitempty"`
}

RolloutProgressive is a RolloutStrategy Type

func (*RolloutProgressive) DeepCopy added in v0.12.0

func (in *RolloutProgressive) DeepCopy() *RolloutProgressive

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

func (*RolloutProgressive) DeepCopyInto added in v0.12.0

func (in *RolloutProgressive) DeepCopyInto(out *RolloutProgressive)

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

func (RolloutProgressive) SwaggerDoc added in v0.12.0

func (RolloutProgressive) SwaggerDoc() map[string]string

type RolloutProgressivePerGroup added in v0.12.0

type RolloutProgressivePerGroup struct {
	// +optional
	RolloutConfig `json:",inline"`

	// +optional
	MandatoryDecisionGroups `json:",inline"`
}

RolloutProgressivePerGroup is a RolloutStrategy Type

func (*RolloutProgressivePerGroup) DeepCopy added in v0.12.0

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

func (*RolloutProgressivePerGroup) DeepCopyInto added in v0.12.0

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

func (RolloutProgressivePerGroup) SwaggerDoc added in v0.12.0

func (RolloutProgressivePerGroup) SwaggerDoc() map[string]string

type RolloutStrategy added in v0.12.0

type RolloutStrategy struct {

	// +kubebuilder:validation:Enum=All;Progressive;ProgressivePerGroup
	// +kubebuilder:default:=All
	// +optional
	Type RolloutType `json:"type,omitempty"`

	// All defines required fields for RolloutStrategy type All
	// +optional
	All *RolloutAll `json:"all,omitempty"`

	// Progressive defines required fields for RolloutStrategy type Progressive
	// +optional
	Progressive *RolloutProgressive `json:"progressive,omitempty"`

	// ProgressivePerGroup defines required fields for RolloutStrategy type ProgressivePerGroup
	// +optional
	ProgressivePerGroup *RolloutProgressivePerGroup `json:"progressivePerGroup,omitempty"`
}

Rollout strategy to apply workload to the selected clusters by Placement and DecisionStrategy.

func (*RolloutStrategy) DeepCopy added in v0.12.0

func (in *RolloutStrategy) DeepCopy() *RolloutStrategy

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

func (*RolloutStrategy) DeepCopyInto added in v0.12.0

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

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

func (RolloutStrategy) SwaggerDoc added in v0.12.0

func (RolloutStrategy) SwaggerDoc() map[string]string

type RolloutType added in v0.13.0

type RolloutType string
const (
	//All means apply the workload to all clusters in the decision groups at once.
	All RolloutType = "All"
	//Progressive means apply the workload to the selected clusters progressively per cluster.
	Progressive RolloutType = "Progressive"
	//ProgressivePerGroup means apply the workload to the selected clusters progressively per group.
	ProgressivePerGroup RolloutType = "ProgressivePerGroup"
)

Jump to

Keyboard shortcuts

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