v1alpha1

package
v0.0.0-...-5c7f640 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=flux-framework.org

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "flux-framework.org", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Commands

type Commands struct {

	// Init runs before anything in both scripts
	// +optional
	Init string `json:"init,omitempty"`
}

ContainerResources include limits and requests

func (*Commands) DeepCopy

func (in *Commands) DeepCopy() *Commands

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

func (*Commands) DeepCopyInto

func (in *Commands) DeepCopyInto(out *Commands)

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

type ExistingVolume

type ExistingVolume struct {

	// Path and claim name are always required if a secret isn't defined
	// +optional
	Path string `json:"path,omitempty"`

	// Config map name if the existing volume is a config map
	// You should also define items if you are using this
	// +optional
	ConfigMapName string `json:"configMapName,omitempty"`

	// Items (key and paths) for the config map
	// +optional
	Items map[string]string `json:"items"`

	// Claim name if the existing volume is a PVC
	// +optional
	ClaimName string `json:"claimName,omitempty"`

	// An existing secret
	// +optional
	SecretName string `json:"secretName,omitempty"`

	// +kubebuilder:default=false
	// +default=false
	// +optional
	ReadOnly bool `json:"readOnly,omitempty"`
}

Existing volumes available to mount

func (*ExistingVolume) DeepCopy

func (in *ExistingVolume) DeepCopy() *ExistingVolume

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

func (*ExistingVolume) DeepCopyInto

func (in *ExistingVolume) DeepCopyInto(out *ExistingVolume)

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

type Hyperqueue

type Hyperqueue struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   HyperqueueSpec   `json:"spec,omitempty"`
	Status HyperqueueStatus `json:"status,omitempty"`
}

Hyperqueue is the Schema for the Hyperqueues API

func (*Hyperqueue) DeepCopy

func (in *Hyperqueue) DeepCopy() *Hyperqueue

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

func (*Hyperqueue) DeepCopyInto

func (in *Hyperqueue) DeepCopyInto(out *Hyperqueue)

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

func (*Hyperqueue) DeepCopyObject

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

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

func (*Hyperqueue) ExistingContainerVolumes

func (hq *Hyperqueue) ExistingContainerVolumes() map[string]ExistingVolume

Get unique existing volumes across nodes

func (*Hyperqueue) Validate

func (hq *Hyperqueue) Validate() bool

Validate the Hyperqueue

func (*Hyperqueue) WorkerNode

func (hq *Hyperqueue) WorkerNode() Node

WorkerNode returns the worker node (if defined) or falls back to the server

func (*Hyperqueue) WorkerNodes

func (hq *Hyperqueue) WorkerNodes() int32

WorkerNodes returns the number of worker nodes At this point we've already validated size is >= 1

type HyperqueueList

type HyperqueueList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Hyperqueue `json:"items"`
}

HyperqueueList contains a list of Hyperqueue

func (*HyperqueueList) DeepCopy

func (in *HyperqueueList) DeepCopy() *HyperqueueList

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

func (*HyperqueueList) DeepCopyInto

func (in *HyperqueueList) DeepCopyInto(out *HyperqueueList)

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

func (*HyperqueueList) DeepCopyObject

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

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

type HyperqueueSpec

type HyperqueueSpec struct {

	// Server is the main server to run Hyperqueue
	Server Node `json:"server"`

	// Name for the cluster service
	//+optional
	ServiceName string `json:"serviceName"`

	// Worker is the worker node spec
	// Defaults to be same spec as the server
	//+optional
	Worker Node `json:"worker"`

	// If launching a job, control the spec here
	//+optional
	Job Job `json:"job"`

	// Release of Hyperqueue to installed (if hq binary not found in PATH)
	// +kubebuilder:default="0.16.0"
	// +default="0.16.0"
	// +optional
	HyperqueueVersion string `json:"hyperqueueVersion,omitempty"`

	// Size of the Hyperqueue (1 server + (N-1) nodes)
	Size int32 `json:"size"`

	// Global commands to run on all nodes
	// +optional
	Commands Commands `json:"commands,omitempty"`

	// Interactive mode keeps the cluster running
	// +optional
	Interactive bool `json:"interactive"`

	// Time limit for the job
	// Approximately one year. This cannot be zero or job won't start
	// +kubebuilder:default=31500000
	// +default=31500000
	// +optional
	DeadlineSeconds int64 `json:"deadlineSeconds,omitempty"`

	// Resources include limits and requests
	// +optional
	Resources Resource `json:"resources"`
}

