v1alpha1

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true +k8s:deepcopy-gen=package,register +groupName=placement.kubernetes-fleet.io

Index

Constants

View Source
const (

	// ClusterResourceOverrideKind is the kind of the ClusterResourceOverride.
	ClusterResourceOverrideKind = "ClusterResourceOverride"

	// ClusterResourceOverrideSnapshotKind is the kind of the ClusterResourceOverrideSnapshot.
	ClusterResourceOverrideSnapshotKind = "ClusterResourceOverrideSnapshot"

	// ResourceOverrideKind is the kind of the ResourceOverride.
	ResourceOverrideKind = "ResourceOverride"

	// ResourceOverrideSnapshotKind is the kind of the ResourceOverrideSnapshotKind.
	ResourceOverrideSnapshotKind = "ResourceOverrideSnapshot"
)
View Source
const (

	// OverrideIndexLabel is the label that indicate the policy snapshot index of a cluster policy.
	OverrideIndexLabel = fleetPrefix + "override-index"

	// OverrideSnapshotNameFmt is clusterResourceOverrideSnapshot name format: {CROName}-{OverrideSnapshotIndex}.
	OverrideSnapshotNameFmt = "%s-%d"

	// OverrideTrackingLabel is the label that points to the cluster resource override that creates a resource snapshot.
	OverrideTrackingLabel = fleetPrefix + "parent-resource-override"

	// OverrideFinalizer is a finalizer added by the override controllers to all override, to make sure
	// that the override controller can react to override deletions if necessary.
	OverrideFinalizer = fleetPrefix + "override-cleanup"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "placement.kubernetes-fleet.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

This section is empty.

Types

type AfterStageTask added in v0.10.12

type AfterStageTask struct {
	// The type of the after-stage task.
	// +kubebuilder:validation:Enum=TimedWait;Approval
	// +kubebuilder:validation:Required
	Type AfterStageTaskType `json:"type"`

	// The time to wait after all the clusters in the current stage complete the update before moving to the next stage.
	// +kubebuilder:default="1h"
	// +kubebuilder:validation:Pattern="^0|([0-9]+(\\.[0-9]+)?(s|m|h))+$"
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Optional
	WaitTime metav1.Duration `json:"waitTime,omitempty"`
}

AfterStageTask is the collection of post-stage tasks that ALL need to be completed before moving to the next stage.

func (*AfterStageTask) DeepCopy added in v0.10.12

func (in *AfterStageTask) DeepCopy() *AfterStageTask

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

func (*AfterStageTask) DeepCopyInto added in v0.10.12

func (in *AfterStageTask) DeepCopyInto(out *AfterStageTask)

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

type AfterStageTaskConditionType added in v0.10.12

type AfterStageTaskConditionType string

AfterStageTaskConditionType identifies a specific condition of the AfterStageTask. +enum

const (
	// AfterStageTaskConditionApprovalRequestCreated indicates if the approval request has been created.
	// Its condition status can be:
	// - "True": The approval request has been created.
	// - "False": The approval request has not been created.
	AfterStageTaskConditionApprovalRequestCreated AfterStageTaskConditionType = "ApprovalRequestCreated"

	// AfterStageTaskConditionApprovalRequestApproved indicates if the approval request has been approved.
	// Its condition status can be:
	// - "True": The approval request has been approved.
	// - "False": The approval request has not been approved.
	AfterStageTaskConditionApprovalRequestApproved AfterStageTaskConditionType = "ApprovalRequestApproved"

	// AfterStageTaskConditionApprovalWaitTimeElapsed indicates if the wait time after each stage has elapsed.
	// If the status is "False", the condition message will include the remaining wait time.
	// Its condition status can be:
	// - "True": The wait time has elapsed.
	// - "False": The wait time has not elapsed.
	AfterStageTaskConditionApprovalWaitTimeElapsed AfterStageTaskConditionType = "WaitTimeElapsed"
)

type AfterStageTaskStatus added in v0.10.12

type AfterStageTaskStatus struct {
	// The type of the post-update task.
	// +kubebuilder:validation:Enum=TimedWait;Approval
	// +kubebuilder:validation:Required
	Type AfterStageTaskType `json:"type"`

	// The name of the approval request object that is created for this stage.
	// Only valid if the AfterStageTaskType is Approval.
	// +kubebuilder:validation:Optional
	ApprovalRequestName string `json:"approvalRequestName,omitempty"`

	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	//
	// Conditions is an array of current observed conditions for the specific type of post-update task.
	// Known conditions are "ApprovalRequestCreated", "WaitTimeElapsed", and "ApprovalRequestApproved".
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

func (*AfterStageTaskStatus) DeepCopy added in v0.10.12

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

func (*AfterStageTaskStatus) DeepCopyInto added in v0.10.12

func (in *AfterStageTaskStatus) DeepCopyInto(out *AfterStageTaskStatus)

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

type AfterStageTaskType added in v0.10.12

type AfterStageTaskType string

AfterStageTaskType identifies a specific type of the AfterStageTask. +enum

const (
	// AfterStageTaskTypeTimedWait indicates the post-stage task is a timed wait.
	AfterStageTaskTypeTimedWait AfterStageTaskType = "TimedWait"

	// AfterStageTaskTypeApproval indicates the post-stage task is an approval.
	AfterStageTaskTypeApproval AfterStageTaskType = "Approval"
)

type ApprovalRequest added in v0.10.12

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

	// The desired state of ApprovalRequest.
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="The spec field is immutable"
	// +kubebuilder:validation:Required
	Spec ApprovalRequestSpec `json:"spec"`

	// The observed state of ApprovalRequest.
	// +kubebuilder:validation:Optional
	Status ApprovalRequestStatus `json:"status,omitempty"`
}

ApprovalRequest defines a request for user approval. The request object MUST have the following labels:

  • `TargetUpdateRun`: Points to the update run that this approval request is for.
  • `TargetStage`: The name of the stage that this approval request is for.
  • `IsLatestUpdateRunApproval`: Indicates whether this approval request is the latest one related to this update run.

func (*ApprovalRequest) DeepCopy added in v0.10.12

func (in *ApprovalRequest) DeepCopy() *ApprovalRequest

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

func (*ApprovalRequest) DeepCopyInto added in v0.10.12

func (in *ApprovalRequest) DeepCopyInto(out *ApprovalRequest)

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

func (*ApprovalRequest) DeepCopyObject added in v0.10.12

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

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

type ApprovalRequestConditionType added in v0.10.12

type ApprovalRequestConditionType string

ApprovalRequestConditionType identifies a specific condition of the ApprovalRequest.

const (
	// ApprovalRequestConditionApproved indicates if the approval request was approved.
	// Its condition status can be:
	// - "True": The request is approved.
	// - "False": The request is not approved.
	ApprovalRequestConditionApproved ApprovalRequestConditionType = "Approved"

	// ApprovalRequestConditionApprovalAccepted indicates whether the approval request is accepted by the update process.
	// Its condition status can be:
	// - "True": The approval request is accepted.
	// - "False": The approval request is not accepted.
	// - "Unknown": The approval request is not yet approved.
	ApprovalRequestConditionApprovalAccepted ApprovalRequestConditionType = "ApprovalAccepted"
)

type ApprovalRequestList added in v0.10.12

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

ApprovalRequestList contains a list of ApprovalRequest. +kubebuilder:resource:scope="Namespaced" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ApprovalRequestList) DeepCopy added in v0.10.12

