Skip to content

Simplifying if/else to with, including copilot instructions (nindent fix follow-up)#869

Merged
wozniakjan merged 5 commits into
kedacore:mainfrom
TBeijen:nindent-fix
Jun 5, 2026
Merged

Simplifying if/else to with, including copilot instructions (nindent fix follow-up)#869
wozniakjan merged 5 commits into
kedacore:mainfrom
TBeijen:nindent-fix

Conversation

@TBeijen

@TBeijen TBeijen commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Follow up of #868

Bug already fixed in #862 , but couldn't but notice the wildly inconsistent use of if/else and with.

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.yaml generated 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

  • I have verified that my change is according to the deprecations & breaking changes policy
  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • README is updated with new configuration values (if applicable) learn more
  • A PR is opened to update KEDA core (repo) (if applicable, ie. when deployment manifests are modified)

Fixes #868

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.tolerations vs global tolerations selection to a single with/default output path in the manager Deployment template.
  • Add .github/copilot-instructions.md with Helm templating review guidance (fallback patterns + toYaml indentation 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.

Comment thread .github/copilot-instructions.md Outdated
Comment thread keda/templates/manager/deployment.yaml
@TBeijen TBeijen requested a review from miqm June 5, 2026 04:14

@wozniakjan wozniakjan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is much cleaner indeed, thank you!

@wozniakjan wozniakjan merged commit e9110fb into kedacore:main Jun 5, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing nindent in manager/deployment tolerations v2.20.0

4 participants