@@ -836,15 +836,15 @@ highestExitCode=0
836
836
// Generate probe cleanup script first if any probes exist
837
837
var hasProbes bool
838
838
for _ , containerCommand := range commands {
839
- if len (containerCommand .readinessProbes ) > 0 || len (containerCommand .livenessProbes ) > 0 {
839
+ if len (containerCommand .readinessProbes ) > 0 || len (containerCommand .livenessProbes ) > 0 || len ( containerCommand . startupProbes ) > 0 {
840
840
hasProbes = true
841
841
break
842
842
}
843
843
}
844
844
if hasProbes && config .EnableProbes {
845
845
for _ , containerCommand := range commands {
846
- if len (containerCommand .readinessProbes ) > 0 || len (containerCommand .livenessProbes ) > 0 {
847
- cleanupScript := generateProbeCleanupScript (containerCommand .containerName , containerCommand .readinessProbes , containerCommand .livenessProbes )
846
+ if len (containerCommand .readinessProbes ) > 0 || len (containerCommand .livenessProbes ) > 0 || len ( containerCommand . startupProbes ) > 0 {
847
+ cleanupScript := generateProbeCleanupScript (containerCommand .containerName , containerCommand .readinessProbes , containerCommand .livenessProbes , containerCommand . startupProbes )
848
848
stringToBeWritten .WriteString (cleanupScript )
849
849
break // Only need one cleanup script
850
850
}
@@ -898,7 +898,7 @@ highestExitCode=0
898
898
}
899
899
900
900
// Generate probe scripts if enabled and not an init container
901
- if config .EnableProbes && ! containerCommand .isInitContainer && (len (containerCommand .readinessProbes ) > 0 || len (containerCommand .livenessProbes ) > 0 ) {
901
+ if config .EnableProbes && ! containerCommand .isInitContainer && (len (containerCommand .readinessProbes ) > 0 || len (containerCommand .livenessProbes ) > 0 || len ( containerCommand . startupProbes ) > 0 ) {
902
902
// Extract the image name from the singularity command
903
903
var imageName string
904
904
for i , arg := range containerCommand .runtimeCommand {
@@ -922,12 +922,12 @@ highestExitCode=0
922
922
923
923
if imageName != "" {
924
924
// Store probe metadata for status checking
925
- err := storeProbeMetadata (path , containerCommand .containerName , len (containerCommand .readinessProbes ), len (containerCommand .livenessProbes ))
925
+ err := storeProbeMetadata (path , containerCommand .containerName , len (containerCommand .readinessProbes ), len (containerCommand .livenessProbes ), len ( containerCommand . startupProbes ) )
926
926
if err != nil {
927
927
log .G (Ctx ).Error ("Failed to store probe metadata: " , err )
928
928
}
929
929
930
- probeScript := generateProbeScript (Ctx , config , containerCommand .containerName , imageName , containerCommand .readinessProbes , containerCommand .livenessProbes )
930
+ probeScript := generateProbeScript (Ctx , config , containerCommand .containerName , imageName , containerCommand .readinessProbes , containerCommand .livenessProbes , containerCommand . startupProbes )
931
931
stringToBeWritten .WriteString ("\n " )
932
932
stringToBeWritten .WriteString (probeScript )
933
933
}
@@ -1381,7 +1381,7 @@ func prepareRuntimeCommand(config SlurmConfig, container v1.Container, metadata
1381
1381
singularityOptions = singOpts
1382
1382
}
1383
1383
1384
- // See https://github.com/interTwin-eu /interlink-slurm-plugin/issues/32#issuecomment-2416031030
1384
+ // See https://github.com/interlink-hq /interlink-slurm-plugin/issues/32#issuecomment-2416031030
1385
1385
// singularity run will honor the entrypoint/command (if exist) in container image, while exec will override entrypoint.
1386
1386
// Thus if pod command (equivalent to container entrypoint) exist, we do exec, and other case we do run
1387
1387
singularityCommand := ""
0 commit comments