func (in *ApprovalRequestList) DeepCopy() *ApprovalRequestList

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

func (*ApprovalRequestList) DeepCopyInto added in v0.10.12

func (in *ApprovalRequestList) DeepCopyInto(out *ApprovalRequestList)

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

func (*ApprovalRequestList) DeepCopyObject added in v0.10.12

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

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

type ApprovalRequestSpec added in v0.10.12

type ApprovalRequestSpec struct {
	// The name of the staged update run that this approval request is for.
	// +kubebuilder:validation:Required
	TargetUpdateRun string `json:"parentStageRollout"`

	// The name of the update stage that this approval request is for.
	// +kubebuilder:validation:Required
	TargetStage string `json:"targetStage"`
}

ApprovalRequestSpec defines the desired state of the update run approval request. The entire spec is immutable.

func (*ApprovalRequestSpec) DeepCopy added in v0.10.12

func (in *ApprovalRequestSpec) DeepCopy() *ApprovalRequestSpec

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

func (*ApprovalRequestSpec) DeepCopyInto added in v0.10.12

func (in *ApprovalRequestSpec) DeepCopyInto(out *ApprovalRequestSpec)

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

type ApprovalRequestStatus added in v0.10.12

type ApprovalRequestStatus struct {
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	//
	// Conditions is an array of current observed conditions for the specific type of post-update task.
	// Known conditions are "Approved" and "ApprovalAccepted".
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

ApprovalRequestStatus defines the observed state of the ApprovalRequest.

func (*ApprovalRequestStatus) DeepCopy added in v0.10.12

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

func (*ApprovalRequestStatus) DeepCopyInto added in v0.10.12

func (in *ApprovalRequestStatus) DeepCopyInto(out *ApprovalRequestStatus)

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

type ClusterResourceOverride

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

	// The desired state of ClusterResourceOverrideSpec.
	// +required
	Spec ClusterResourceOverrideSpec `json:"spec"`
}

ClusterResourceOverride defines a group of override policies about how to override the selected cluster scope resources to target clusters.

func (*ClusterResourceOverride) DeepCopy

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

func (*ClusterResourceOverride) DeepCopyInto

func (in *ClusterResourceOverride) DeepCopyInto(out *ClusterResourceOverride)

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

