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:
@@ -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
|
||||
|
Reference in New Issue
Block a user