v1alpha1

package
v0.3.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 8 Imported by: 21

Documentation

Overview

+k8s:deepcopy-gen=package,register +groupName=workload.kcp.dev

Index

Constants

View Source
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

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: workload.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

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

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.

Jump to

Keyboard shortcuts

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