func (*ClusterResourceOverride) DeepCopyObject

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

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

type ClusterResourceOverrideList

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

ClusterResourceOverrideList contains a list of ClusterResourceOverride. +kubebuilder:resource:scope="Cluster" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ClusterResourceOverrideList) DeepCopy

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

func (*ClusterResourceOverrideList) DeepCopyInto

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

func (*ClusterResourceOverrideList) DeepCopyObject

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

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

type ClusterResourceOverrideSnapshot added in v0.8.9

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

	// The desired state of ClusterResourceOverrideSnapshotSpec.
	// +required
	Spec ClusterResourceOverrideSnapshotSpec `json:"spec"`
}

ClusterResourceOverrideSnapshot is used to store a snapshot of ClusterResourceOverride. Its spec is immutable. We assign an ever-increasing index for snapshots. The naming convention of a ClusterResourceOverrideSnapshot is {ClusterResourceOverride}-{resourceIndex}. resourceIndex will begin with 0. Each snapshot MUST have the following labels:

  • `OverrideTrackingLabel` which points to its owner ClusterResourceOverride.
  • `IsLatestSnapshotLabel` which indicates whether the snapshot is the latest one.

func (*ClusterResourceOverrideSnapshot) DeepCopy added in v0.8.9

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

func (*ClusterResourceOverrideSnapshot) DeepCopyInto added in v0.8.9

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

func (*ClusterResourceOverrideSnapshot) DeepCopyObject added in v0.8.9

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

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

type ClusterResourceOverrideSnapshotList added in v0.8.9

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

ClusterResourceOverrideSnapshotList contains a list of ClusterResourceOverrideSnapshot. +kubebuilder:resource:scope="Cluster" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ClusterResourceOverrideSnapshotList) DeepCopy added in v0.8.9

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

func (*ClusterResourceOverrideSnapshotList) DeepCopyInto added in v0.8.9

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

func (*ClusterResourceOverrideSnapshotList) DeepCopyObject added in v0.8.9

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

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

type ClusterResourceOverrideSnapshotSpec added in v0.8.9

type ClusterResourceOverrideSnapshotSpec struct {
	// OverrideSpec stores the spec of ClusterResourceOverride.
	OverrideSpec ClusterResourceOverrideSpec `json:"overrideSpec"`

	// OverrideHash is the sha-256 hash value of the OverrideSpec field.
	// +required
	OverrideHash []byte `json:"overrideHash"`
}

ClusterResourceOverrideSnapshotSpec defines the desired state of ClusterResourceOverride.

func (*ClusterResourceOverrideSnapshotSpec) DeepCopy added in v0.8.9

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

func (*ClusterResourceOverrideSnapshotSpec) DeepCopyInto added in v0.8.9

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

type ClusterResourceOverrideSpec

type ClusterResourceOverrideSpec struct {
	// ClusterResourceSelectors is an array of selectors used to select cluster scoped resources. The selectors are `ORed`.
	// If a namespace is selected, ALL the resources under the namespace are selected automatically.
	// LabelSelector is not supported.
	// You can have 1-20 selectors.
	// We only support Name selector for now.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=20
	// +required
	ClusterResourceSelectors []placementv1beta1.ClusterResourceSelector `json:"clusterResourceSelectors"`

	// Policy defines how to override the selected resources on the target clusters.
	// +required
	Policy *OverridePolicy `json:"policy"`
}

ClusterResourceOverrideSpec defines the desired state of the Override. The ClusterResourceOverride create or update will fail when the resource has been selected by the existing ClusterResourceOverride. If the resource is selected by both ClusterResourceOverride and ResourceOverride, ResourceOverride will win when resolving conflicts.

func (*ClusterResourceOverrideSpec) DeepCopy

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

func (*ClusterResourceOverrideSpec) DeepCopyInto

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

type ClusterUpdatingStatus added in v0.10.12

