diff --git a/internal/controller/testworkflows/testworkflow_controller.go b/internal/controller/testworkflows/testworkflow_controller.go index 43211c5..2e39332 100644 --- a/internal/controller/testworkflows/testworkflow_controller.go +++ b/internal/controller/testworkflows/testworkflow_controller.go @@ -30,6 +30,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log" @@ -242,6 +243,11 @@ func MergeCronJobJobConfig(dst, include *testworkflowsv1.CronJobConfig) *testwor } maps.Copy(dst.Annotations, include.Annotations) + if len(include.Config) > 0 && dst.Config == nil { + dst.Config = map[string]intstr.IntOrString{} + } + maps.Copy(dst.Config, include.Config) + return dst }