Simplifying if/else to with, including copilot instructions (nindent fix follow-up)#869
Merged
Merged
Conversation
Signed-off-by: Tibo Beijen <[email protected]>
Signed-off-by: Tibo Beijen <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Follow-up to the tolerations nindent rendering issue (#868) by simplifying the operator tolerations fallback logic in the Helm template, and adding Copilot review guidance intended to reduce future template inconsistencies.
Changes:
- Refactor
operator.tolerationsvs globaltolerationsselection to a singlewith/defaultoutput path in the manager Deployment template. - Add
.github/copilot-instructions.mdwith Helm templating review guidance (fallback patterns +toYamlindentation expectations).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
keda/templates/manager/deployment.yaml |
Uses with + default to render tolerations via a single `toYaml |
.github/copilot-instructions.md |
Adds guidance for consistent Helm fallback patterns and ensuring toYaml output is indented. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
miqm
reviewed
Jun 4, 2026
Signed-off-by: Tibo Beijen <[email protected]>
Signed-off-by: Tibo Beijen <[email protected]>
Signed-off-by: Tibo Beijen <[email protected]>
wozniakjan
approved these changes
Jun 5, 2026
wozniakjan
left a comment
Member
There was a problem hiding this comment.
this is much cleaner indeed, thank you!
This was referenced Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up of #868
Bug already fixed in #862 , but couldn't but notice the wildly inconsistent use of
if/elseandwith.While at it, implemented the simpler change, and a copilot review instruction that aims to improve consistency in the long run.
Worth noting that the
test-values.yamlgenerated in workflow, does not include tolerations, so by the looks of it there's quite some template code not covered by CI.Lemme know if I can help in any way in improving that.
(Note to self: Should re-check for dupes when starting, getting distracted, and resuming a day later)
Checklist
Fixes #868