Use step type to detect services in Kubernetes backend (#3141)

and use the correct name for tail log

---------

Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
6543
2024-01-09 05:42:36 +01:00
committed by GitHub
parent 549d095ff3
commit 31614d0e38
2 changed files with 21 additions and 8 deletions

View File

@@ -66,6 +66,13 @@ func mkPod(namespace, name, image, workDir, goos, serviceAccountName string,
return pod, nil
}
func stepToPodName(step *types.Step) (name string, err error) {
if step.Type == types.StepTypeService {
return serviceName(step)
}
return podName(step)
}
func podName(step *types.Step) (string, error) {
return dnsName(step.Name)
}