v1alpha1

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 5 Imported by: 16

Documentation

Overview

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

Index

Constants

View Source
const (
	// ReasonPlacementDecisionNotFound is a reason for ManifestWorkReplicaSetConditionPlacementVerified condition type
	// representing placement decision is not found for the ManifestWorkSet
	ReasonPlacementDecisionNotFound = "PlacementDecisionNotFound"
	// ReasonPlacementDecisionEmpty is a reason for ManifestWorkReplicaSetConditionPlacementVerified condition type
	// representing the placement decision is empty for the ManifestWorkSet
	ReasonPlacementDecisionEmpty = "PlacementDecisionEmpty"
	// ReasonAsExpected is a reason for ManifestWorkReplicaSetConditionManifestworkApplied condition type representing
	// the ManifestWorkSet is applied correctly.
	ReasonAsExpected = "AsExpected"
	// ReasonProcessing is a reason for ManifestWorkReplicaSetConditionManifestworkApplied condition type representing
	// the ManifestWorkSet is under processing
	ReasonProcessing = "Processing"
	// ReasonNotAsExpected is a reason for ManifestWorkReplicaSetConditionManifestworkApplied condition type representing
	// the ManifestWorkSet is not applied correctly.
	ReasonNotAsExpected = "NotAsExpected"
	// ReasonProgressing is a reason for ManifestWorkReplicaSetConditionPlacementRolledOut condition type representing.
	// The ManifestWorks are progressively applied to the placement clusters.
	ReasonProgressing = "Progressing"
	// ReasonComplete is a reason for ManifestWorkReplicaSetConditionPlacementRolledOut condition type representing.
	// The ManifestWorks are completely applied to the placement clusters.
	ReasonComplete = "Complete"

	// ManifestWorkSetConditionPlacementVerified indicates if Placement is valid
	//
	// Reason: AsExpected, PlacementDecisionNotFound, PlacementDecisionEmpty or NotAsExpected
	ManifestWorkReplicaSetConditionPlacementVerified string = "PlacementVerified"

	// ManifestWorkReplicaSetConditionPlacementRolledOut indicates if RollOut Strategy is complete.
	//
	// Reason: Progressing or Complete.
	ManifestWorkReplicaSetConditionPlacementRolledOut string = "PlacementRolledOut"

	// ManifestWorkSetConditionManifestworkApplied confirms that a ManifestWork has been created in each cluster defined by PlacementDecision
	//
	// Reason: AsExpected, NotAsExpected or Processing
	ManifestWorkReplicaSetConditionManifestworkApplied string = "ManifestworkApplied"
)

Variables

View Source
var (
	GroupName    = "work.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
)

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 LocalPlacementReference

