1
0
mirror of https://codeberg.org/crowci/crow.git synced 2025-08-07 20:23:03 +03:00

chore: 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 pat-s
parent 817987dd92
commit d4508074a8
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