v1alpha1

package
v0.0.0-...-a5886b6 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 8 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 Database

type Database struct {

	// Image to use for the database
	// We assume we don't need to tweak the command
	// +kubebuilder:default="mariadb:10.10"
	// +default="mariadb:10.10"
	// +optional
	Image string `json:"image"`

	// Default Environment, will be set if not defined here
	// Note that by defalt we set MYSQL_* envars.
	// If you use a different database, be sure to set them all
	// Username and password are set separately below!
	// +optional
	Environment map[string]string `json:"environment"`

	// Database user
	// +kubebuilder:default="slurm"
	// +default="slurm"
	// +optional
	User string `json:"user"`

	// Custom database host
	// This should only be set if you are deploying your own database
	// and DeployDatabase is false
	// +optional
	Host string `json:"host"`

	// Database password
	// +kubebuilder:default="password"
	// +default="password"
	// +optional
	Password string `json:"password"`

	// Name of the database
	// +kubebuilder:default="slurm_acct_db"
	// +default="slurm_acct_db"
	// +optional
	DatabaseName string `json:"databaseName"`

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

Database corresponds to the slurm database to use

func (*Database) DeepCopy

func (in *Database) DeepCopy() *Database

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

func (*Database) DeepCopyInto

func (in *Database) DeepCopyInto(out *Database)

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

type Network

type Network struct {

	// Selector name for network
	// +optional
	Selector string `json:"selector"`

	// Service name (e.g., helpful if already exists)
	// +optional
	ServiceName string `json:"serviceName"`
}

func (*Network) DeepCopy

func (in *Network) DeepCopy() *Network

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

func (*Network) DeepCopyInto

func (in *Network) DeepCopyInto(out *Network)

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 slurm
	// +kubebuilder:default="ghcr.io/converged-computing/slurm"
	// +default="ghcr.io/converged-computing/slurm"
	// +optional
	Image string `json:"image"`

	// 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 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.

type Slurm

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

	Spec   SlurmSpec   `json:"spec,omitempty"`
	Status SlurmStatus `json:"status,omitempty"`
}

Slurm is the Schema for the slurms API

func (*Slurm) Daemon

func (s *Slurm) Daemon() Node

Daemon falls back to the login node configuatino

func (*Slurm) DeepCopy

func (in *Slurm) DeepCopy() *Slurm

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

func (*Slurm) DeepCopyInto

func (in *Slurm) DeepCopyInto(out *Slurm)

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

func (*Slurm) DeepCopyObject

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

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

func (*Slurm) SelectorName

func (s *Slurm) SelectorName() string

SelectorName determines the name for the selector for the headless service

func (*Slurm) ServiceName

func (s *Slurm) ServiceName() string

ServiceName is the service name for the headless service :)

func (*Slurm) Validate

func (s *Slurm) Validate() bool

Validate the slurm

func (*Slurm) WorkerNode

func (s *Slurm) WorkerNode() Node

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

func (*Slurm) WorkerNodes

func (s *Slurm) WorkerNodes() int32

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

type SlurmList

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

slurmList contains a list of slurm

func (*SlurmList) DeepCopy

func (in *SlurmList) DeepCopy() *SlurmList

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

func (*SlurmList) DeepCopyInto

func (in *SlurmList) DeepCopyInto(out *SlurmList)

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

func (*SlurmList) DeepCopyObject

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

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

type SlurmSpec

type SlurmSpec struct {

	// The generic login node
	Node Node `json:"node"`

	// Name of the cluster
	// +kubebuilder:default="linux"
	// +default="linux"
	// +optional
	ClusterName string `json:"clusterName"`

	// Slurm dbd "daemon"
	// +optional
	Daemon Node `json:"daemon"`

	// Worker is the worker node spec, does not include login slurmctl or slurmdbd
	// Defaults to be same spec as the server
	// +optional
	Worker Node `json:"worker"`

	// Database is the database service spec
	//+optional
	Database Database `json:"database"`

	// Deploy the database (or not)
	// +kubebuilder:default=true
	// +default=true
	// +optional
	DeployDatabase bool `json:"deployDatabase"`

	// Network options (service name and selector)
	Network Network `json:"network"`

	// Release of slurm to installed (if sbinary not found in PATH)
	// +kubebuilder:default="19.05.2"
	// +default="19.05.2"
	// +optional
	SlurmVersion string `json:"slurmVersion,omitempty"`

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

	// 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"`
}

SlurmSpec defines the desired state of slurm

func (*SlurmSpec) DeepCopy

func (in *SlurmSpec) DeepCopy() *SlurmSpec

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

func (*SlurmSpec) DeepCopyInto

func (in *SlurmSpec) DeepCopyInto(out *SlurmSpec)

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

type SlurmStatus

type SlurmStatus struct{}

SlurmStatus defines the observed state of slurm

func (*SlurmStatus) DeepCopy

func (in *SlurmStatus) DeepCopy() *SlurmStatus

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

func (*SlurmStatus) DeepCopyInto

func (in *SlurmStatus) DeepCopyInto(out *SlurmStatus)

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