mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-02 08:22:50 +00:00
kubernetes: create service for detached steps (#4892)
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user