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

Remove workflow-level volumes and networks (#4636)

This commit is contained in:
qwerty287
2024-12-30 11:34:59 +02:00
committed by GitHub
parent afa6dee30b
commit 428ba689cb
11 changed files with 52 additions and 412 deletions

View File

@@ -191,11 +191,9 @@ func (e *kube) getConfig() *config {
func (e *kube) SetupWorkflow(ctx context.Context, conf *types.Config, taskUUID string) error {
log.Trace().Str("taskUUID", taskUUID).Msgf("Setting up Kubernetes primitives")
for _, vol := range conf.Volumes {
_, err := startVolume(ctx, e, vol.Name)
if err != nil {
return err
}
_, err := startVolume(ctx, e, conf.Volume.Name)
if err != nil {
return err
}
var extraHosts []types.HostAlias
@@ -427,11 +425,9 @@ func (e *kube) DestroyWorkflow(ctx context.Context, conf *types.Config, taskUUID
}
}
for _, vol := range conf.Volumes {
err := stopVolume(ctx, e, vol.Name, defaultDeleteOptions)
if err != nil {
return err
}
err := stopVolume(ctx, e, conf.Volume.Name, defaultDeleteOptions)
if err != nil {
return err
}
return nil