type ClusterUpdatingStatus struct {
	// The name of the cluster.
	// +kubebuilder:validation:Required
	ClusterName string `json:"clusterName"`

	// ResourceOverrideSnapshots is a list of ResourceOverride snapshots associated with the cluster.
	// The list is computed at the beginning of the update run and not updated during the update run.
	// The list is empty if there are no resource overrides associated with the cluster.
	// +kubebuilder:validation:Optional
	ResourceOverrideSnapshots []v1beta1.NamespacedName `json:"resourceOverrideSnapshots,omitempty"`

	// ClusterResourceOverrides contains a list of applicable ClusterResourceOverride snapshot names
	// associated with the cluster.
	// The list is computed at the beginning of the update run and not updated during the update run.
	// The list is empty if there are no cluster overrides associated with the cluster.
	// +kubebuilder:validation:Optional
	ClusterResourceOverrideSnapshots []string `json:"clusterResourceOverrideSnapshots,omitempty"`

	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	//
	// Conditions is an array of current observed conditions for clusters. Empty if the cluster has not started updating.
	// Known conditions are "Started", "Succeeded".
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

ClusterUpdatingStatus defines the status of the update run on a cluster.

func (*ClusterUpdatingStatus) DeepCopy added in v0.10.12

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

func (*ClusterUpdatingStatus) DeepCopyInto added in v0.10.12

func (in *ClusterUpdatingStatus) DeepCopyInto(out *ClusterUpdatingStatus)

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

type ClusterUpdatingStatusConditionType added in v0.10.12

type ClusterUpdatingStatusConditionType string

ClusterUpdatingStatusConditionType identifies a specific condition of the UpdatingStatus of the cluster. +enum

const (
	// UpdatingStatusConditionTypeStarted indicates whether the cluster updating has started.
	// Its condition status can be one of the following:
	// - "True": The cluster updating has started.
	// - "False": The stage updating has not started.
	UpdatingStatusConditionTypeStarted ClusterUpdatingStatusConditionType = "Started"

	// UpdatingStatusConditionTypeSucceeded indicates whether the cluster updating is completed successfully.
	// Its condition status can be one of the following:
	// - "True": The cluster updating is completed successfully.
	// - "False": The cluster updating encountered an error and stopped.
	UpdatingStatusConditionTypeSucceeded ClusterUpdatingStatusConditionType = "Succeeded"
)

type JSONPatchOverride

type JSONPatchOverride struct {
	// Operator defines the operation on the target field.
	// +kubebuilder:validation:Enum=add;remove;replace
	// +required
	Operator JSONPatchOverrideOperator `json:"op"`
	// Path defines the target location.
	// Note: override will fail if the resource path does not exist.
	// +required
	Path string `json:"path"`
	// Value defines the content to be applied on the target location.
	// Value should be empty when operator is `remove`.
	// +optional
	Value apiextensionsv1.JSON `json:"value,omitempty"`
}

JSONPatchOverride applies a JSON patch on the selected resources following [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902).

func (*JSONPatchOverride) DeepCopy

func (in *JSONPatchOverride) DeepCopy() *JSONPatchOverride

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

func (*JSONPatchOverride) DeepCopyInto

func (in *JSONPatchOverride) DeepCopyInto(out *JSONPatchOverride)

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

type JSONPatchOverrideOperator

type JSONPatchOverrideOperator string

JSONPatchOverrideOperator defines the supported JSON patch operator.

const (
	// JSONPatchOverrideOpAdd adds the value to the target location.
	// An example target JSON document:
	//
	//   { "foo": [ "bar", "baz" ] }
	//
	//   A JSON Patch override:
	//
	//   [
	//     { "op": "add", "path": "/foo/1", "value": "qux" }
	//   ]
	//
	//   The resulting JSON document:
	//
	//   { "foo": [ "bar", "qux", "baz" ] }
	JSONPatchOverrideOpAdd JSONPatchOverrideOperator = "add"
	// JSONPatchOverrideOpRemove removes the value from the target location.
	// An example target JSON document:
	//
	//   {
	//     "baz": "qux",
	//     "foo": "bar"
	//   }
	//   A JSON Patch override:
	//
	//   [
	//     { "op": "remove", "path": "/baz" }
	//   ]
	//
	//   The resulting JSON document:
	//
	//   { "foo": "bar" }
	JSONPatchOverrideOpRemove JSONPatchOverrideOperator = "remove"
	// JSONPatchOverrideOpReplace replaces the value at the target location with a new value.
	// An example target JSON document:
	//
	//   {
	//     "baz": "qux",
	//     "foo": "bar"
	//   }
	//
	//   A JSON Patch override:
	//
	//   [
	//     { "op": "replace", "path": "/baz", "value": "boo" }
	//   ]
	//
	//   The resulting JSON document:
	//
	//   {
	//     "baz": "boo",
	//     "foo": "bar"
	//   }
	JSONPatchOverrideOpReplace JSONPatchOverrideOperator = "replace"
)

type OverridePolicy

type OverridePolicy struct {
	// OverrideRules defines an array of override rules to be applied on the selected resources.
	// The order of the rules determines the override order.
	// When there are two rules selecting the same fields on the target cluster, the last one will win.
	// You can have 1-20 rules.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=20
	// +required
	OverrideRules []OverrideRule `json:"overrideRules"`
}

OverridePolicy defines how to override the selected resources on the target clusters. More is to be added.

func (*OverridePolicy) DeepCopy

func (in *OverridePolicy) DeepCopy() *OverridePolicy

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

func (*OverridePolicy) DeepCopyInto

func (in *OverridePolicy) DeepCopyInto(out *OverridePolicy)

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

type OverrideRule

type OverrideRule struct {
	// ClusterSelectors selects the target clusters.
	// The resources will be overridden before applying to the matching clusters.
	// An empty clusterSelector selects ALL the member clusters.
	// A nil clusterSelector selects NO member clusters.
	// For now, only labelSelector is supported.
	// +optional
	ClusterSelector *placementv1beta1.ClusterSelector `json:"clusterSelector,omitempty"`

	// JSONPatchOverrides defines a list of JSON patch override rules.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=20
	// +required
	JSONPatchOverrides []JSONPatchOverride `json:"jsonPatchOverrides"`
}

OverrideRule defines how to override the selected resources on the target clusters.

func (*OverrideRule) DeepCopy

func (in *OverrideRule) DeepCopy() *OverrideRule

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

func (*OverrideRule) DeepCopyInto

func (in *OverrideRule) DeepCopyInto(out *OverrideRule)

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

type PlacementReference added in v0.10.12

type PlacementReference struct {
	// Name is the name of the referenced placement.
	// +kubebuilder:validation:Required
	Name string `json:"name"`
}

PlacementReference is a reference to a placement object.

func (*PlacementReference) DeepCopy added in v0.10.12

func (in *PlacementReference) DeepCopy() *PlacementReference

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

func (*PlacementReference) DeepCopyInto added in v0.10.12

func (in *PlacementReference) DeepCopyInto(out *PlacementReference)

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

type ResourceOverride

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

	// The desired state of ResourceOverrideSpec.
	// +required
	Spec ResourceOverrideSpec `json:"spec"`
}

