diff --git a/core/algorithm-operator/lib/jobs/jobCreator.js b/core/algorithm-operator/lib/jobs/jobCreator.js index 9d5341fe7..f3fc5023f 100644 --- a/core/algorithm-operator/lib/jobs/jobCreator.js +++ b/core/algorithm-operator/lib/jobs/jobCreator.js @@ -38,7 +38,7 @@ const createDriverJobSpec = ({ resourceRequests, image, inputEnv, clusterOptions spec = applyName(spec, CONTAINERS.PIPELINE_DRIVER); spec = applyPipelineDriverImage(spec, image); spec = applyEnvToContainer(spec, CONTAINERS.PIPELINE_DRIVER, inputEnv); - if (settings.applyResources) { + if (settings.applyResourceLimits) { spec = applyPipelineDriverResourceRequests(spec, resourceRequests); } spec = applyJaeger(spec, CONTAINERS.PIPELINE_DRIVER, options); diff --git a/core/algorithm-operator/tests/pipeline-drivers.js b/core/algorithm-operator/tests/pipeline-drivers.js index b72e4f7f7..d7d22b770 100644 --- a/core/algorithm-operator/tests/pipeline-drivers.js +++ b/core/algorithm-operator/tests/pipeline-drivers.js @@ -342,7 +342,10 @@ describe('bootstrap', () => { }); describe('createDriverJobSpec', () => { beforeEach(() => { - globalSettings.applyResources = false; + globalSettings.applyResourceLimits = false; + }); + after(() => { + globalSettings.applyResourceLimits = false; }); it('should throw if no image name', () => { expect(() => createDriverJobSpec({ options })).to.throw('Unable to create job spec. image is required'); @@ -358,7 +361,7 @@ describe('bootstrap', () => { expect(res.metadata.name).to.include(CONTAINERS.PIPELINE_DRIVER); }); it('should apply resources', () => { - globalSettings.applyResources = true; + globalSettings.applyResourceLimits = true; const res = createDriverJobSpec({ ...{ options }, image: 'myImage1',