v1beta1

package
v0.0.0-...-1c7d887 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package v1beta1 defines the api types for the notebook provisioner. +kubebuilder:object:generate=true +groupName=jackhoman.dev

Index

Constants

View Source
const (
	NotebookPhaseRunning = "Running"
	NotebookPhaseStopped = "Stopped"
)
View Source
const (
	GroupName = "jackhoman.dev"
	Version   = "v1beta1"
)
View Source
const (
	UpdatePolicyAuto   = "Auto"
	UpdatePolicyIgnore = "Ignore"
)
View Source
const (
	ErrDuplicateTaskName = "duplicate task name"
)

Variables

View Source
var (
	GroupVersion  = schema.GroupVersion{Group: GroupName, Version: Version}
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
	AddToScheme   = SchemeBuilder.AddToScheme
)

Functions

func ValidateDag

func ValidateDag(dag *Dag) error

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

func (in *Dag) DeepCopy() *Dag

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dag.

func (*Dag) DeepCopyInto

func (in *Dag) DeepCopyInto(out *Dag)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Dag) DeepCopyObject

func (in *Dag) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Dag) Default

func (dag *Dag) Default()

func (*Dag) Entrypoint

func (dag *Dag) Entrypoint() DagTask

Entrypoint returns the entrypoint task in the Dag

func (*Dag) TaskMap

func (dag *Dag) TaskMap() map[string]DagTask

TaskMap returns a mapping of task names to task specs

func (*Dag) ValidateCreate

func (dag *Dag) ValidateCreate() (warnings admission.Warnings, err error)

func (*Dag) ValidateDelete

func (dag *Dag) ValidateDelete() (warnings admission.Warnings, err error)

func (*Dag) ValidateUpdate

func (dag *Dag) ValidateUpdate(old runtime.Object) (warnings admission.Warnings, err error)

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

func (in *DagList) DeepCopy() *DagList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DagList.

func (*DagList) DeepCopyInto

func (in *DagList) DeepCopyInto(out *DagList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DagList) DeepCopyObject

func (in *DagList) DeepCopyObject() runtime.Object

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

func (in *DagSpec) DeepCopy() *DagSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DagSpec.

func (*DagSpec) DeepCopyInto

func (in *DagSpec) DeepCopyInto(out *DagSpec)

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

func (in *DagTask) DeepCopy() *DagTask

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DagTask.

func (*DagTask) DeepCopyInto

func (in *DagTask) DeepCopyInto(out *DagTask)

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) GetName

func (in *DagTask) GetName() string

func (*DagTask) HasDependencies

func (in *DagTask) HasDependencies() bool

func (*DagTask) HistoryLimit

func (in *DagTask) HistoryLimit() int

func (*DagTask) ResourceRequests

func (in *DagTask) ResourceRequests() corev1.ResourceList

func (*DagTask) TemplateRef

func (in *DagTask) TemplateRef() types.NamespacedName

func (*DagTask) UpdatePolicy

func (in *DagTask) UpdatePolicy() string

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

func (in *Execution) DeepCopy() *Execution

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Execution.

func (*Execution) DeepCopyInto

func (in *Execution) DeepCopyInto(out *Execution)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Execution) DeepCopyObject

func (in *Execution) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Execution) MaxConcurrentTasks

func (e *Execution) MaxConcurrentTasks() int

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

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) Adopt

func (nb *Notebook) Adopt(obj Orphan)

func (*Notebook) AsOwner

func (nb *Notebook) AsOwner() metav1.OwnerReference

func (*Notebook) DeepCopy

func (in *Notebook) DeepCopy() *Notebook

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Notebook.

func (*Notebook) DeepCopyInto

func (in *Notebook) DeepCopyInto(out *Notebook)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Notebook) DeepCopyObject

func (in *Notebook) DeepCopyObject() runtime.Object

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 (nb *Notebook) HasUpdatePolicy() bool

func (*Notebook) HistoryLimit

func (nb *Notebook) HistoryLimit() int

func (*Notebook) ResourceRequests

func (nb *Notebook) ResourceRequests() corev1.ResourceList

func (*Notebook) SetUpdatePolicy

func (nb *Notebook) SetUpdatePolicy(up string)

func (*Notebook) Stopped

func (nb *Notebook) Stopped() bool

func (*Notebook) TemplateRef

func (nb *Notebook) TemplateRef() types.NamespacedName

func (*Notebook) UpdatePolicy

func (nb *Notebook) UpdatePolicy() string

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

func (in *Revision) DeepCopy() *Revision

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Revision.

func (*Revision) DeepCopyInto

func (in *Revision) DeepCopyInto(out *Revision)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Revision) DeepCopyObject

func (in *Revision) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Revision) Elect

func (r *Revision) Elect()

func (*Revision) Elected

func (r *Revision) Elected() bool

func (*Revision) GetData

func (r *Revision) GetData() []byte

func (*Revision) Hash

func (r *Revision) Hash() string

func (*Revision) Less

func (r *Revision) Less(other *Revision) bool

func (*Revision) Recall

func (r *Revision) Recall()

func (*Revision) SetData

func (r *Revision) SetData(raw []byte)

func (*Revision) SetStopped

func (r *Revision) SetStopped(stopped bool)

func (*Revision) Stop

func (r *Revision) Stop()

func (*Revision) Stopped

func (r *Revision) Stopped() bool

func (*Revision) Sum

func (r *Revision) Sum() string

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

func (in *Template) DeepCopy() *Template

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Template.

func (*Template) DeepCopyInto

func (in *Template) DeepCopyInto(out *Template)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Template) DeepCopyObject

func (in *Template) DeepCopyObject() runtime.Object

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.

Jump to

Keyboard shortcuts

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