Skip to content

Commit

Permalink
update: slurm operator for jobset 0.7.0
Browse files Browse the repository at this point in the history
The operator has not been updated since JobSet 0.2.0,
wow! I am going to do some comparison with flux soon
and this is well due.

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Nov 3, 2024
1 parent a5886b6 commit 4684657
Show file tree
Hide file tree
Showing 12 changed files with 1,114 additions and 246 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.20 as builder
FROM golang:1.23 as builder
ARG TARGETOS
ARG TARGETARCH

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ list:

## Tool Versions
KUSTOMIZE_VERSION ?= v3.8.7
CONTROLLER_TOOLS_VERSION ?= v0.11.1
CONTROLLER_TOOLS_VERSION ?= v0.14.0

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha1/slurm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ type SlurmSpec struct {
DeployDatabase bool `json:"deployDatabase"`

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

// Release of slurm to installed (if sbinary not found in PATH)
Expand Down
1 change: 0 additions & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 36 additions & 24 deletions config/crd/bases/flux-framework.org_slurms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.14.0
name: slurms.flux-framework.org
spec:
group: flux-framework.org
Expand All @@ -21,14 +20,19 @@ spec:
description: Slurm is the Schema for the slurms API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand Down Expand Up @@ -62,7 +66,8 @@ spec:
description: Image to use for slurm
type: string
ports:
description: Ports to be exposed to other containers in the cluster
description: |-
Ports to be exposed to other containers in the cluster
We take a single list of integers and map to the same
items:
format: int32
Expand Down Expand Up @@ -107,19 +112,23 @@ spec:
environment:
additionalProperties:
type: string
description: 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!
description: |-
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!
type: object
host:
description: Custom database host This should only be set if you
are deploying your own database and DeployDatabase is false
description: |-
Custom database host
This should only be set if you are deploying your own database
and DeployDatabase is false
type: string
image:
default: mariadb:10.10
description: Image to use for the database We assume we don't
need to tweak the command
description: |-
Image to use for the database
We assume we don't need to tweak the command
type: string
password:
default: password
Expand All @@ -135,8 +144,9 @@ spec:
type: object
deadlineSeconds:
default: 31500000
description: Time limit for the job Approximately one year. This cannot
be zero or job won't start
description: |-
Time limit for the job
Approximately one year. This cannot be zero or job won't start
format: int64
type: integer
deployDatabase:
Expand Down Expand Up @@ -179,7 +189,8 @@ spec:
description: Image to use for slurm
type: string
ports:
description: Ports to be exposed to other containers in the cluster
description: |-
Ports to be exposed to other containers in the cluster
We take a single list of integers and map to the same
items:
format: int32
Expand Down Expand Up @@ -232,8 +243,9 @@ spec:
PATH)
type: string
worker:
description: Worker is the worker node spec, does not include login
slurmctl or slurmdbd Defaults to be same spec as the server
description: |-
Worker is the worker node spec, does not include login slurmctl or slurmdbd
Defaults to be same spec as the server
properties:
command:
description: Command will be honored by a server node
Expand All @@ -255,7 +267,8 @@ spec:
description: Image to use for slurm
type: string
ports:
description: Ports to be exposed to other containers in the cluster
description: |-
Ports to be exposed to other containers in the cluster
We take a single list of integers and map to the same
items:
format: int32
Expand Down Expand Up @@ -291,7 +304,6 @@ spec:
type: string
type: object
required:
- network
- node
- size
type: object
Expand Down
1 change: 0 additions & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
Expand Down
Loading

0 comments on commit 4684657

Please sign in to comment.