kubernetes: create service for detached steps (#4892)

Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
This commit is contained in:
hhomar
2025-02-25 06:16:43 +00:00
committed by GitHub
parent 0428d01d6f
commit f47165ff9f
4 changed files with 61 additions and 4 deletions

View File

@@ -70,7 +70,7 @@ func mkPod(step *types.Step, config *config, podName, goos string, options Backe
}
func stepToPodName(step *types.Step) (name string, err error) {
if step.Type == types.StepTypeService {
if isService(step) {
return serviceName(step)
}
return podName(step)
@@ -112,7 +112,7 @@ func podLabels(step *types.Step, config *config, options BackendOptions) (map[st
log.Trace().Msgf("using labels from the configuration: %v", config.PodLabels)
maps.Copy(labels, config.PodLabels)
}
if step.Type == types.StepTypeService {
if isService(step) {
labels[ServiceLabel], _ = serviceName(step)
}
labels[StepLabel], err = stepLabel(step)