Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type AppWrapper
- type AppWrapperCondition
- type AppWrapperConditionType
- type AppWrapperGenericResource
- type AppWrapperList
- type AppWrapperResource
- type AppWrapperResourceList
- type AppWrapperService
- type AppWrapperSpec
- type AppWrapperState
- type AppWrapperStatus
- type CustomPodResourceTemplate
- type QueueJob
- type QueueJobList
- type QueueJobSpec
- type QueueJobStatus
- type ResourceName
- type ResourceType
- type SchedulingSpec
- type SchedulingSpecList
- type SchedulingSpecTemplate
- type TaskSpec
Constants ¶
const AppWrapperAnnotationKey = "appwrapper.mcad.ibm.com/appwrapper-name"
AppWrapperAnnotationKey is the annotation key of Pod to identify which AppWrapper it belongs to.
const AppWrapperPlural string = "appwrappers"
const GroupName = "mcad.ibm.com"
GroupName is the group name used in this package.
const QueueJobPlural = "queuejobs"
const SchedulingSpecPlural = "schedulingspecs"
SchedulingSpecPlural is the plural of SchedulingSpec
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeGroupVersion is the 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 AppWrapper ¶
type AppWrapper struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` Spec AppWrapperSpec `json:"spec"` Status AppWrapperStatus `json:"status,omitempty"` }
Definition of AppWrapper class +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*AppWrapper) DeepCopy ¶
func (in *AppWrapper) DeepCopy() *AppWrapper
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppWrapper.
func (*AppWrapper) DeepCopyInto ¶
func (in *AppWrapper) DeepCopyInto(out *AppWrapper)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AppWrapper) DeepCopyObject ¶
func (in *AppWrapper) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AppWrapperCondition ¶
type AppWrapperCondition struct { // Type of appwrapper condition. Type AppWrapperConditionType `json:"type"` // Status of the condition, one of True, False, Unknown. Status v1.ConditionStatus `json:"status"` // The last time this condition was updated. LastUpdateMicroTime metav1.MicroTime `json:"lastUpdateMicroTime,omitempty"` // Last time the condition transitioned from one status to another. LastTransitionMicroTime metav1.MicroTime `json:"lastTransitionMicroTime,omitempty"` // The reason for the condition's last transition. Reason string `json:"reason,omitempty"` // A human readable message indicating details about the transition. Message string `json:"message,omitempty"` }
DeploymentCondition describes the state of a deployment at a certain point.
func (*AppWrapperCondition) DeepCopy ¶
func (in *AppWrapperCondition) DeepCopy() *AppWrapperCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppWrapperCondition.
func (*AppWrapperCondition) DeepCopyInto ¶
func (in *AppWrapperCondition) DeepCopyInto(out *AppWrapperCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AppWrapperConditionType ¶
type AppWrapperConditionType string
const ( AppWrapperCondInit AppWrapperConditionType = "Init" AppWrapperCondQueueing AppWrapperConditionType = "Queueing" AppWrapperCondHeadOfLine AppWrapperConditionType = "HeadOfLine" AppWrapperCondBackoff AppWrapperConditionType = "Backoff" AppWrapperCondDispatched AppWrapperConditionType = "Dispatched" AppWrapperCondRunning AppWrapperConditionType = "Running" AppWrapperCondPreemptCandidate AppWrapperConditionType = "PreemptCandidate" AppWrapperCondPreempted AppWrapperConditionType = "Preempted" AppWrapperCondDeleted AppWrapperConditionType = "Deleted" AppWrapperCondFailed AppWrapperConditionType = "Failed" )
type AppWrapperGenericResource ¶
type AppWrapperGenericResource struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` // Replicas is the number of desired replicas DesiredAvailable int32 `json:"replicas,omitempty" protobuf:"bytes,2,opt,name=desiredavailable"` // The minimal available pods to run for this AppWrapper; the default value is nil MinAvailable *int32 `json:"minavailable,omitempty" protobuf:"bytes,3,opt,name=minavailable"` // The number of allocated replicas from this resource type Allocated int32 `json:"allocated"` // The priority of this resource Priority float64 `json:"priority"` // The increasing rate of priority value for this resource PrioritySlope float64 `json:"priorityslope"` //The template for the resource; it is now a raw text because we don't know for what resource //it should be instantiated GenericTemplate runtime.RawExtension `json:"generictemplate"` //Optional section that specifies resource requirements for non-standard k8s resources, follows same format as that // of standard k8s resources CustomPodResources []CustomPodResourceTemplate `json:"custompodresources,omitempty"` }
AppWrapperResource is App Wrapper aggregation resource
func (*AppWrapperGenericResource) DeepCopy ¶
func (in *AppWrapperGenericResource) DeepCopy() *AppWrapperGenericResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppWrapperGenericResource.
func (*AppWrapperGenericResource) DeepCopyInto ¶
func (in *AppWrapperGenericResource) DeepCopyInto(out *AppWrapperGenericResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AppWrapperList ¶
type AppWrapperList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []AppWrapper `json:"items"` }
AppWrapperList is a collection of AppWrappers. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*AppWrapperList) DeepCopy ¶
func (in *AppWrapperList) DeepCopy() *AppWrapperList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppWrapperList.
func (*AppWrapperList) DeepCopyInto ¶
func (in *AppWrapperList) DeepCopyInto(out *AppWrapperList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AppWrapperList) DeepCopyObject ¶
func (in *AppWrapperList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AppWrapperResource ¶
type AppWrapperResource struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` // Replicas is the number of desired replicas Replicas int32 `json:"replicas,omitempty" protobuf:"bytes,2,opt,name=replicas"` // The minimal available pods to run for this AppWrapper; the default value is nil MinAvailable *int32 `json:"minavailable,omitempty" protobuf:"bytes,3,opt,name=minavailable"` // The number of allocated replicas from this resource type AllocatedReplicas int32 `json:"allocatedreplicas"` // The priority of this resource Priority float64 `json:"priority"` // The increasing rate of priority value for this resource PrioritySlope float64 `json:"priorityslope"` //The type of the resource (is the resource a Pod, a ReplicaSet, a ... ?) Type ResourceType `json:"type"` //The template for the resource; it is now a raw text because we don't know for what resource //it should be instantiated Template runtime.RawExtension `json:"template"` }
AppWrapperResource is App Wrapper aggregation resource todo: To be depricated
func (*AppWrapperResource) DeepCopy ¶
func (in *AppWrapperResource) DeepCopy() *AppWrapperResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppWrapperResource.
func (*AppWrapperResource) DeepCopyInto ¶
func (in *AppWrapperResource) DeepCopyInto(out *AppWrapperResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AppWrapperResourceList ¶
type AppWrapperResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []AppWrapperResource GenericItems []AppWrapperGenericResource }
a collection of AppWrapperResource
func (*AppWrapperResourceList) DeepCopy ¶
func (in *AppWrapperResourceList) DeepCopy() *AppWrapperResourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppWrapperResourceList.
func (*AppWrapperResourceList) DeepCopyInto ¶
func (in *AppWrapperResourceList) DeepCopyInto(out *AppWrapperResourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AppWrapperService ¶
type AppWrapperService struct {
Spec v1.ServiceSpec `json:"spec"`
}
AppWrapperService is App Wrapper service definition
func (*AppWrapperService) DeepCopy ¶
func (in *AppWrapperService) DeepCopy() *AppWrapperService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppWrapperService.
func (*AppWrapperService) DeepCopyInto ¶
func (in *AppWrapperService) DeepCopyInto(out *AppWrapperService)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AppWrapperSpec ¶
type AppWrapperSpec struct { Priority float64 `json:"priority,omitempty"` PrioritySlope float64 `json:"priorityslope,omitempty"` Service AppWrapperService `json:"service"` AggrResources AppWrapperResourceList `json:"resources"` Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"` // SchedSpec specifies the parameters for scheduling. SchedSpec SchedulingSpecTemplate `json:"schedulingSpec,omitempty" protobuf:"bytes,2,opt,name=schedulingSpec"` }
AppWrapperSpec describes how the App Wrapper will look like.
func (*AppWrapperSpec) DeepCopy ¶
func (in *AppWrapperSpec) DeepCopy() *AppWrapperSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppWrapperSpec.
func (*AppWrapperSpec) DeepCopyInto ¶
func (in *AppWrapperSpec) DeepCopyInto(out *AppWrapperSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AppWrapperState ¶
type AppWrapperState string
const ( AppWrapperStateEnqueued AppWrapperState = "Pending" AppWrapperStateActive AppWrapperState = "Running" AppWrapperStateDeleted AppWrapperState = "Deleted" AppWrapperStateFailed AppWrapperState = "Failed" )
enqueued, active, deleting, succeeded, failed
type AppWrapperStatus ¶
type AppWrapperStatus struct { // The number of pending pods. // +optional Pending int32 `json:"pending,omitempty" protobuf:"bytes,1,opt,name=pending"` // +optional Running int32 `json:"running,omitempty" protobuf:"bytes,1,opt,name=running"` // The number of resources which reached phase Succeeded. // +optional Succeeded int32 `json:"Succeeded,omitempty" protobuf:"bytes,2,opt,name=succeeded"` // The number of resources which reached phase Failed. // +optional Failed int32 `json:"failed,omitempty" protobuf:"bytes,3,opt,name=failed"` // The minimal available resources to run for this AppWrapper (is this different from the MinAvailable from JobStatus) // +optional MinAvailable int32 `json:"template,omitempty" protobuf:"bytes,4,opt,name=template"` //Can run? CanRun bool `json:"canrun,omitempty" protobuf:"bytes,1,opt,name=canrun"` //Is Dispatched? IsDispatched bool `json:"isdispatched,omitempty" protobuf:"bytes,1,opt,name=isdispatched"` //State - Running, Queued, Deleted ? State AppWrapperState `json:"state,omitempty"` Message string `json:"message,omitempty"` // System defined Priority SystemPriority float64 `json:"systempriority,omitempty"` // State of QueueJob - Init, Queueing, HeadOfLine, Rejoining, ... QueueJobState AppWrapperConditionType `json:"queuejobstate,omitempty"` // Microsecond level timestamp when controller first sees QueueJob (by Informer) ControllerFirstTimestamp metav1.MicroTime `json:"controllerfirsttimestamp,omitempty"` // Tell Informer to ignore this update message (do not generate a controller event) FilterIgnore bool `json:"filterignore,omitempty"` // Indicate sender of this message (extremely useful for debugging) Sender string `json:"sender,omitempty"` // Indicate if message is a duplicate (for Informer to recognize duplicate messages) Local bool `json:"local,omitempty"` // Represents the latest available observations of a appwrapper's current condition. Conditions []AppWrapperCondition `json:"conditions,omitempty"` }
AppWrapperStatus represents the current state of a AppWrapper
func (*AppWrapperStatus) DeepCopy ¶
func (in *AppWrapperStatus) DeepCopy() *AppWrapperStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppWrapperStatus.
func (*AppWrapperStatus) DeepCopyInto ¶
func (in *AppWrapperStatus) DeepCopyInto(out *AppWrapperStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CustomPodResourceTemplate ¶
type CustomPodResourceTemplate struct { Replicas int `json:"replicas"` //todo: replace with //Containers []Container Contain v1.ResourceRequirements Requests v1.ResourceList `json:"requests"` Limits v1.ResourceList `json:"limits"` }
func (*CustomPodResourceTemplate) DeepCopy ¶
func (in *CustomPodResourceTemplate) DeepCopy() *CustomPodResourceTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomPodResourceTemplate.
func (*CustomPodResourceTemplate) DeepCopyInto ¶
func (in *CustomPodResourceTemplate) DeepCopyInto(out *CustomPodResourceTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type QueueJob ¶
type QueueJob struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of a cron job, including the minAvailable Spec QueueJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Current status of QueueJob Status QueueJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*QueueJob) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueJob.
func (*QueueJob) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*QueueJob) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type QueueJobList ¶
type QueueJobList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` Items []QueueJob `json:"items" protobuf:"bytes,2,rep,name=items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*QueueJobList) DeepCopy ¶
func (in *QueueJobList) DeepCopy() *QueueJobList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueJobList.
func (*QueueJobList) DeepCopyInto ¶
func (in *QueueJobList) DeepCopyInto(out *QueueJobList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*QueueJobList) DeepCopyObject ¶
func (in *QueueJobList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type QueueJobSpec ¶
type QueueJobSpec struct { SchedulerName string `json:"schedulerName,omitempty" protobuf:"bytes,1,opt,name=schedulerName"` // SchedSpec specifies the parameters for scheduling. SchedSpec SchedulingSpecTemplate `json:"schedulingSpec,omitempty" protobuf:"bytes,2,opt,name=schedulingSpec"` // TaskSpecs specifies the task specification of QueueJob TaskSpecs []TaskSpec `json:"taskSpecs,omitempty" protobuf:"bytes,3,opt,name=taskSpecs"` }
QueueJobSpec describes how the job execution will look like and when it will actually run
func (*QueueJobSpec) DeepCopy ¶
func (in *QueueJobSpec) DeepCopy() *QueueJobSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueJobSpec.
func (*QueueJobSpec) DeepCopyInto ¶
func (in *QueueJobSpec) DeepCopyInto(out *QueueJobSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type QueueJobStatus ¶
type QueueJobStatus struct { // The number of pending pods. // +optional Pending int32 `json:"pending,omitempty" protobuf:"bytes,1,opt,name=pending"` // The number of running pods. // +optional Running int32 `json:"running,omitempty" protobuf:"bytes,2,opt,name=running"` // The number of pods which reached phase Succeeded. // +optional Succeeded int32 `json:"Succeeded,omitempty" protobuf:"bytes,3,opt,name=succeeded"` // The number of pods which reached phase Failed. // +optional Failed int32 `json:"failed,omitempty" protobuf:"bytes,4,opt,name=failed"` // The minimal available pods to run for this QueueJob // +optional MinAvailable int32 `json:"minAvailable,omitempty" protobuf:"bytes,5,opt,name=minAvailable"` }
QueueJobStatus represents the current state of a QueueJob
func (*QueueJobStatus) DeepCopy ¶
func (in *QueueJobStatus) DeepCopy() *QueueJobStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueJobStatus.
func (*QueueJobStatus) DeepCopyInto ¶
func (in *QueueJobStatus) DeepCopyInto(out *QueueJobStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceName ¶
type ResourceName string
type ResourceType ¶
type ResourceType string
App Wrapper resources type
const ( ResourceTypePod ResourceType = "Pod" ResourceTypeService ResourceType = "Service" ResourceTypeSecret ResourceType = "Secret" ResourceTypeStatefulSet ResourceType = "StatefulSet" ResourceTypeDeployment ResourceType = "Deployment" ResourceTypeReplicaSet ResourceType = "ReplicaSet" ResourceTypePersistentVolume ResourceType = "PersistentVolume" ResourceTypePersistentVolumeClaim ResourceType = "PersistentVolumeClaim" ResourceTypeNamespace ResourceType = "Namespace" ResourceTypeConfigMap ResourceType = "ConfigMap" ResourceTypeNetworkPolicy ResourceType = "NetworkPolicy" )
type SchedulingSpec ¶
type SchedulingSpec struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec SchedulingSpecTemplate `json:"spec,omitempty" protobuf:"bytes,1,rep,name=spec"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*SchedulingSpec) DeepCopy ¶
func (in *SchedulingSpec) DeepCopy() *SchedulingSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulingSpec.
func (*SchedulingSpec) DeepCopyInto ¶
func (in *SchedulingSpec) DeepCopyInto(out *SchedulingSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SchedulingSpec) DeepCopyObject ¶
func (in *SchedulingSpec) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SchedulingSpecList ¶
type SchedulingSpecList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []SchedulingSpec `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*SchedulingSpecList) DeepCopy ¶
func (in *SchedulingSpecList) DeepCopy() *SchedulingSpecList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulingSpecList.
func (*SchedulingSpecList) DeepCopyInto ¶
func (in *SchedulingSpecList) DeepCopyInto(out *SchedulingSpecList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SchedulingSpecList) DeepCopyObject ¶
func (in *SchedulingSpecList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SchedulingSpecTemplate ¶
type SchedulingSpecTemplate struct { NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,1,rep,name=nodeSelector"` MinAvailable int `json:"minAvailable,omitempty" protobuf:"bytes,2,rep,name=minAvailable"` }
func (*SchedulingSpecTemplate) DeepCopy ¶
func (in *SchedulingSpecTemplate) DeepCopy() *SchedulingSpecTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulingSpecTemplate.
func (*SchedulingSpecTemplate) DeepCopyInto ¶
func (in *SchedulingSpecTemplate) DeepCopyInto(out *SchedulingSpecTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TaskSpec ¶
type TaskSpec struct { // A label query over pods that should match the pod count. // Normally, the system sets this field for you. // +optional Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"` // Replicas specifies the replicas of this TaskSpec in QueueJob. Replicas int32 `json:"replicas,omitempty" protobuf:"bytes,2,opt,name=replicas"` // Specifies the pod that will be created for this TaskSpec // when executing a QueueJob Template v1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"` }
TaskSpec specifies the task specification of QueueJob
func (*TaskSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskSpec.
func (*TaskSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.