v1

package
v0.0.0-...-53eff13 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1 is the v1 version of the API. +groupName=jupyter

Index

Constants

View Source
const (
	// NotebookKind is the API kind for the notebook resource.
	NotebookKind = "Notebook"
	// NotebookPlural is the plural name for the notebook resource.
	NotebookPlural = "notebooks"
)
View Source
const GroupName = "jupyter.squat.ai"

GroupName is the group name used in this package.

Variables

View Source
var (
	// SchemeBuilder exposes an API scheme builder for this API version.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme exposes an AddToScheme func for this API version.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var NotebookName = NotebookPlural + "." + GroupName

NotebookName is the notebook resource's FQDN.

View Source
var NotebookShortNames = []string{"nb", "notebook"}

NotebookShortNames are convenient shortnames for the notebook resource.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}

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 Notebook

type Notebook struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object’s metadata. More info:
	// https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata
	// +k8s:openapi-gen=false
	metav1.ObjectMeta `json:"metadata"`
	// Specification of the desired behavior of the Jupyter Notebook. More info:
	// https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status
	Spec NotebookSpec `json:"spec"`
	// Most recent observed status of the Jupyter Notebook. Read-only. More info:
	// https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status
	Status NotebookStatus `json:"status,omitempty"`
}

Notebook is a Jupyter notebook instance that is run as a pod. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +k8s:openapi-gen=true

func (*Notebook) AsOwner

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

AsOwner creates a new owner reference for the notebook to apply to dependent resource.

func (*Notebook) Copy

func (n *Notebook) Copy() *Notebook

Copy creates a deep copy of the notebook.

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

func (n *Notebook) SetDefaults() bool

SetDefaults applies default values to the receiver Notebook.

func (*Notebook) Validate

func (n *Notebook) Validate() error

Validate ensures that all the fields of a notebook's spec are valid.

type NotebookFlavor

type NotebookFlavor string

NotebookFlavor is the type of official Jupyter image to use It is the "X" in "jupyter/X-notebook". For descriptions of valid images, see: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html.

const (
	// NotebookFlavorBase is the most basic type of notebook.
	// See: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#jupyter-base-notebook.
	NotebookFlavorBase NotebookFlavor = "base"
	// NotebookFlavorMinimal adds command line tools useful when working in Jupyter applications.
	// See: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#jupyter-minimal-notebook.
	NotebookFlavorMinimal NotebookFlavor = "minimal"
	// NotebookFlavorR includes popular packages from the R ecosystem.
	// See: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#jupyter-minimal-notebook.
	NotebookFlavorR NotebookFlavor = "r"
	// NotebookFlavorScipy includes popular packages from the scientific Python ecosystem.
	// See: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#jupyter-scipy-notebook
	NotebookFlavorScipy NotebookFlavor = "scipy"
	// NotebookFlavorTensorFlow includes popular Python deep learning libraries.
	// See: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#jupyter-tensorflow-notebook
	NotebookFlavorTensorFlow NotebookFlavor = "tensorflow"
	// NotebookFlavorDataScience includes includes libraries for data analysis from the Julia, Python, and R communities.
	// See: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#jupyter-datascience-notebook
	NotebookFlavorDataScience NotebookFlavor = "datascience"
	// NotebookFlavorPyspark includes Python support for Apache Spark, optionally on Mesos.
	// See: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#jupyter-pyspark-notebook
	NotebookFlavorPyspark NotebookFlavor = "pyspark"
	// NotebookFlavorAllSpark includes Python, R, and Scala support for Apache Spark, optionally on Mesos.
	// See: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#jupyter-all-spark-notebook
	NotebookFlavorAllSpark NotebookFlavor = "all-spark"
)

type NotebookList

type NotebookList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	// List of notebooks.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md
	Items []Notebook `json:"items"`
}

NotebookList is a list of notebooks.

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 NotebookPhase

type NotebookPhase string

NotebookPhase is a label for the condition of a notebook at the current time.

const (
	// NotebookPhasePending means that the notebook has been accepted and validated
	// but not all the resources are ready.
	NotebookPhasePending NotebookPhase = "Pending"
	// NotebookPhaseRunning means that all the notebook resources are ready.
	NotebookPhaseRunning NotebookPhase = "Running"
	// NotebookPhaseUnknown means that for some reason the state of the notebook
	// could not be determined.
	NotebookPhaseUnknown NotebookPhase = "Unknown"
	// NotebookPhaseFailed means that the system was unable to create at least one
	// of the notebook's resources.
	NotebookPhaseFailed NotebookPhase = "Failed"
)

type NotebookSpec

type NotebookSpec struct {
	// Flavor is the type of official Jupyter image to use
	// for the notebook pod. It is the "X" in "jupyter/X-notebook".
	// Defaults to "minimal". For descriptions of valid images, see:
	// https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html.
	// +optional
	Flavor *NotebookFlavor `json:"flavor,omitempty"`
	// Whether or not to add a GPU resource to the notebook pod.
	GPU bool `json:"gpu"`
	// Host to set on the notebook ingress resource.
	// If no host is provided, no ingress will be created.
	// +optional
	Host *string `json:"host,omitempty"`
	// Ingress backend to use for the notebook ingress resource.
	// Defaults to the notebook service created by the operator.
	// +optional
	Ingress *extensionsv1beta1.IngressBackend `json:"ingress,omitempty"`
	// Packages is a list of additional packages that should be installed
	// on the notebook via "conda install".
	// +optional
	Packages []string `json:"packages,omitempty"`
	// Password to use to access the notebook.
	// +optional
	Password *string `json:"password,omitempty"`
	// ServiceAccountName assigns a Kubernetes ServiceAccount to the Notebook.
	// +optional
	ServiceAccountName *string `json:"serviceAccountName,omitempty"`
	// TLS strategy to use. Must be "false", "acme", or "self-signed".
	// Defaults to "self-signed".
	// +optional
	TLS *NotebookTLS `json:"tls,omitempty"`
}

NotebookSpec is the description and configuration of a notebook. +k8s:openapi-gen=true

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 {
	// The generation observed by the controller.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Phase contains the current NotebookPhase of the notebook.
	Phase NotebookPhase `json:"phase"`
}

NotebookStatus describes the current status of the notebook resource. +k8s:openapi-gen=true

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 NotebookTLS

type NotebookTLS string

NotebookTLS defines the notebook's TLS strategy.

const (
	// NotebookTLSSelfSigned means that the notebook server will serve HTTP over TLS using
	// certificates signed by the controller. Ingress to the notebook will terminate TLS at
	// notebook and not at the ingress controller.
	// This is the default TLS strategy.
	NotebookTLSSelfSigned NotebookTLS = "self-signed"
	// NotebookTLSAcme means that the notebook server will serve HTTP over TLS using
	// certificates signed by the controller. The ingress resource will be annotated with
	// kubernetes.io/tls-acme=true and the ingress controller will terminate TLS
	// using certificates generated via LetsEncrypt. This requires kube-lego or an equivalent.
	NotebookTLSAcme NotebookTLS = "acme"
	// NotebookTLSNone means that the notebook server will serve plain HTTP with no encryption.
	// The ingress resource will not have a TLS entry so the notebook will only be accessible over HTTP.
	NotebookTLSNone NotebookTLS = "none"
)

Jump to

Keyboard shortcuts

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