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

@@ -199,7 +199,7 @@ func (e *kube) SetupWorkflow(ctx context.Context, conf *types.Config, taskUUID s
var extraHosts []types.HostAlias
for _, stage := range conf.Stages {
for _, step := range stage.Steps {
if step.Type == types.StepTypeService || step.Detached {
if isService(step) {
svc, err := startService(ctx, e, step)
if err != nil {
return err
@@ -416,7 +416,7 @@ func (e *kube) DestroyWorkflow(ctx context.Context, conf *types.Config, taskUUID
return err
}
if step.Type == types.StepTypeService {
if isService(step) {
err := stopService(ctx, e, step, defaultDeleteOptions)
if err != nil {
return err