ResourceOverride defines a group of override policies about how to override the selected namespaced scope resources to target clusters.

func (*ResourceOverride) DeepCopy

func (in *ResourceOverride) DeepCopy() *ResourceOverride

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

func (*ResourceOverride) DeepCopyInto

func (in *ResourceOverride) DeepCopyInto(out *ResourceOverride)

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

func (*ResourceOverride) DeepCopyObject

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

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

type ResourceOverrideList

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

ResourceOverrideList contains a list of ResourceOverride. +kubebuilder:resource:scope="Namespaced" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ResourceOverrideList) DeepCopy

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

func (*ResourceOverrideList) DeepCopyInto

func (in *ResourceOverrideList) DeepCopyInto(out *ResourceOverrideList)

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

func (*ResourceOverrideList) DeepCopyObject

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

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

type ResourceOverrideSnapshot added in v0.8.9

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

	// The desired state of ResourceOverrideSnapshot.
	// +required
	Spec ResourceOverrideSnapshotSpec `json:"spec"`
}

ResourceOverrideSnapshot is used to store a snapshot of ResourceOverride. Its spec is immutable. We assign an ever-increasing index for snapshots. The naming convention of a ResourceOverrideSnapshot is {ResourceOverride}-{resourceIndex}. resourceIndex will begin with 0. Each snapshot MUST have the following labels:

  • `OverrideTrackingLabel` which points to its owner ResourceOverride.
  • `IsLatestSnapshotLabel` which indicates whether the snapshot is the latest one.

func (*ResourceOverrideSnapshot) DeepCopy added in v0.8.9

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

func (*ResourceOverrideSnapshot) DeepCopyInto added in v0.8.9

func (in *ResourceOverrideSnapshot) DeepCopyInto(out *ResourceOverrideSnapshot)

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

func (*ResourceOverrideSnapshot) DeepCopyObject added in v0.8.9

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

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

type ResourceOverrideSnapshotList added in v0.8.9

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

ResourceOverrideSnapshotList contains a list of ResourceOverrideSnapshot. +kubebuilder:resource:scope="Namespaced" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ResourceOverrideSnapshotList) DeepCopy added in v0.8.9

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

func (*ResourceOverrideSnapshotList) DeepCopyInto added in v0.8.9

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

func (*ResourceOverrideSnapshotList) DeepCopyObject added in v0.8.9

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

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

type ResourceOverrideSnapshotSpec added in v0.8.9

type ResourceOverrideSnapshotSpec struct {
	// OverrideSpec stores the spec of ResourceOverride.
	OverrideSpec ResourceOverrideSpec `json:"overrideSpec"`

	// OverrideHash is the sha-256 hash value of the OverrideSpec field.
	// +required
	OverrideHash []byte `json:"overrideHash"`
}

ResourceOverrideSnapshotSpec defines the desired state of ResourceOverride.

func (*ResourceOverrideSnapshotSpec) DeepCopy added in v0.8.9

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

func (*ResourceOverrideSnapshotSpec) DeepCopyInto added in v0.8.9

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

type ResourceOverrideSpec

type ResourceOverrideSpec struct {
	// ResourceSelectors is an array of selectors used to select namespace scoped resources. The selectors are `ORed`.
	// You can have 1-20 selectors.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=20
	// +required
	ResourceSelectors []ResourceSelector `json:"resourceSelectors"`

	// Policy defines how to override the selected resources on the target clusters.
	// +required
	Policy *OverridePolicy `json:"policy"`
}

