Documentation
¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API. +k8s:deepcopy-gen=package,register +groupName=work.karmada.io
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type AggregatedStatusItem
- type ClusterResourceBinding
- type ClusterResourceBindingList
- type Manifest
- type ManifestStatus
- type ObjectReference
- type ResourceBinding
- type ResourceBindingList
- type ResourceBindingSpec
- type ResourceBindingStatus
- type ResourceIdentifier
- type TargetCluster
- type Work
- type WorkList
- type WorkSpec
- type WorkStatus
- type WorkloadTemplate
Constants ¶
const ( // WorkApplied represents that the resource defined in Work is // successfully applied on the managed cluster. WorkApplied string = "Applied" // WorkProgressing represents that the resource defined in Work is // in the progress to be applied on the managed cluster. WorkProgressing string = "Progressing" // WorkAvailable represents that all resources of the Work exists on // the managed cluster. WorkAvailable string = "Available" // WorkDegraded represents that the current state of Work does not match // the desired state for a certain period. WorkDegraded string = "Degraded" )
const GroupName = "work.karmada.io"
GroupName specifies the group name used to register the objects.
Variables ¶
var ( // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder // Depreciated: use Install instead AddToScheme = localSchemeBuilder.AddToScheme Install = localSchemeBuilder.AddToScheme )
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type AggregatedStatusItem ¶
type AggregatedStatusItem struct {
// ClusterName represents the member cluster name which the resource deployed on.
ClusterName string `json:"clusterName"`
// Status reflects running status of current manifest.
// +kubebuilder:pruning:PreserveUnknownFields
Status runtime.RawExtension `json:",inline"`
}
AggregatedStatusItem represents status of the resource running in a member cluster.
func (*AggregatedStatusItem) DeepCopy ¶
func (in *AggregatedStatusItem) DeepCopy() *AggregatedStatusItem
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AggregatedStatusItem.
func (*AggregatedStatusItem) DeepCopyInto ¶
func (in *AggregatedStatusItem) DeepCopyInto(out *AggregatedStatusItem)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterResourceBinding ¶
type ClusterResourceBinding struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec represents the desired behavior.
Spec ResourceBindingSpec `json:"spec"`
// Status represents the most recently observed status of the ResourceBinding.
// +optional
Status ResourceBindingStatus `json:"status,omitempty"`
}
ClusterResourceBinding represents a binding of a kubernetes resource with a ClusterPropagationPolicy.
func (*ClusterResourceBinding) DeepCopy ¶
func (in *ClusterResourceBinding) DeepCopy() *ClusterResourceBinding
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceBinding.
func (*ClusterResourceBinding) DeepCopyInto ¶
func (in *ClusterResourceBinding) DeepCopyInto(out *ClusterResourceBinding)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterResourceBinding) DeepCopyObject ¶
func (in *ClusterResourceBinding) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterResourceBindingList ¶
type ClusterResourceBindingList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
// Items is the list of ClusterResourceBinding.
Items []ClusterResourceBinding `json:"items"`
}
ClusterResourceBindingList contains a list of ClusterResourceBinding.
func (*ClusterResourceBindingList) DeepCopy ¶
func (in *ClusterResourceBindingList) DeepCopy() *ClusterResourceBindingList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceBindingList.
func (*ClusterResourceBindingList) DeepCopyInto ¶
func (in *ClusterResourceBindingList) DeepCopyInto(out *ClusterResourceBindingList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterResourceBindingList) DeepCopyObject ¶
func (in *ClusterResourceBindingList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type Manifest ¶
type Manifest struct {
// +kubebuilder:pruning:PreserveUnknownFields
runtime.RawExtension `json:",inline"`
}
Manifest represents a resource to be deployed on managed cluster.
func (*Manifest) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manifest.
func (*Manifest) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManifestStatus ¶
type ManifestStatus struct {
// Identifier represents the identity of a resource linking to manifests in spec.
Identifier ResourceIdentifier `json:"identifier"`
// Status reflects running status of current manifest.
// +kubebuilder:pruning:PreserveUnknownFields
Status runtime.RawExtension `json:",inline"`
}
ManifestStatus contains running status of a specific manifest in spec.
func (*ManifestStatus) DeepCopy ¶
func (in *ManifestStatus) DeepCopy() *ManifestStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestStatus.
func (*ManifestStatus) DeepCopyInto ¶
func (in *ManifestStatus) DeepCopyInto(out *ManifestStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectReference ¶
type ObjectReference struct {
// APIVersion represents the API version of the referent.
APIVersion string `json:"apiVersion"`
// Kind represents the Kind of the referent.
Kind string `json:"kind"`
// Namespace represents the namespace for the referent.
// For non-namespace scoped resources(e.g. 'ClusterRole'),do not need specify Namespace,
// and for namespace scoped resources, Namespace is required.
// If Namespace is not specified, means the resource is non-namespace scoped.
// +optional
Namespace string `json:"namespace,omitempty"`
// Name represents the name of the referent.
Name string `json:"name"`
// ResourceVersion represents the internal version of the referenced object, that can be used by clients to
// determine when object has changed.
// +optional
ResourceVersion string `json:"resourceVersion,omitempty"`
}
ObjectReference contains enough information to locate the referenced object inside current cluster.
func (*ObjectReference) DeepCopy ¶
func (in *ObjectReference) DeepCopy() *ObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference.
func (*ObjectReference) DeepCopyInto ¶
func (in *ObjectReference) DeepCopyInto(out *ObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceBinding ¶
type ResourceBinding struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec represents the desired behavior.
Spec ResourceBindingSpec `json:"spec"`
// Status represents the most recently observed status of the ResourceBinding.
// +optional
Status ResourceBindingStatus `json:"status,omitempty"`
}
ResourceBinding represents a binding of a kubernetes resource with a propagation policy.
func (*ResourceBinding) DeepCopy ¶
func (in *ResourceBinding) DeepCopy() *ResourceBinding
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceBinding.
func (*ResourceBinding) DeepCopyInto ¶
func (in *ResourceBinding) DeepCopyInto(out *ResourceBinding)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceBinding) DeepCopyObject ¶
func (in *ResourceBinding) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceBindingList ¶
type ResourceBindingList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
// Items is the list of ResourceBinding.
Items []ResourceBinding `json:"items"`
}
ResourceBindingList contains a list of ResourceBinding.
func (*ResourceBindingList) DeepCopy ¶
func (in *ResourceBindingList) DeepCopy() *ResourceBindingList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceBindingList.
func (*ResourceBindingList) DeepCopyInto ¶
func (in *ResourceBindingList) DeepCopyInto(out *ResourceBindingList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceBindingList) DeepCopyObject ¶
func (in *ResourceBindingList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceBindingSpec ¶
type ResourceBindingSpec struct {
// Resource represents the Kubernetes resource to be propagated.
Resource ObjectReference `json:"resource"`
// Clusters represents target member clusters where the resource to be deployed.
// +optional
Clusters []TargetCluster `json:"clusters,omitempty"`
}
ResourceBindingSpec represents the expectation of ResourceBinding.
func (*ResourceBindingSpec) DeepCopy ¶
func (in *ResourceBindingSpec) DeepCopy() *ResourceBindingSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceBindingSpec.
func (*ResourceBindingSpec) DeepCopyInto ¶
func (in *ResourceBindingSpec) DeepCopyInto(out *ResourceBindingSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceBindingStatus ¶
type ResourceBindingStatus struct {
// Conditions contain the different condition statuses.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// AggregatedStatus represents status list of the resource running in each member cluster.
// +optional
AggregatedStatus []AggregatedStatusItem `json:"aggregatedStatus,omitempty"`
}
ResourceBindingStatus represents the overall status of the strategy as well as the referenced resources.
func (*ResourceBindingStatus) DeepCopy ¶
func (in *ResourceBindingStatus) DeepCopy() *ResourceBindingStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceBindingStatus.
func (*ResourceBindingStatus) DeepCopyInto ¶
func (in *ResourceBindingStatus) DeepCopyInto(out *ResourceBindingStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceIdentifier ¶
type ResourceIdentifier struct {
// Ordinal represents an index in manifests list, so the condition can still be linked
// to a manifest even though manifest cannot be parsed successfully.
Ordinal int `json:"ordinal"`
// Group is the group of the resource.
Group string `json:"group,omitempty"`
// Version is the version of the resource.
Version string `json:"version"`
// Kind is the kind of the resource.
Kind string `json:"kind"`
// Resource is the resource type of the resource
Resource string `json:"resource"`
// Namespace is the namespace of the resource, the resource is cluster scoped if the value
// is empty
Namespace string `json:"namespace,omitempty"`
// Name is the name of the resource
Name string `json:"name"`
}
ResourceIdentifier provides the identifiers needed to interact with any arbitrary object.
func (*ResourceIdentifier) DeepCopy ¶
func (in *ResourceIdentifier) DeepCopy() *ResourceIdentifier
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceIdentifier.
func (*ResourceIdentifier) DeepCopyInto ¶
func (in *ResourceIdentifier) DeepCopyInto(out *ResourceIdentifier)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetCluster ¶
type TargetCluster struct {
// Name of target cluster.
Name string `json:"name"`
}
TargetCluster represents the identifier of a member cluster.
func (*TargetCluster) DeepCopy ¶
func (in *TargetCluster) DeepCopy() *TargetCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetCluster.
func (*TargetCluster) DeepCopyInto ¶
func (in *TargetCluster) DeepCopyInto(out *TargetCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Work ¶
type Work struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec represents the desired behavior of Work.
Spec WorkSpec `json:"spec"`
// Status represents the status of PropagationStatus.
// +optional
Status WorkStatus `json:"status,omitempty"`
}
Work defines a list of resources to be deployed on the member cluster.
func (*Work) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Work.
func (*Work) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Work) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkList ¶
type WorkList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
// Items holds a list of Work.
Items []Work `json:"items"`
}
WorkList is a collection of Work.
func (*WorkList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkList.
func (*WorkList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkSpec ¶
type WorkSpec struct {
// Workload represents the manifest workload to be deployed on managed cluster.
Workload WorkloadTemplate `json:"workload,omitempty"`
}
WorkSpec defines the desired state of Work.
func (*WorkSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkSpec.
func (*WorkSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkStatus ¶
type WorkStatus struct {
// Conditions contain the different condition statuses for this work.
// Valid condition types are:
// 1. Applied represents workload in Work is applied successfully on a managed cluster.
// 2. Progressing represents workload in Work is being applied on a managed cluster.
// 3. Available represents workload in Work exists on the managed cluster.
// 4. Degraded represents the current state of workload does not match the desired
// state for a certain period.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// ManifestStatuses contains running status of manifests in spec.
// +optional
ManifestStatuses []ManifestStatus `json:"manifestStatuses,omitempty"`
}
WorkStatus defines the observed state of Work.
func (*WorkStatus) DeepCopy ¶
func (in *WorkStatus) DeepCopy() *WorkStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkStatus.
func (*WorkStatus) DeepCopyInto ¶
func (in *WorkStatus) DeepCopyInto(out *WorkStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkloadTemplate ¶
type WorkloadTemplate struct {
// Manifests represents a list of Kubernetes resources to be deployed on the managed cluster.
// +optional
Manifests []Manifest `json:"manifests,omitempty"`
}
WorkloadTemplate represents the manifest workload to be deployed on managed cluster.
func (*WorkloadTemplate) DeepCopy ¶
func (in *WorkloadTemplate) DeepCopy() *WorkloadTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadTemplate.
func (*WorkloadTemplate) DeepCopyInto ¶
func (in *WorkloadTemplate) DeepCopyInto(out *WorkloadTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.