Skip to content

Commit

Permalink
fix: rename method
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Sukhin <vladislav@kubeshop.io>
  • Loading branch information
vsukhin committed Dec 18, 2024
1 parent 978e7aa commit 1ae2d0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions pkg/testworkflows/testworkflowprocessor/intermediate.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type Intermediate interface {

AppendJobConfig(cfg *testworkflowsv1.JobConfig) Intermediate
AppendPodConfig(cfg *testworkflowsv1.PodConfig) Intermediate
AppendPvc(cfg map[string]corev1.PersistentVolumeClaimSpec) Intermediate
AppendPvcs(cfg map[string]corev1.PersistentVolumeClaimSpec) Intermediate

AddConfigMap(configMap corev1.ConfigMap) Intermediate
AddSecret(secret corev1.Secret) Intermediate
Expand Down Expand Up @@ -107,12 +107,11 @@ func (s *intermediate) AppendPodConfig(cfg *testworkflowsv1.PodConfig) Intermedi
return s
}

func (s *intermediate) AppendPvc(cfg map[string]corev1.PersistentVolumeClaimSpec) Intermediate {
ref := s.NextRef()
func (s *intermediate) AppendPvcs(cfg map[string]corev1.PersistentVolumeClaimSpec) Intermediate {
for name, spec := range cfg {
s.Ps[name] = corev1.PersistentVolumeClaim{
ObjectMeta: metav1.ObjectMeta{
Name: ref,
Name: s.NextRef(),
},
Spec: spec,
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/testworkflows/testworkflowprocessor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (p *processor) Bundle(ctx context.Context, workflow *testworkflowsv1.TestWo
layer := NewIntermediate().
AppendPodConfig(workflow.Spec.Pod).
AppendJobConfig(workflow.Spec.Job).
AppendPvc(workflow.Spec.Pvcs)
AppendPvcs(workflow.Spec.Pvcs)
layer.ContainerDefaults().
ApplyCR(constants.DefaultContainerConfig.DeepCopy()).
AppendVolumeMounts(layer.AddEmptyDirVolume(nil, constants.DefaultInternalPath)).
Expand Down

0 comments on commit 1ae2d0a

Please sign in to comment.