ResourceOverrideSpec defines the desired state of the Override. The ResourceOverride create or update will fail when the resource has been selected by the existing ResourceOverride. If the resource is selected by both ClusterResourceOverride and ResourceOverride, ResourceOverride will win when resolving conflicts.

func (*ResourceOverrideSpec) DeepCopy

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

func (*ResourceOverrideSpec) DeepCopyInto

func (in *ResourceOverrideSpec) DeepCopyInto(out *ResourceOverrideSpec)

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

type ResourceSelector

type ResourceSelector struct {
	// Group name of the namespace-scoped resource.
	// Use an empty string to select resources under the core API group (e.g., services).
	// +required
	Group string `json:"group"`

	// Version of the namespace-scoped resource.
	// +required
	Version string `json:"version"`

	// Kind of the namespace-scoped resource.
	// +required
	Kind string `json:"kind"`

	// Name of the namespace-scoped resource.
	// +required
	Name string `json:"name"`
}

ResourceSelector is used to select namespace scoped resources as the target resources to be placed. All the fields are `ANDed`. In other words, a resource must match all the fields to be selected. The resource namespace will inherit from the parent object scope.

func (*ResourceSelector) DeepCopy

func (in *ResourceSelector) DeepCopy() *ResourceSelector

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

func (*ResourceSelector) DeepCopyInto

func (in *ResourceSelector) DeepCopyInto(out *ResourceSelector)

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

type StageConfig added in v0.10.12