type LocalPlacementReference struct {
	// Name of the Placement resource in the current namespace
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`

	// +optional
	// +kubebuilder:default={type: All, all: {progressDeadline: None}}
	RolloutStrategy cluster.RolloutStrategy `json:"rolloutStrategy"`
}

localPlacementReference is the name of a Placement resource in current namespace

func (*LocalPlacementReference) DeepCopy

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

func (*LocalPlacementReference) DeepCopyInto

func (in *LocalPlacementReference) DeepCopyInto(out *LocalPlacementReference)

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

func (LocalPlacementReference) SwaggerDoc

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

type ManifestWorkReplicaSet added in v0.11.0

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

	// Spec reperesents the desired ManifestWork payload and Placement reference to be reconciled
	Spec ManifestWorkReplicaSetSpec `json:"spec,omitempty"`

	// Status represent the current status of Placing ManifestWork resources
	Status ManifestWorkReplicaSetStatus `json:"status,omitempty"`
}

ManifestWorkReplicaSet is the Schema for the ManifestWorkReplicaSet API. This custom resource is able to apply ManifestWork using Placement for 0..n ManagedCluster(in their namespaces). It will also remove the ManifestWork custom resources when deleted. Lastly the specific ManifestWork custom resources created per ManagedCluster namespace will be adjusted based on PlacementDecision changes.

func (*ManifestWorkReplicaSet) DeepCopy added in v0.11.0

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

func (*ManifestWorkReplicaSet) DeepCopyInto added in v0.11.0

func (in *ManifestWorkReplicaSet) DeepCopyInto(out *ManifestWorkReplicaSet)

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

func (*ManifestWorkReplicaSet) DeepCopyObject added in v0.11.0

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

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

func (ManifestWorkReplicaSet) SwaggerDoc added in v0.11.0

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

type ManifestWorkReplicaSetList added in v0.11.0

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

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true

ManifestWorkReplicaSetList contains a list of ManifestWorkReplicaSet

func (*ManifestWorkReplicaSetList) DeepCopy added in v0.11.0

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

func (*ManifestWorkReplicaSetList) DeepCopyInto added in v0.11.0

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

func (*ManifestWorkReplicaSetList) DeepCopyObject added in v0.11.0

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

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

func (ManifestWorkReplicaSetList) SwaggerDoc added in v0.11.0

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

type ManifestWorkReplicaSetSpec added in v0.11.0

type ManifestWorkReplicaSetSpec struct {
	// ManifestWorkTemplate is the ManifestWorkSpec that will be used to generate a per-cluster ManifestWork
	ManifestWorkTemplate work.ManifestWorkSpec `json:"manifestWorkTemplate"`

	// PacementRefs is a list of the names of the Placement resource, from which a PlacementDecision will be found and used
	// to distribute the ManifestWork.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinItems=1
	// +required
	PlacementRefs []LocalPlacementReference `json:"placementRefs"`
}

ManifestWorkReplicaSetSpec defines the desired state of ManifestWorkReplicaSet

func (*ManifestWorkReplicaSetSpec) DeepCopy added in v0.11.0

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

func (*ManifestWorkReplicaSetSpec) DeepCopyInto added in v0.11.0

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

func (ManifestWorkReplicaSetSpec) SwaggerDoc added in v0.11.0

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

type ManifestWorkReplicaSetStatus added in v0.11.0

type ManifestWorkReplicaSetStatus struct {

	// Conditions contains the different condition statuses for distrbution of ManifestWork resources
	// Valid condition types are:
	// 1. AppliedManifestWorks represents ManifestWorks have been distributed as per placement All, Partial, None, Problem
	// 2. PlacementRefValid
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// Summary totals of resulting ManifestWorks for all placements
	Summary ManifestWorkReplicaSetSummary `json:"summary"`

	// PlacementRef Summary
	PlacementsSummary []PlacementSummary `json:"placementSummary"`
}

ManifestWorkReplicaSetStatus defines the observed state of ManifestWorkReplicaSet

func (*ManifestWorkReplicaSetStatus) DeepCopy added in v0.11.0

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

func (*ManifestWorkReplicaSetStatus) DeepCopyInto added in v0.11.0

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

func (ManifestWorkReplicaSetStatus) SwaggerDoc added in v0.11.0

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

type ManifestWorkReplicaSetSummary added in v0.11.0

type ManifestWorkReplicaSetSummary struct {
	// Total number of ManifestWorks managed by the ManifestWorkReplicaSet
	Total int `json:"total"`
	// TODO: Progressing is the number of ManifestWorks with condition Progressing: true
	Progressing int `json:"progressing"`
	// Available is the number of ManifestWorks with condition Available: true
	Available int `json:"available"`
	// TODO: Degraded is the number of ManifestWorks with condition Degraded: true
	Degraded int `json:"degraded"`
	// Applied is the number of ManifestWorks with condition Applied: true
	Applied int `json:"Applied"`
}

ManifestWorkReplicaSetSummary provides reference counts of all ManifestWorks that are associated with a given ManifestWorkReplicaSet resource, for their respective states

func (*ManifestWorkReplicaSetSummary) DeepCopy added in v0.11.0

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

func (*ManifestWorkReplicaSetSummary) DeepCopyInto added in v0.11.0

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

func (ManifestWorkReplicaSetSummary) SwaggerDoc added in v0.11.0

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

type PlacementSummary added in v0.12.0

type PlacementSummary struct {
	// PlacementRef Name
	Name string `json:"name"`

	// availableDecisionGroups shows number of decisionGroups that have all clusters manifestWorks in available state regards total number of decisionGroups.
	// ex; 2/4 (2 out of 4)
	AvailableDecisionGroups string `json:"availableDecisionGroups"`

	// Summary totals of resulting ManifestWorks for the placement
	Summary ManifestWorkReplicaSetSummary `json:"summary"`
}

PlacementSummary provides info regards number of clusters and clusterGroups selected by the placement refs.

func (*PlacementSummary) DeepCopy added in v0.12.0

func (in *PlacementSummary) DeepCopy() *PlacementSummary

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

func (*PlacementSummary) DeepCopyInto added in v0.12.0

func (in *PlacementSummary) DeepCopyInto(out *PlacementSummary)

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

func (PlacementSummary) SwaggerDoc added in v0.12.0

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

Jump to

Keyboard shortcuts

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