slurm

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorkloadStatusPending   string = "Pending"
	WorkloadStatusRunning   string = "Running"
	WorkloadStatusCompleted string = "Completed"
	WorkloadStatusFailed    string = "Failed"
	WorkloadStatusUnknown   string = "Unknown"
)
View Source
const (
	ConflictRetryIntervalSec int64 = 1
)

Variables

This section is empty.

Functions

func ConfigMapDelete

func ConfigMapDelete(client kubernetes.Interface, name, namespace string) error

ConfigMapDelete deletes configmap if it exists

func ConfigMapExists

func ConfigMapExists(client kubernetes.Interface, name, namespace string) bool

ConfigMapExists returns true if the configmap exists

func CreateSlurm

func CreateSlurm(client kubernetes.Interface, wl *v1s.Slik) error

CreateSlurm launches a slurm cluster on the k8s cluster

func DaemonSetDelete

func DaemonSetDelete(client kubernetes.Interface, name, namespace string) error

DaemonSetDelete deletes DaemonSet if it exists

func DaemonSetExists

func DaemonSetExists(client kubernetes.Interface, name, namespace string) bool

DaemonSetExists returns true if the daemonset exists

func DeploymentDelete

func DeploymentDelete(client kubernetes.Interface, name, namespace string) error

DeploymentDelete deletes deployment if it exists

func DeploymentExists

func DeploymentExists(client kubernetes.Interface, name, namespace string) bool

DeploymentExists returns true if the deployment exists

func GetAllNodes

func GetAllNodes(client kubernetes.Interface) (*v1.NodeList, error)

GetAllNodes returns all nodes

func GetConfigMap

func GetConfigMap(client kubernetes.Interface, name, namespace string) (*v1.ConfigMap, error)

GetConfigMap returns the configmap if it exists

func GetDaemonSet

func GetDaemonSet(client kubernetes.Interface, name, namespace string) (*appsv1.DaemonSet, error)

GetDaemonSet returns the daemonset if it exists

func GetDeployment

func GetDeployment(client kubernetes.Interface, name, namespace string) (*appsv1.Deployment, error)

GetDeployment returns the deployment if it exists

func GetDeploymentStatus

func GetDeploymentStatus(client kubernetes.Interface, name, namespace string) string

GetDeploymentStatus returns the job status

func GetNamespace

func GetNamespace(client kubernetes.Interface, namespace string) (*v1.Namespace, error)

GetNamespace returns the namespace if it exists

func GetNode

func GetNode(client kubernetes.Interface, name string) (*v1.Node, error)

GetNode gets a node

func GetPod

func GetPod(client kubernetes.Interface, name, namespace string) (*v1.Pod, error)

GetPod returns the pod if it exists

func GetPodStatus

func GetPodStatus(client kubernetes.Interface, name, namespace string) string

GetPodStatus returns the job status

func GetService

func GetService(client kubernetes.Interface, name, namespace string) (*v1.Service, error)

GetService returns the service if it exists

func GetStatefulSet

func GetStatefulSet(client kubernetes.Interface, name, namespace string) (*appsv1.StatefulSet, error)

GetStatefulSet returns the statefulset if it exists

func NamespaceDelete

func NamespaceDelete(client kubernetes.Interface, namespace string) error

NamespaceDelete deletes namespace if it exists

func NamespaceExists

func NamespaceExists(client kubernetes.Interface, namespace string) bool

NamespaceExists returns true if the namespace exists

func PodExists

func PodExists(client kubernetes.Interface, name, namespace string) bool

PodExists returns true if post exists

func ServiceDelete

func ServiceDelete(client kubernetes.Interface, name, namespace string) error

ServiceDelete deletes deployment if it exists

func ServiceExists

func ServiceExists(client kubernetes.Interface, name, namespace string) bool

ServiceExists returns true if the service exists

func SlurmDelete

func SlurmDelete(client kubernetes.Interface, name, namespace string) error

SlurmDelete deletes slurm

func SlurmExists

func SlurmExists(client kubernetes.Interface, name, namespace string) bool

SlurmExists returns true if the workload exists

func StatefulSetDelete

func StatefulSetDelete(client kubernetes.Interface, name, namespace string) error

StatefulSetDelete deletes statefulset if it exists

func StatefulsetExists

func StatefulsetExists(client kubernetes.Interface, name, namespace string) bool

StatefulsetExists returns true if the statefulset exists

func UpdateNode

func UpdateNode(client kubernetes.Interface, node *v1.Node) error

UpdateNode updates a node

func WaitForConfigMap

func WaitForConfigMap(client kubernetes.Interface, name, namespace string)

WaitForConfigMap waits for configmap to exist before returning

Types

type SlurmConf

type SlurmConf struct {
	SlikName string

	SlurmdNodes []SlurmdNode
	Slurmdbd    bool
}

SlurmConf configuration for generation of slurm.conf

func NewSlurmConf

func NewSlurmConf(client kubernetes.Interface, wl *v1s.Slik) (*SlurmConf, error)

NewSlurmConf bilds SlurmConf for templating out slurm.conf

type SlurmdNode

type SlurmdNode struct {
	NodeName       string
	CPUs           int
	ThreadsPerCore int
	RealMemory     int
}

SlurmdNode for generation of the nodes section in slurm.conf

type SlurmdbConf

type SlurmdbConf struct {
	SlikName string

	User string
	Pass string
}

SlurmdbConf slurmdb conf

func NewSlurmdbdConf

func NewSlurmdbdConf(client kubernetes.Interface, wl *v1s.Slik) (*SlurmdbConf, error)

NewSlurmdbdConf bilds SlurmdbConf for templating out slurmdb.conf

Jump to

Keyboard shortcuts

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