Documentation
¶
Overview ¶
+k8s:deepcopy-gen=package,register +groupName=workload.kcp.dev
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type WorkloadCluster
- func (in *WorkloadCluster) DeepCopy() *WorkloadCluster
- func (in *WorkloadCluster) DeepCopyInto(out *WorkloadCluster)
- func (in *WorkloadCluster) DeepCopyObject() runtime.Object
- func (in *WorkloadCluster) GetConditions() conditionsv1alpha1.Conditions
- func (in *WorkloadCluster) SetConditions(conditions conditionsv1alpha1.Conditions)
- type WorkloadClusterList
- type WorkloadClusterSpec
- type WorkloadClusterStatus
Constants ¶
const ( // WorkloadClusterReadyCondition means the WorkloadCluster is available. WorkloadClusterReadyCondition conditionsv1alpha1.ConditionType = "Ready" // WorkloadClusterUnknownReason documents a WorkloadCluster which readiness is unknown. WorkloadClusterUnknownReason = "WorkloadClusterStatusUnknown" // WorkloadClusterReadyReason documents a WorkloadCluster that is ready. WorkloadClusterReadyReason = "WorkloadClusterReady" // WorkloadClusterNotReadyReason documents a WorkloadCluster is not ready, when the "readyz" check returns false. WorkloadClusterNotReadyReason = "WorkloadClusterNotReady" // WorkloadClusterUnreachableReason documents the WorkloadCluster state when the Syncer is unable to reach the WorkloadCluster "readyz" API endpoint WorkloadClusterUnreachableReason = "WorkloadClusterUnreachable" // ErrorStartingSyncerReason indicates that the Syncer failed to start. ErrorStartingSyncerReason = "ErrorStartingSyncer" // ErrorInstallingSyncerReason indicates that the Syncer failed to install. ErrorInstallingSyncerReason = "ErrorInstallingSyncer" // InvalidKubeConfigReason indicates that the Syncer failed to start because the KubeConfig is invalid. InvalidKubeConfigReason = "InvalidKubeConfig" // ErrorCreatingClientReason indicates that there has been an error trying to create a kubernetes client from given a KubeConfig. ErrorCreatingClientReason = "ErrorCreatingClient" // ErrorStartingAPIImporterReason indicates an error starting the API Importer. ErrorStartingAPIImporterReason = "ErrorStartingAPIImporter" // ErrorHeartbeatMissedReason indicates that a heartbeat update was not received within the configured threshold. ErrorHeartbeatMissedReason = "ErrorHeartbeat" )
Conditions and ConditionReasons for the kcp WorkloadCluster object.
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: workload.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type WorkloadCluster ¶
type WorkloadCluster struct {
metav1.TypeMeta `json:",inline"`
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec holds the desired state.
// +optional
Spec WorkloadClusterSpec `json:"spec,omitempty"`
// Status communicates the observed state.
// +optional
Status WorkloadClusterStatus `json:"status,omitempty"`
}
func (*WorkloadCluster) DeepCopy ¶
func (in *WorkloadCluster) DeepCopy() *WorkloadCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadCluster.
func (*WorkloadCluster) DeepCopyInto ¶
func (in *WorkloadCluster) DeepCopyInto(out *WorkloadCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkloadCluster) DeepCopyObject ¶
func (in *WorkloadCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*WorkloadCluster) GetConditions ¶
func (in *WorkloadCluster) GetConditions() conditionsv1alpha1.Conditions
func (*WorkloadCluster) SetConditions ¶
func (in *WorkloadCluster) SetConditions(conditions conditionsv1alpha1.Conditions)
type WorkloadClusterList ¶
type WorkloadClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []WorkloadCluster `json:"items"`
}
WorkloadClusterList is a list of WorkloadCluster resources
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*WorkloadClusterList) DeepCopy ¶
func (in *WorkloadClusterList) DeepCopy() *WorkloadClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadClusterList.
func (*WorkloadClusterList) DeepCopyInto ¶
func (in *WorkloadClusterList) DeepCopyInto(out *WorkloadClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkloadClusterList) DeepCopyObject ¶
func (in *WorkloadClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkloadClusterSpec ¶
type WorkloadClusterSpec struct {
KubeConfig string `json:"kubeconfig"`
// Unschedulable controls cluster schedulability of new workloads. By
// default, cluster is schedulable.
// +optional
// +kubebuilder:default=false
Unschedulable bool `json:"unschedulable"`
// EvictAfter controls cluster schedulability of new and existing workloads.
// After the EvictAfter time, any workload scheduled to the cluster
// will be unassigned from the cluster.
// By default, workloads scheduled to the cluster are not evicted.
EvictAfter *metav1.Time `json:"evictAfter,omitempty"`
}
WorkloadClusterSpec holds the desired state of the WorkloadCluster (from the client).
func (*WorkloadClusterSpec) DeepCopy ¶
func (in *WorkloadClusterSpec) DeepCopy() *WorkloadClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadClusterSpec.
func (*WorkloadClusterSpec) DeepCopyInto ¶
func (in *WorkloadClusterSpec) DeepCopyInto(out *WorkloadClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkloadClusterStatus ¶
type WorkloadClusterStatus struct {
// Allocatable represents the resources that are available for scheduling.
// +optional
Allocatable *corev1.ResourceList `json:"allocatable,omitempty"`
// Capacity represents the total resources of the cluster.
// +optional
Capacity *corev1.ResourceList `json:"capacity,omitempty"`
// Current processing state of the WorkloadCluster.
// +optional
Conditions conditionsv1alpha1.Conditions `json:"conditions,omitempty"`
// +optional
SyncedResources []string `json:"syncedResources,omitempty"`
// A timestamp indicating when the syncer last reported status.
// +optional
LastSyncerHeartbeatTime *metav1.Time `json:"lastSyncerHeartbeatTime,omitempty"`
}
WorkloadClusterStatus communicates the observed state of the WorkloadCluster (from the controller).
func (*WorkloadClusterStatus) DeepCopy ¶
func (in *WorkloadClusterStatus) DeepCopy() *WorkloadClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadClusterStatus.
func (*WorkloadClusterStatus) DeepCopyInto ¶
func (in *WorkloadClusterStatus) DeepCopyInto(out *WorkloadClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.