type StageConfig struct {
	// The name of the stage. This MUST be unique within the same StagedUpdateStrategy.
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Pattern="[A-Za-z0-9]+$"
	// +kubebuilder:validation:Required
	Name string `json:"name"`

	// LabelSelector is a label query over all the joined member clusters. Clusters matching the query are selected
	// for this stage. There cannot be overlapping clusters between stages when the stagedUpdateRun is created.
	// If the label selector is absent, the stage includes all the selected clusters.
	// +kubebuilder:validation:Optional
	LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`

	// The label key used to sort the selected clusters.
	// The clusters within the stage are updated sequentially following the rule below:
	//   - primary: Ascending order based on the value of the label key, interpreted as integers if present.
	//   - secondary: Ascending order based on the name of the cluster if the label key is absent or the label value is the same.
	// +kubebuilder:validation:Optional
	SortingLabelKey *string `json:"sortingLabelKey,omitempty"`

	// The collection of tasks that each stage needs to complete successfully before moving to the next stage.
	// Each task is executed in parallel and there cannot be more than one task of the same type.
	// +kubebuilder:validation:MaxItems=2
	// +kubebuilder:validation:Optional
	AfterStageTasks []AfterStageTask `json:"afterStageTasks,omitempty"`
}

StageConfig describes a single update stage. The clusters in each stage are updated sequentially. The update stops if any of the updates fail.

func (*StageConfig) DeepCopy added in v0.10.12

func (in *StageConfig) DeepCopy() *StageConfig

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

func (*StageConfig) DeepCopyInto added in v0.10.12

func (in *StageConfig) DeepCopyInto(out *StageConfig)

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

type StageUpdatingConditionType added in v0.10.12

type StageUpdatingConditionType string

StageUpdatingConditionType identifies a specific condition of the stage that is being updated. +enum

const (
	// StageUpdatingConditionProgressing indicates whether the stage updating is making progress.
	// Its condition status can be one of the following:
	// - "True": The stage updating is making progress.
	// - "False": The stage updating is waiting/pausing.
	StageUpdatingConditionProgressing StageUpdatingConditionType = "Progressing"

	// ClusterUpdatingStatusConditionSucceeded indicates whether the stage updating is completed successfully.
	// Its condition status can be one of the following:
	// - "True": The stage updating is completed successfully.
	// - "False": The stage updating encountered an error and stopped.
	ClusterUpdatingStatusConditionSucceeded StageUpdatingConditionType = "Succeeded"
)

type StageUpdatingStatus added in v0.10.12

type StageUpdatingStatus struct {
	// The name of the stage.
	// +kubebuilder:validation:Required
	StageName string `json:"stageName"`

	// The list of each cluster's updating status in this stage.
	// +kubebuilder:validation:Required
	Clusters []ClusterUpdatingStatus `json:"clusters"`

	// The status of the post-update tasks associated with the current stage.
	// Empty if the stage has not finished updating all the clusters.
	// +kubebuilder:validation:MaxItems=2
	// +kubebuilder:validation:Optional
	AfterStageTaskStatus []AfterStageTaskStatus `json:"afterStageTaskStatus,omitempty"`

	// The time when the update started on the stage. Empty if the stage has not started updating.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=date-time
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// The time when the update finished on the stage. Empty if the stage has not started updating.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=date-time
	EndTime *metav1.Time `json:"endTime,omitempty"`

	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	//
	// Conditions is an array of current observed updating conditions for the stage. Empty if the stage has not started updating.
	// Known conditions are "Progressing", "Succeeded".
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

StageUpdatingStatus defines the status of the update run in a stage.

func (*StageUpdatingStatus) DeepCopy added in v0.10.12

func (in *StageUpdatingStatus) DeepCopy() *StageUpdatingStatus

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

func (*StageUpdatingStatus) DeepCopyInto added in v0.10.12

func (in *StageUpdatingStatus) DeepCopyInto(out *StageUpdatingStatus)

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

type StagedUpdateRun added in v0.10.12

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

	// The desired state of StagedUpdateRun. The spec is immutable.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="The spec field is immutable"
	Spec StagedUpdateRunSpec `json:"spec"`

	// The observed status of StagedUpdateRun.
	// +kubebuilder:validation:Optional
	Status StagedUpdateRunStatus `json:"status,omitempty"`
}

StagedUpdateRun represents a stage by stage update process that applies selected resources to specified clusters. Resources from unselected clusters are removed after all stages in the update strategy are completed. Each StagedUpdateRun object corresponds to a single release of a specific resource version. The release is abandoned if the StagedUpdateRun object is deleted or the scheduling decision changes. The name of the StagedUpdateRun must conform to RFC 1123.

func (*StagedUpdateRun) DeepCopy added in v0.10.12

func (in *StagedUpdateRun) DeepCopy() *StagedUpdateRun

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

func (*StagedUpdateRun) DeepCopyInto added in v0.10.12

func (in *StagedUpdateRun) DeepCopyInto(out *StagedUpdateRun)

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

func (*StagedUpdateRun) DeepCopyObject added in v0.10.12

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

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

type StagedUpdateRunConditionType added in v0.10.12

type StagedUpdateRunConditionType string

StagedUpdateRunConditionType identifies a specific condition of the StagedUpdateRun. +enum

const (
	// StagedUpdateRunConditionInitialized indicates whether the staged update run is initialized, meaning it
	// has computed all the stages according to the referenced strategy and is ready to start the update.
	// Its condition status can be one of the following:
	// - "True": The staged update run is initialized.
	// - "False": The staged update run encountered an error during initialization.
	StagedUpdateRunConditionInitialized StagedUpdateRunConditionType = "Initialized"

	// StagedUpdateRunConditionProgressing indicates whether the staged update run is making progress.
	// Its condition status can be one of the following:
	// - "True": The staged update run is making progress.
	// - "False": The staged update run is waiting/paused.
	// - "Unknown" means it is unknown.
	StagedUpdateRunConditionProgressing StagedUpdateRunConditionType = "Progressing"

	// StagedUpdateRunConditionSucceeded indicates whether the staged update run is completed successfully.
	// Its condition status can be one of the following:
	// - "True": The staged update run is completed successfully.
	// - "False": The staged update run encountered an error and stopped.
	StagedUpdateRunConditionSucceeded StagedUpdateRunConditionType = "Succeeded"
)

type StagedUpdateRunList added in v0.10.12

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

StagedUpdateRunList contains a list of StagedUpdateRun. +kubebuilder:resource:scope="Namespaced" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*StagedUpdateRunList) DeepCopy added in v0.10.12

func (in *StagedUpdateRunList) DeepCopy() *StagedUpdateRunList

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

func (*StagedUpdateRunList) DeepCopyInto added in v0.10.12

func (in *StagedUpdateRunList) DeepCopyInto(out *StagedUpdateRunList)

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

func (*StagedUpdateRunList) DeepCopyObject added in v0.10.12

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

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

type StagedUpdateRunSpec added in v0.10.12

type StagedUpdateRunSpec struct {
	// A reference to the placement that this update run is applied to.
	// There can be multiple active update runs for each placement, but
	// it's up to the DevOps team to ensure they don't conflict with each other.
	// +kubebuilder:validation:Required
	PlacementRef PlacementReference `json:"placementRef"`

	// The resource snapshot index of the selected resources to be updated across clusters.
	// The index represents a group of resource snapshots that includes all the resources a ResourcePlacement selected.
	// +kubebuilder:validation:Required
	ResourceSnapshotIndex string `json:"resourceSnapshotIndex"`

	// The reference to the update strategy that specifies the stages and the sequence
	// in which the selected resources will be updated on the member clusters. The stages
	// are computed according to the referenced strategy when the update run starts
	// and recorded in the status field.
	// +kubebuilder:validation:Required
	StagedUpdateStrategyRef v1beta1.NamespacedName `json:"stagedRolloutStrategyRef"`
}

StagedUpdateRunSpec defines the desired rollout strategy and the snapshot indices of the resources to be updated. It specifies a stage-by-stage update process across selected clusters for the given ResourcePlacement object.

func (*StagedUpdateRunSpec) DeepCopy added in v0.10.12

func (in *StagedUpdateRunSpec) DeepCopy() *StagedUpdateRunSpec

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

func (*StagedUpdateRunSpec) DeepCopyInto added in v0.10.12

func (in *StagedUpdateRunSpec) DeepCopyInto(out *StagedUpdateRunSpec)

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

type StagedUpdateRunStatus added in v0.10.12

type StagedUpdateRunStatus struct {
	// PolicySnapShotIndexUsed records the policy snapshot index of the ClusterResourcePlacement (CRP) that
	// the update run is based on. The index represents the latest policy snapshot at the start of the update run.
	// If a newer policy snapshot is detected after the run starts, the staged update run is abandoned.
	// The scheduler must identify all clusters that meet the current policy before the update run begins.
	// All clusters involved in the update run are selected from the list of clusters scheduled by the CRP according
	// to the current policy.
	// +kubebuilder:validation:Optional
	PolicySnapshotIndexUsed string `json:"policySnapshotIndexUsed,omitempty"`

	// ApplyStrategy is the apply strategy that the stagedUpdateRun is using.
	// It is the same as the apply strategy in the CRP when the staged update run starts.
	// The apply strategy is not updated during the update run even if it changes in the CRP.
	// +kubebuilder:validation:Optional
	ApplyStrategy v1beta1.ApplyStrategy `json:"appliedStrategy,omitempty"`

	// StagedUpdateStrategySnapshot is the snapshot of the StagedUpdateStrategy used for the update run.
	// The snapshot is immutable during the update run.
	// The strategy is applied to the list of clusters scheduled by the CRP according to the current policy.
	// The update run fails to initialize if the strategy fails to produce a valid list of stages where each selected
	// cluster is included in exactly one stage.
	// +kubebuilder:validation:Optional
	StagedUpdateStrategySnapshot StagedUpdateStrategySpec `json:"stagedUpdateStrategySnapshot,omitempty"`

	// StagesStatus lists the current updating status of each stage.
	// The list is empty if the update run is not started or failed to initialize.
	// +kubebuilder:validation:Optional
	StagesStatus []StageUpdatingStatus `json:"stagesStatus,omitempty"`

	// DeletionStageStatus lists the current status of the deletion stage. The deletion stage
	// removes all the resources from the clusters that are not selected by the
	// current policy after all the update stages are completed.
	// +kubebuilder:validation:Optional
	DeletionStageStatus StageUpdatingStatus `json:"deletionStageStatus,omitempty"`

	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	//
	// Conditions is an array of current observed conditions for StagedUpdateRun.
	// Known conditions are "Initialized", "Progressing", "Succeeded".
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

StagedUpdateRunStatus defines the observed state of the StagedUpdateRun.

func (*StagedUpdateRunStatus) DeepCopy added in v0.10.12

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

func (*StagedUpdateRunStatus) DeepCopyInto added in v0.10.12

func (in *StagedUpdateRunStatus) DeepCopyInto(out *StagedUpdateRunStatus)

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

type StagedUpdateStrategy added in v0.10.12

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

	// The desired state of StagedUpdateStrategy.
	// +kubebuilder:validation:Required
	Spec StagedUpdateStrategySpec `json:"spec"`
}

StagedUpdateStrategy defines a reusable strategy that specifies the stages and the sequence in which the selected resources will be updated on the member clusters.

func (*StagedUpdateStrategy) DeepCopy added in v0.10.12

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

func (*StagedUpdateStrategy) DeepCopyInto added in v0.10.12

func (in *StagedUpdateStrategy) DeepCopyInto(out *StagedUpdateStrategy)

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

func (*StagedUpdateStrategy) DeepCopyObject added in v0.10.12

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

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

type StagedUpdateStrategyList added in v0.10.12

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

StagedUpdateStrategyList contains a list of StagedUpdateStrategy. +kubebuilder:resource:scope="Namespaced" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*StagedUpdateStrategyList) DeepCopy added in v0.10.12

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

func (*StagedUpdateStrategyList) DeepCopyInto added in v0.10.12

func (in *StagedUpdateStrategyList) DeepCopyInto(out *StagedUpdateStrategyList)

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

func (*StagedUpdateStrategyList) DeepCopyObject added in v0.10.12

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

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

type StagedUpdateStrategySpec added in v0.10.12

type StagedUpdateStrategySpec struct {
	// Stage specifies the configuration for each update stage.
	// +kubebuilder:validation:MaxItems=31
	// +kubebuilder:validation:Required
	Stages []StageConfig `json:"stages"`
}

StagedUpdateStrategySpec defines the desired state of the StagedUpdateStrategy.

func (*StagedUpdateStrategySpec) DeepCopy added in v0.10.12

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

func (*StagedUpdateStrategySpec) DeepCopyInto added in v0.10.12

func (in *StagedUpdateStrategySpec) DeepCopyInto(out *StagedUpdateStrategySpec)

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