Documentation ¶
Overview ¶
Package v1beta1 defines the api types for the notebook provisioner. +kubebuilder:object:generate=true +groupName=jackhoman.dev
Index ¶
- Constants
- Variables
- func ValidateDag(dag *Dag) error
- type Dag
- func (in *Dag) DeepCopy() *Dag
- func (in *Dag) DeepCopyInto(out *Dag)
- func (in *Dag) DeepCopyObject() runtime.Object
- func (dag *Dag) Default()
- func (dag *Dag) Entrypoint() DagTask
- func (dag *Dag) TaskMap() map[string]DagTask
- func (dag *Dag) ValidateCreate() (warnings admission.Warnings, err error)
- func (dag *Dag) ValidateDelete() (warnings admission.Warnings, err error)
- func (dag *Dag) ValidateUpdate(old runtime.Object) (warnings admission.Warnings, err error)
- type DagList
- type DagSpec
- type DagTask
- func (in *DagTask) DeepCopy() *DagTask
- func (in *DagTask) DeepCopyInto(out *DagTask)
- func (in *DagTask) ElectedOptions() []corev1.LocalObjectReference
- func (in *DagTask) GetName() string
- func (in *DagTask) HasDependencies() bool
- func (in *DagTask) HistoryLimit() int
- func (in *DagTask) ResourceRequests() corev1.ResourceList
- func (in *DagTask) TemplateRef() types.NamespacedName
- func (in *DagTask) UpdatePolicy() string
- type Execution
- func (e *Execution) AsOwner() metav1.OwnerReference
- func (in *Execution) DeepCopy() *Execution
- func (in *Execution) DeepCopyInto(out *Execution)
- func (in *Execution) DeepCopyObject() runtime.Object
- func (e *Execution) MaxConcurrentTasks() int
- func (e *Execution) SetTaskStatus(task string, status ExecutionTaskStatus)
- type ExecutionList
- type ExecutionSpec
- type ExecutionStatus
- type ExecutionTaskStatus
- type LocalObjectReference
- type Notebook
- func (nb *Notebook) Adopt(obj Orphan)
- func (nb *Notebook) AsOwner() metav1.OwnerReference
- func (in *Notebook) DeepCopy() *Notebook
- func (in *Notebook) DeepCopyInto(out *Notebook)
- func (in *Notebook) DeepCopyObject() runtime.Object
- func (nb *Notebook) ElectedOptions() []corev1.LocalObjectReference
- func (nb *Notebook) HasUpdatePolicy() bool
- func (nb *Notebook) HistoryLimit() int
- func (nb *Notebook) ResourceRequests() corev1.ResourceList
- func (nb *Notebook) SetUpdatePolicy(up string)
- func (nb *Notebook) Stopped() bool
- func (nb *Notebook) TemplateRef() types.NamespacedName
- func (nb *Notebook) UpdatePolicy() string
- type NotebookCondition
- type NotebookList
- type NotebookRevision
- type NotebookSpec
- type NotebookStatus
- type ObjectMeta
- type Orphan
- type PodDefault
- type PodDefaultList
- type PodDefaultSpec
- type PodTemplateSpec
- type Revision
- func (r *Revision) AsOwner() metav1.OwnerReference
- func (in *Revision) DeepCopy() *Revision
- func (in *Revision) DeepCopyInto(out *Revision)
- func (in *Revision) DeepCopyObject() runtime.Object
- func (r *Revision) Elect()
- func (r *Revision) Elected() bool
- func (r *Revision) GetData() []byte
- func (r *Revision) Hash() string
- func (r *Revision) Less(other *Revision) bool
- func (r *Revision) Recall()
- func (r *Revision) SetData(raw []byte)
- func (r *Revision) SetStopped(stopped bool)
- func (r *Revision) Stop()
- func (r *Revision) Stopped() bool
- func (r *Revision) Sum() string
- type RevisionList
- func (in *RevisionList) DeepCopy() *RevisionList
- func (in *RevisionList) DeepCopyInto(out *RevisionList)
- func (in *RevisionList) DeepCopyObject() runtime.Object
- func (in *RevisionList) Len() int
- func (in *RevisionList) Less(i, j int) bool
- func (in *RevisionList) ReverseSort()
- func (in *RevisionList) Revision(i int) *Revision
- func (in *RevisionList) Sort()
- func (in *RevisionList) Swap(i, j int)
- type RevisionSpec
- type RevisionStatus
- type Template
- func (in *Template) DeepCopy() *Template
- func (in *Template) DeepCopyInto(out *Template)
- func (in *Template) DeepCopyObject() runtime.Object
- func (in *Template) Dependencies() []LocalObjectReference
- func (in *Template) Options() []TemplateOption
- func (in *Template) PodTemplateSpec() *PodTemplateSpec
- func (in *Template) Required() []corev1.LocalObjectReference
- func (in *Template) SetResourceRequests(req corev1.ResourceList)
- type TemplateList
- type TemplateOption
- type TemplateReference
- type TemplateSpec
Constants ¶
const ( NotebookPhaseRunning = "Running" NotebookPhaseStopped = "Stopped" )
const ( GroupName = "jackhoman.dev" Version = "v1beta1" )
const ( UpdatePolicyAuto = "Auto" UpdatePolicyIgnore = "Ignore" )
const (
ErrDuplicateTaskName = "duplicate task name"
)
Variables ¶
var ( GroupVersion = schema.GroupVersion{Group: GroupName, Version: Version} SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func ValidateDag ¶
Types ¶
type Dag ¶
type Dag struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec DagSpec `json:"spec"` }
A Dag is a spec for a directed acyclic graph. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Dag) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dag.
func (*Dag) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Dag) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Dag) Entrypoint ¶
Entrypoint returns the entrypoint task in the Dag
func (*Dag) ValidateCreate ¶
func (*Dag) ValidateDelete ¶
type DagList ¶
type DagList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Dag `json:"items,omitempty"` }
A DagList list is a list of Dag resources +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*DagList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DagList.
func (*DagList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DagList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DagSpec ¶
type DagSpec struct { // The Entrypoint is the first task in the DAG Entrypoint string `json:"entrypoint"` // Tasks are the tasks in the DAG Tasks []DagTask `json:"tasks"` }
func (*DagSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DagSpec.
func (*DagSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DagTask ¶
type DagTask struct { // Name is the name of the task. The name is required to create // dependencies Name string `json:"name"` // Template is the name of the template to use for the DagTask's job. Template TemplateReference `json:"templateRef"` // Command is the command to run in the DagTask's job. If Command is // omitted, the command from the Template will be used. Command []string `json:"command,omitempty"` // Options are the names of PodDefaults that should be merged into // the task's pod template. The PodDefaults must be options in the template // to be used. Options []corev1.LocalObjectReference `json:"options,omitempty"` // Dependencies are the names of other tasks that must complete // before this task can start. Dependencies []string `json:"dependencies,omitempty"` // Resources are resources requested for the task, such as // memory, and cpu. If Resources is omitted, the defaults // from the Template will be used // +kubebuilder:validation:Optional Resources corev1.ResourceList `json:"resources,omitempty"` }
func (*DagTask) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DagTask.
func (*DagTask) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DagTask) ElectedOptions ¶
func (in *DagTask) ElectedOptions() []corev1.LocalObjectReference
func (*DagTask) HasDependencies ¶
func (*DagTask) HistoryLimit ¶
func (*DagTask) ResourceRequests ¶
func (in *DagTask) ResourceRequests() corev1.ResourceList
func (*DagTask) TemplateRef ¶
func (in *DagTask) TemplateRef() types.NamespacedName
func (*DagTask) UpdatePolicy ¶
type Execution ¶
type Execution struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` // Spec is the specification of the Execution. Spec ExecutionSpec `json:"spec"` // Status is the current status of the Execution. That execution // status will be updated as tasks are complete. // +optional Status ExecutionStatus `json:"status,omitempty"` }
An Execution is a job that runs a Dag. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:subresource:status
func (*Execution) AsOwner ¶
func (e *Execution) AsOwner() metav1.OwnerReference
func (*Execution) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Execution.
func (*Execution) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Execution) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Execution) MaxConcurrentTasks ¶
MaxConcurrentTasks returns the maximum number of tasks that can be run concurrently. If unspecified, the default is 20.
func (*Execution) SetTaskStatus ¶
func (e *Execution) SetTaskStatus(task string, status ExecutionTaskStatus)
type ExecutionList ¶
type ExecutionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Execution `json:"items,omitempty"` }
ExecutionList is a list of Execution resources +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ExecutionList) DeepCopy ¶
func (in *ExecutionList) DeepCopy() *ExecutionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionList.
func (*ExecutionList) DeepCopyInto ¶
func (in *ExecutionList) DeepCopyInto(out *ExecutionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ExecutionList) DeepCopyObject ¶
func (in *ExecutionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ExecutionSpec ¶
type ExecutionSpec struct { // DagRef is the name of the Dag to execute. // +kubebuilder:validation:Required DagRef corev1.LocalObjectReference `json:"dagRef"` // Parallelism is the number of jobs to run in parallel. // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=20 // +kubebuilder:default=10 // +kubebuilder:validation:Optional Parallelism int `json:"parallelism"` }
func (*ExecutionSpec) DeepCopy ¶
func (in *ExecutionSpec) DeepCopy() *ExecutionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionSpec.
func (*ExecutionSpec) DeepCopyInto ¶
func (in *ExecutionSpec) DeepCopyInto(out *ExecutionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExecutionStatus ¶
type ExecutionStatus struct { // Tasks is a map of task names to their current status. Tasks map[string]ExecutionTaskStatus `json:"tasks"` // Completed is true when all tasks have completed. Completed bool `json:"completed"` // Succeeded is true when all tasks have completed successfully. Succeeded bool `json:"succeeded"` }
func (*ExecutionStatus) DeepCopy ¶
func (in *ExecutionStatus) DeepCopy() *ExecutionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionStatus.
func (*ExecutionStatus) DeepCopyInto ¶
func (in *ExecutionStatus) DeepCopyInto(out *ExecutionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExecutionTaskStatus ¶
type ExecutionTaskStatus struct { // Phase is the current phase of the task. Conditions []batchv1.JobCondition `json:"conditions,omitempty"` // Completed when all tasks have completed or a single task fails. Completed bool `json:"completed"` // Succeeded is true when all tasks have completed successfully. Succeeded bool `json:"succeeded"` }
func (*ExecutionTaskStatus) DeepCopy ¶
func (in *ExecutionTaskStatus) DeepCopy() *ExecutionTaskStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionTaskStatus.
func (*ExecutionTaskStatus) DeepCopyInto ¶
func (in *ExecutionTaskStatus) DeepCopyInto(out *ExecutionTaskStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalObjectReference ¶
type LocalObjectReference struct { Name string `json:"name"` APIVersion string `json:"apiVersion"` Kind string `json:"kind"` }
LocalObjectReference is a reference to an arbitrary object in the same namespace as the template.
func (*LocalObjectReference) DeepCopy ¶
func (in *LocalObjectReference) DeepCopy() *LocalObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference.
func (*LocalObjectReference) DeepCopyInto ¶
func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalObjectReference) GroupVersionKind ¶
func (in *LocalObjectReference) GroupVersionKind() schema.GroupVersionKind
type Notebook ¶
type Notebook struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec NotebookSpec `json:"spec"` Status NotebookStatus `json:"status,omitempty"` }
Notebook is a spec for a notebook resource. A Notebook combined with a referenced template will create a NotebookRevision. Revisions are the actual runtime workload. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:subresource:status
func (*Notebook) AsOwner ¶
func (nb *Notebook) AsOwner() metav1.OwnerReference
func (*Notebook) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Notebook.
func (*Notebook) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Notebook) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Notebook) ElectedOptions ¶
func (nb *Notebook) ElectedOptions() []corev1.LocalObjectReference
func (*Notebook) HasUpdatePolicy ¶
func (*Notebook) HistoryLimit ¶
func (*Notebook) ResourceRequests ¶
func (nb *Notebook) ResourceRequests() corev1.ResourceList
func (*Notebook) SetUpdatePolicy ¶
func (*Notebook) TemplateRef ¶
func (nb *Notebook) TemplateRef() types.NamespacedName
func (*Notebook) UpdatePolicy ¶
type NotebookCondition ¶
type NotebookCondition struct { Type string `json:"type"` LastTransitionTime metav1.Time `json:"lastTransitionTime"` Reason string `json:"reason"` Message string `json:"message,omitempty"` }
func (*NotebookCondition) DeepCopy ¶
func (in *NotebookCondition) DeepCopy() *NotebookCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotebookCondition.
func (*NotebookCondition) DeepCopyInto ¶
func (in *NotebookCondition) DeepCopyInto(out *NotebookCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NotebookList ¶
type NotebookList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Notebook `json:"items"` }
NotebookList is a list of notebooks +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*NotebookList) DeepCopy ¶
func (in *NotebookList) DeepCopy() *NotebookList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotebookList.
func (*NotebookList) DeepCopyInto ¶
func (in *NotebookList) DeepCopyInto(out *NotebookList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NotebookList) DeepCopyObject ¶
func (in *NotebookList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NotebookRevision ¶
type NotebookRevision struct { Name string `json:"name"` Elected bool `json:"elected"` CreatedAt metav1.Time `json:"createdAt"` }
func (*NotebookRevision) DeepCopy ¶
func (in *NotebookRevision) DeepCopy() *NotebookRevision
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotebookRevision.
func (*NotebookRevision) DeepCopyInto ¶
func (in *NotebookRevision) DeepCopyInto(out *NotebookRevision)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NotebookSpec ¶
type NotebookSpec struct { // RevisionHistoryLimit is the number of revisions to keep around // after the notebook updates. The oldest revisions will be removed // first. // +kubebuilder:validation:min=1 // +kubebuilder:validation:default=3 RevisionHistoryLimit int `json:"revisionHistoryLimit"` // When Stopped is true, the Notebook pod will be removed, so that it // is not consuming resources. When Stopped is false, the Notebook will // have a single pod running. // +kubebuilder:validation:Required // +kubebuilder:default=false Stopped bool `json:"stopped,omitempty"` // The UpdatePolicy specified how to handle changes in the template spec. // If the UpdatePolicy is unspecified, the referenced Template update policy // will be used. If the UpdatePolicy is set to automatic, the Notebook will // be updated during downtime. // +kubebuilder:validation:Enum=Auto;Ignore UpdatePolicy *string `json:"updatePolicy,omitempty"` // ResourceRequests are resources requested for the notebook, such as // memory, cpu, and storage. If ResourceRequests is omitted, the defaults // from the Template will be used // +kubebuilder:validation:Optional ResourceRequests corev1.ResourceList `json:"resources,omitempty"` // TemplateRef is a reference to a specific template revision. If the // template revision isn't specified, the latest template revision will // be used. // +kubebuilder:validation:Required TemplateRef TemplateReference `json:"templateRef"` // An Owner is the user that created the Notebook. The Owner is the // only user that can update, patch, or delete the Notebook. // +kubebuilder:validation:Required Owner rbacv1.Subject `json:"owner"` // Options are selected template options for the notebook. Chosen // Options will be applied directly to the NotebookRevision. // +kubebuilder:optional Options []string `json:"options,omitempty"` }
func (*NotebookSpec) DeepCopy ¶
func (in *NotebookSpec) DeepCopy() *NotebookSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotebookSpec.
func (*NotebookSpec) DeepCopyInto ¶
func (in *NotebookSpec) DeepCopyInto(out *NotebookSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NotebookStatus ¶
type NotebookStatus struct { Conditions []corev1.PodCondition `json:"conditions,omitempty"` Phase corev1.PodPhase `json:"phase"` Revisions []NotebookRevision `json:"revisions"` }
func (*NotebookStatus) DeepCopy ¶
func (in *NotebookStatus) DeepCopy() *NotebookStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotebookStatus.
func (*NotebookStatus) DeepCopyInto ¶
func (in *NotebookStatus) DeepCopyInto(out *NotebookStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectMeta ¶
type ObjectMeta struct { Labels map[string]string `json:"labels,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` }
func (*ObjectMeta) DeepCopy ¶
func (in *ObjectMeta) DeepCopy() *ObjectMeta
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMeta.
func (*ObjectMeta) DeepCopyInto ¶
func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Orphan ¶
type Orphan interface { SetOwnerReferences([]metav1.OwnerReference) GetOwnerReferences() []metav1.OwnerReference }
Orphan is a type that can be adopted +k8s:deepcopy-gen=false
type PodDefault ¶
type PodDefault struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec PodDefaultSpec `json:"spec"` }
A PodDefault is an optional configuration that can be merged into workload resources, such as Notebooks. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*PodDefault) DeepCopy ¶
func (in *PodDefault) DeepCopy() *PodDefault
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDefault.
func (*PodDefault) DeepCopyInto ¶
func (in *PodDefault) DeepCopyInto(out *PodDefault)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodDefault) DeepCopyObject ¶
func (in *PodDefault) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PodDefault) Dependencies ¶
func (in *PodDefault) Dependencies() []LocalObjectReference
func (*PodDefault) PodTemplateSpec ¶
func (in *PodDefault) PodTemplateSpec() PodTemplateSpec
type PodDefaultList ¶
type PodDefaultList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []PodDefault `json:"items,omitempty"` }
PodDefaultList is a list of PodDefault resources +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*PodDefaultList) DeepCopy ¶
func (in *PodDefaultList) DeepCopy() *PodDefaultList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDefaultList.
func (*PodDefaultList) DeepCopyInto ¶
func (in *PodDefaultList) DeepCopyInto(out *PodDefaultList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodDefaultList) DeepCopyObject ¶
func (in *PodDefaultList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodDefaultSpec ¶
type PodDefaultSpec struct { Template PodTemplateSpec `json:"template"` Dependencies []LocalObjectReference `json:"dependencies,omitempty"` }
PodDefaultSpec is the spec for a PodDefault resource
func (*PodDefaultSpec) DeepCopy ¶
func (in *PodDefaultSpec) DeepCopy() *PodDefaultSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDefaultSpec.
func (*PodDefaultSpec) DeepCopyInto ¶
func (in *PodDefaultSpec) DeepCopyInto(out *PodDefaultSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodTemplateSpec ¶
type PodTemplateSpec struct { ObjectMeta `json:"metadata,omitempty"` Spec corev1.PodSpec `json:"spec"` }
func (*PodTemplateSpec) DeepCopy ¶
func (in *PodTemplateSpec) DeepCopy() *PodTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTemplateSpec.
func (*PodTemplateSpec) DeepCopyInto ¶
func (in *PodTemplateSpec) DeepCopyInto(out *PodTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodTemplateSpec) PodTemplateSpec ¶
func (in *PodTemplateSpec) PodTemplateSpec() corev1.PodTemplateSpec
func (*PodTemplateSpec) StrategicMergeFrom ¶
func (in *PodTemplateSpec) StrategicMergeFrom(other PodTemplateSpec) error
type Revision ¶
type Revision struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec RevisionSpec `json:"spec"` Status RevisionStatus `json:"status,omitempty"` }
Revision is an immutable snapshot of a workload, such as a notebook. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Elected",type=boolean,JSONPath=`.spec.elected` +kubebuilder:printcolumn:name="Stopped",type=boolean,JSONPath=`.spec.stopped` +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func (*Revision) AsOwner ¶
func (r *Revision) AsOwner() metav1.OwnerReference
func (*Revision) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Revision.
func (*Revision) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Revision) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Revision) SetStopped ¶
type RevisionList ¶
type RevisionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Revision `json:"items"` }
RevisionList is a list of revision resources +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*RevisionList) DeepCopy ¶
func (in *RevisionList) DeepCopy() *RevisionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevisionList.
func (*RevisionList) DeepCopyInto ¶
func (in *RevisionList) DeepCopyInto(out *RevisionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RevisionList) DeepCopyObject ¶
func (in *RevisionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*RevisionList) Len ¶
func (in *RevisionList) Len() int
Len returns the number of items in the list.
func (*RevisionList) Less ¶
func (in *RevisionList) Less(i, j int) bool
func (*RevisionList) ReverseSort ¶
func (in *RevisionList) ReverseSort()
ReverseSort sorts the items in reverse order by creation timestamp, so the most recently created revision is first. For sorting in the other direction, use Sort.
func (*RevisionList) Revision ¶
func (in *RevisionList) Revision(i int) *Revision
func (*RevisionList) Sort ¶
func (in *RevisionList) Sort()
Sort sorts the items in order by creation timestamp, so the least recently created revision is first. For sorting in the other direction, use ReverseSort.
func (*RevisionList) Swap ¶
func (in *RevisionList) Swap(i, j int)
type RevisionSpec ¶
type RevisionSpec struct { // Elected is true is this is the current revision // should be created. // +kubebuilder:validation:Required Elected bool `json:"elected"` // Stopped is true if the workload should be stopped. The workload can be both stopped // and elected. // +kubebuilder:default=true Stopped bool `json:"stopped"` // Template is an immutable pod template that's a snapshot of the // actual runtime workload. // +kubebuilder:validation:Required Data runtime.RawExtension `json:"snapshot"` }
func (*RevisionSpec) DeepCopy ¶
func (in *RevisionSpec) DeepCopy() *RevisionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevisionSpec.
func (*RevisionSpec) DeepCopyInto ¶
func (in *RevisionSpec) DeepCopyInto(out *RevisionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RevisionStatus ¶
type RevisionStatus struct {
Ready bool `json:"ready"`
}
func (*RevisionStatus) DeepCopy ¶
func (in *RevisionStatus) DeepCopy() *RevisionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevisionStatus.
func (*RevisionStatus) DeepCopyInto ¶
func (in *RevisionStatus) DeepCopyInto(out *RevisionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Template ¶
type Template struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec TemplateSpec `json:"spec"` }
Template is a skeleton for a notebook, similar to PodDefaults, but the starting point instead of an addon. It allows an ops team to configure user's Pods before they are created rather than after. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Template) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Template.
func (*Template) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Template) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Template) Dependencies ¶
func (in *Template) Dependencies() []LocalObjectReference
func (*Template) Options ¶
func (in *Template) Options() []TemplateOption
func (*Template) PodTemplateSpec ¶
func (in *Template) PodTemplateSpec() *PodTemplateSpec
func (*Template) Required ¶
func (in *Template) Required() []corev1.LocalObjectReference
func (*Template) SetResourceRequests ¶
func (in *Template) SetResourceRequests(req corev1.ResourceList)
type TemplateList ¶
type TemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Template `json:"items,omitempty"` }
TemplateList is a list of templates +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*TemplateList) DeepCopy ¶
func (in *TemplateList) DeepCopy() *TemplateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateList.
func (*TemplateList) DeepCopyInto ¶
func (in *TemplateList) DeepCopyInto(out *TemplateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TemplateList) DeepCopyObject ¶
func (in *TemplateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TemplateOption ¶
type TemplateOption struct { // Name is an identifier for the optional configuration. The identifier must // be unique among optional configuration in a namespace Name string `json:"name"` // A Description describes what the optional configuration is and what // it does Description string `json:"description"` }
func (*TemplateOption) DeepCopy ¶
func (in *TemplateOption) DeepCopy() *TemplateOption
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateOption.
func (*TemplateOption) DeepCopyInto ¶
func (in *TemplateOption) DeepCopyInto(out *TemplateOption)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemplateReference ¶
type TemplateReference struct { Name string `json:"name"` Namespace string `json:"namespace"` ResourceVersion string `json:"resourceVersion,omitempty"` }
TemplateReference is a reference to a specific template revision, or the current revision if unspecified. ResourceVersion should be tracked for repeatability.
func (*TemplateReference) DeepCopy ¶
func (in *TemplateReference) DeepCopy() *TemplateReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateReference.
func (*TemplateReference) DeepCopyInto ¶
func (in *TemplateReference) DeepCopyInto(out *TemplateReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemplateSpec ¶
type TemplateSpec struct { // Dependencies are other resources, such as ConfigMaps, or Secrets // that are required by the Template. If the Template is referenced // in another namespace, the Dependencies will need to either be copied // to the referencing namespace, or the referencing notebook should // be rejected Dependencies []LocalObjectReference `json:"dependencies,omitempty"` // Options are configurations that can be added to the child workload, // such as an alternate python package index. Options []TemplateOption `json:"options,omitempty"` // Required are configurations that MUST be added to the child workload, // such as an alternate python package index. Required []corev1.LocalObjectReference `json:"required,omitempty"` // Template is a full pod spec which serves as the base for a // realized notebook. The notebook can optionally override a subset // of these parameters, such as resource requests, but in generally // the whole spec will be copied to Template PodTemplateSpec `json:"template"` }
func (*TemplateSpec) DeepCopy ¶
func (in *TemplateSpec) DeepCopy() *TemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateSpec.
func (*TemplateSpec) DeepCopyInto ¶
func (in *TemplateSpec) DeepCopyInto(out *TemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.