@@ -77,6 +77,7 @@ type SlurmClusterSpec struct {
7777 // SlurmConfig represents the Slurm configuration in slurm.conf. Not all options are supported.
7878 //
7979 // +kubebuilder:validation:Optional
80+ // +kubebuilder:default={defMemPerNode: 1228800, defCpuPerGPU: 16, completeWait: 5, debugFlags: "Cgroup,CPU_Bind,Gres,JobComp,Priority,Script,SelectType,Steps,TraceJobs", taskPluginParam: "Verbose", maxJobCount: 10000, minJobAge: 86400}
8081 SlurmConfig SlurmConfig `json:"slurmConfig,omitempty"`
8182}
8283
@@ -86,27 +87,39 @@ type SlurmConfig struct {
8687 //
8788 // +kubebuilder:validation:Optional
8889 // +kubebuilder:default=1228800
89- DefMemPerNode int32 `json:"defMemPerNode,omitempty"`
90+ DefMemPerNode * int32 `json:"defMemPerNode,omitempty"`
9091 // Default count of CPUs allocated per allocated GPU
9192 //
9293 // +kubebuilder:validation:Optional
9394 // +kubebuilder:default=16
94- DefCpuPerGPU int32 `json:"defCpuPerGPU,omitempty"`
95+ DefCpuPerGPU * int32 `json:"defCpuPerGPU,omitempty"`
9596 // The time to wait, in seconds, when any job is in the COMPLETING state before any additional jobs are scheduled.
9697 //
9798 // +kubebuilder:validation:Optional
9899 // +kubebuilder:default=5
99- CompleteWait int32 `json:"completeWait,omitempty"`
100+ CompleteWait * int32 `json:"completeWait,omitempty"`
100101 // Defines specific subsystems which should provide more detailed event logging.
101102 //
102103 // +kubebuilder:validation:Optional
103104 // +kubebuilder:default="Cgroup,CPU_Bind,Gres,JobComp,Priority,Script,SelectType,Steps,TraceJobs"
104105 // +kubebuilder:validation:Pattern="^((Accrue|Agent|AuditRPCs|Backfill|BackfillMap|BurstBuffer|Cgroup|ConMgr|CPU_Bind|CpuFrequency|Data|DBD_Agent|Dependency|Elasticsearch|Energy|Federation|FrontEnd|Gres|Hetjob|Gang|GLOB_SILENCE|JobAccountGather|JobComp|JobContainer|License|Network|NetworkRaw|NodeFeatures|NO_CONF_HASH|Power|Priority|Profile|Protocol|Reservation|Route|Script|SelectType|Steps|Switch|TLS|TraceJobs|Triggers)(,)?)+$"
105- DebugFlags string `json:"debugFlags,omitempty"`
106+ DebugFlags * string `json:"debugFlags,omitempty"`
107+ // Additional parameters for the task plugin
108+ //
106109 // +kubebuilder:validation:Optional
107110 // +kubebuilder:default="Verbose"
108111 // +kubebuilder:validation:Pattern="^((None|Cores|Sockets|Threads|SlurmdOffSpec|OOMKillStep|Verbose|Autobind)(,)?)+$"
109- TaskPluginParam string `json:"taskPluginParam,omitempty"`
112+ TaskPluginParam * string `json:"taskPluginParam,omitempty"`
113+ // Keep N last jobs in controller memory
114+ //
115+ // +kubebuilder:validation:Optional
116+ // +kubebuilder:default=10000
117+ MaxJobCount * int32 `json:"maxJobCount,omitempty"`
118+ // Don't remove jobs from controller memory after some time
119+ //
120+ // +kubebuilder:validation:Optional
121+ // +kubebuilder:default=86400
122+ MinJobAge * int32 `json:"minJobAge,omitempty"`
110123}
111124
112125type PartitionConfiguration struct {
@@ -547,33 +560,32 @@ type SlurmdbdConfig struct {
547560
548561type AccountingSlurmConf struct {
549562 // +kubebuilder:validation:Optional
550- AccountingStorageTRES string `json:"accountingStorageTRES,omitempty"`
563+ AccountingStorageTRES * string `json:"accountingStorageTRES,omitempty"`
551564 // +kubebuilder:validation:Optional
552- AccountingStoreFlags string `json:"accountingStoreFlags,omitempty"`
565+ AccountingStoreFlags * string `json:"accountingStoreFlags,omitempty"`
553566 // +kubebuilder:validation:Optional
554- AcctGatherInterconnectType string `json:"acctGatherInterconnectType,omitempty"`
567+ AcctGatherInterconnectType * string `json:"acctGatherInterconnectType,omitempty"`
555568 // +kubebuilder:validation:Optional
556- AcctGatherFilesystemType string `json:"acctGatherFilesystemType,omitempty"`
569+ AcctGatherFilesystemType * string `json:"acctGatherFilesystemType,omitempty"`
557570 // +kubebuilder:validation:Optional
558- AcctGatherProfileType string `json:"acctGatherProfileType,omitempty"`
571+ AcctGatherProfileType * string `json:"acctGatherProfileType,omitempty"`
559572 // +kubebuilder:validation:Optional
560573 // +kubebuilder:validation:Enum="jobacct_gather/linux";"jobacct_gather/cgroup";"jobacct_gather/none"
561- JobAcctGatherType string `json:"jobAcctGatherType,omitempty"`
574+ JobAcctGatherType * string `json:"jobAcctGatherType,omitempty"`
562575 // +kubebuilder:validation:Optional
563576 // +kubebuilder:default=30
564- JobAcctGatherFrequency int `json:"jobAcctGatherFrequency,omitempty"`
577+ JobAcctGatherFrequency * int `json:"jobAcctGatherFrequency,omitempty"`
565578 // +kubebuilder:validation:Optional
566579 // +kubebuilder:validation:Enum="NoShared";"UsePss";"OverMemoryKill";"DisableGPUAcct"
567- JobAcctGatherParams string `json:"jobAcctGatherParams,omitempty"`
580+ JobAcctGatherParams * string `json:"jobAcctGatherParams,omitempty"`
568581 // +kubebuilder:validation:Optional
569582 // +kubebuilder:default=0
570- PriorityWeightAge int16 `json:"priorityWeightAge,omitempty"`
583+ PriorityWeightAge * int16 `json:"priorityWeightAge,omitempty"`
571584 // +kubebuilder:validation:Optional
572585 // +kubebuilder:default=0
573- PriorityWeightFairshare int16 `json:"priorityWeightFairshare,omitempty"`
586+ PriorityWeightFairshare * int16 `json:"priorityWeightFairshare,omitempty"`
574587 // +kubebuilder:validation:Optional
575- // +kubebuilder:default=0
576- PriorityWeightTRES int16 `json:"priorityWeightTRES,omitempty"`
588+ PriorityWeightTRES * string `json:"priorityWeightTRES,omitempty"`
577589}
578590
579591// SlurmNodeController defines the configuration for the Slurm controller node
@@ -645,6 +657,12 @@ type SlurmNodeWorker struct {
645657 // +kubebuilder:validation:Optional
646658 // +kubebuilder:default=false
647659 EnableGDRCopy bool `json:"enableGDRCopy,omitempty"`
660+
661+ // SlurmNodeExtra defines the string that will be set to the "Extra" field of the corresponding Slurm node. It can
662+ // use any environment variables that are available in the slurmd container when it starts.
663+ //
664+ // +kubebuilder:validation:Optional
665+ SlurmNodeExtra string `json:"slurmNodeExtra,omitempty"`
648666}
649667
650668// SlurmNodeWorkerVolumes defines the volumes for the Slurm worker node
0 commit comments