HyperqueueSpec defines the desired state of Hyperqueue

func (*HyperqueueSpec) DeepCopy

func (in *HyperqueueSpec) DeepCopy() *HyperqueueSpec

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

func (*HyperqueueSpec) DeepCopyInto

func (in *HyperqueueSpec) DeepCopyInto(out *HyperqueueSpec)

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

type HyperqueueStatus

type HyperqueueStatus struct{}

HyperqueueStatus defines the observed state of Hyperqueue

func (*HyperqueueStatus) DeepCopy

func (in *HyperqueueStatus) DeepCopy() *HyperqueueStatus

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

func (*HyperqueueStatus) DeepCopyInto

func (in *HyperqueueStatus) DeepCopyInto(out *HyperqueueStatus)

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

type Job

type Job struct {

	// Nodes for the job (defaults to 0 for 1)
	// +optional
	Nodes int64 `json:"nodes"`

	// Name for the job
	// +optional
	Name string `json:"name"`

	// Name for the log file
	// +optional
	Log string `json:"log"`
}

func (*Job) DeepCopy

func (in *Job) DeepCopy() *Job

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

func (*Job) DeepCopyInto

func (in *Job) DeepCopyInto(out *Job)

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

type Node

type Node struct {

	// Image to use for Hyperqueue
	// +kubebuilder:default="ubuntu"
	// +default="ubuntu"
	// +optional
	Image string `json:"image"`

	// Existing Volumes to add to the containers
	// +optional
	ExistingVolumes map[string]ExistingVolume `json:"existingVolumes"`

	// Port for Hyperqueue to use.
	// Since we have a headless service, this
	// is not represented in the operator, just
	// in starting the server or a worker
	// +optional
	Port int32 `json:"port"`

	// Resources include limits and requests
	// +optional
	Resources Resources `json:"resources"`

	// PullSecret for the node, if needed
	// +optional
	PullSecret string `json:"pullSecret"`

	// Command will be honored by a server node
	// +optional
	Command string `json:"command,omitempty"`

	// Commands to run around different parts of the hyperqueue setup
	// +optional
	Commands Commands `json:"commands,omitempty"`

	// Working directory
	// +optional
	WorkingDir string `json:"workingDir,omitempty"`

	// PullAlways will always pull the container
	// +optional
	PullAlways bool `json:"pullAlways"`

	// Ports to be exposed to other containers in the cluster
	// We take a single list of integers and map to the same
	// +optional
	// +listType=atomic
	Ports []int32 `json:"ports"`

	// Key/value pairs for the environment
	// +optional
	Environment map[string]string `json:"environment"`
}

Node corresponds to a pod (server or worker)

func (*Node) DeepCopy

func (in *Node) DeepCopy() *Node

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

func (*Node) DeepCopyInto

func (in *Node) DeepCopyInto(out *Node)

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

type Resource

type Resource map[string]intstr.IntOrString

func (Resource) DeepCopy

func (in Resource) DeepCopy() Resource

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

func (Resource) DeepCopyInto

func (in Resource) DeepCopyInto(out *Resource)

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

type Resources

type Resources struct {

	// +optional
	Limits Resource `json:"limits"`

	// +optional
	Requests Resource `json:"requests"`
}

ContainerResources include limits and requests

func (*Resources) DeepCopy

func (in *Resources) DeepCopy() *Resources

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

func (*Resources) DeepCopyInto

func (in *Resources) DeepCopyInto(out *Resources)

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