Skip to content

Commit 738e195

Browse files
committed
kueue: skip old platform param if new param exists
If both the old and the new platform params exist in the pipelinerun, we should only pull from the new platform params. The old parameters are likely going to be something we can't interpret with CEL expressions if the new paramter is set. To avoid issues, only read from the old expressions if the new expressions are not set. See KFLUXINFRA-9917 for issues that have already cropped up in our production clusters. Fixes: KFLUXINFRA-9917 Signed-off-by: Andy Sadler <[email protected]>
1 parent 3a480e5 commit 738e195

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

components/kueue/staging/base/tekton-kueue/config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ cel:
3838
3939
# Set resource requests for multi platform pipelines which doesn't use the build-platforms parameter (old style)
4040
- |
41+
!(
42+
has(pipelineRun.spec.params) &&
43+
pipelineRun.spec.params.exists(p, p.name == 'build-platforms')
44+
) &&
4145
has(pipelineRun.spec.pipelineSpec) &&
4246
has(pipelineRun.spec.pipelineSpec.tasks) &&
4347
pipelineRun.spec.pipelineSpec.tasks.size() > 0 ?
@@ -53,6 +57,10 @@ cel:
5357
5458
# Request AWS IP for AWS-based platforms which doesn't use the build-platforms parameter (old style)
5559
- |
60+
!(
61+
has(pipelineRun.spec.params) &&
62+
pipelineRun.spec.params.exists(p, p.name == 'build-platforms')
63+
) &&
5664
has(pipelineRun.spec.pipelineSpec) &&
5765
has(pipelineRun.spec.pipelineSpec.tasks) &&
5866
pipelineRun.spec.pipelineSpec.tasks.size() > 0 ?

0 commit comments

Comments
 (0)