Skip to content

[Helm charts] Properly quote boolean values#10681

Merged
ycombinator merged 2 commits intoelastic:mainfrom
ycombinator:helm-bool
Oct 27, 2025
Merged

[Helm charts] Properly quote boolean values#10681
ycombinator merged 2 commits intoelastic:mainfrom
ycombinator:helm-bool

Conversation

@ycombinator
Copy link
Contributor

@ycombinator ycombinator commented Oct 20, 2025

What does this PR do?

This PR fixes the quoting of boolean values agent.fleet.insecure and agent.fleet.force.

Why is it important?

Prior to the fix, the rendered values for these fields would appear like so, with an extra pair of quotes, which was causing the rendered value to be ineffective:

- name: FLEET_INSECURE
   value: '"true"'
- name: FLEET_FORCE
   value: '"true"'

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

None; fixes a bug.

How to test this PR locally

  1. Add insecure: true here.
  2. Run mage helm:renderExamples
  3. Verify that the env var in the rendered manifest only has a single pair of double quotes around the value.

Thanks @pkoutsovasilis for suggesting the fix and testing steps.

@ycombinator ycombinator requested a review from a team as a code owner October 20, 2025 21:48
@ycombinator ycombinator added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team backport-active-all Automated backport with mergify to all the active branches labels Oct 20, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

Copy link
Member

@ebeahan ebeahan left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @pkoutsovasilis for the pointer to a fix.

Copy link
Contributor

@pkoutsovasilis pkoutsovasilis left a comment

Choose a reason for hiding this comment

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

hey @ycombinator, thanks for addressing this one. One proposal; go ahead add the insecure: true and force: true in the example you mention in the local testing. Then run mage helm:renderExamples and push all affected files in this PR. This way this will be always checked in the CI and hopefully will prevent any future issues with that

@elasticmachine
Copy link
Contributor

@ycombinator
Copy link
Contributor Author

hey @ycombinator, thanks for addressing this one. One proposal; go ahead add the insecure: true and force: true in the example you mention in the local testing. Then run mage helm:renderExamples and push all affected files in this PR. This way this will be always checked in the CI and hopefully will prevent any future issues with that

With insecure: true, the rendered env var is FLEET_INSECURE: "true". Are we sure we want to encourage this, by making it part of our examples?

Similarly, with force: true, the rendered env var is FLEET_FORCE: "true". This would cause the Agent container to re-enroll any time the container is created, regardless of whether a fleet.enc (or previously fleet.yml) file is present or not. Are we sure we want to encourage this, by making it part of our examples?

Copy link
Contributor

@pkoutsovasilis pkoutsovasilis left a comment

Choose a reason for hiding this comment

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

@ycombinator look at the README.md of this example we don't actually propose the users to use these values, we just have the values there to validate what we propose in the README actually works. So with that said, it feels ok to introduce some slight deviation between the README.md proposal and the under-the-hood values to increase our testing footprint. Your call, the change LGTM

Copy link
Contributor

@swiatekm swiatekm left a comment

Choose a reason for hiding this comment

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

Can you set these in one of the example configs, so we can see that the values are now rendered correctly?

@ycombinator ycombinator merged commit 815dd3e into elastic:main Oct 27, 2025
21 checks passed
@github-actions
Copy link
Contributor

@Mergifyio backport 8.19 9.0 9.1 9.2

@mergify
Copy link
Contributor

mergify bot commented Oct 27, 2025

backport 8.19 9.0 9.1 9.2

✅ Backports have been created

Details
mergify bot pushed a commit that referenced this pull request Oct 27, 2025
* Properly quote boolean values in Helm charts

* Adding CHANGELOG fragment

(cherry picked from commit 815dd3e)
@ycombinator ycombinator deleted the helm-bool branch October 27, 2025 18:39
mergify bot pushed a commit that referenced this pull request Oct 27, 2025
* Properly quote boolean values in Helm charts

* Adding CHANGELOG fragment

(cherry picked from commit 815dd3e)
mergify bot pushed a commit that referenced this pull request Oct 27, 2025
* Properly quote boolean values in Helm charts

* Adding CHANGELOG fragment

(cherry picked from commit 815dd3e)
mergify bot pushed a commit that referenced this pull request Oct 27, 2025
* Properly quote boolean values in Helm charts

* Adding CHANGELOG fragment

(cherry picked from commit 815dd3e)
@ycombinator
Copy link
Contributor Author

Can you set these in one of the example configs, so we can see that the values are now rendered correctly?

Shoot, I missed this comment before hitting merge. Sorry about that!

FWIW, I did test this locally; the steps are mentioned in the PR's description under "How to test this PR locally".

ycombinator added a commit that referenced this pull request Oct 27, 2025
* Properly quote boolean values in Helm charts

* Adding CHANGELOG fragment

(cherry picked from commit 815dd3e)

Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
ycombinator added a commit that referenced this pull request Oct 27, 2025
* Properly quote boolean values in Helm charts

* Adding CHANGELOG fragment

(cherry picked from commit 815dd3e)

Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
ycombinator added a commit that referenced this pull request Oct 28, 2025
* Properly quote boolean values in Helm charts

* Adding CHANGELOG fragment

(cherry picked from commit 815dd3e)
ycombinator added a commit that referenced this pull request Oct 28, 2025
* Properly quote boolean values in Helm charts

* Adding CHANGELOG fragment

(cherry picked from commit 815dd3e)
ycombinator added a commit that referenced this pull request Oct 28, 2025
* Properly quote boolean values in Helm charts

* Adding CHANGELOG fragment

(cherry picked from commit 815dd3e)

Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
ycombinator added a commit that referenced this pull request Oct 28, 2025
* Properly quote boolean values in Helm charts

* Adding CHANGELOG fragment

(cherry picked from commit 815dd3e)

Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
hayotbisonai pushed a commit to hayotbisonai/elastic-agent that referenced this pull request Nov 23, 2025
* Properly quote boolean values in Helm charts

* Adding CHANGELOG fragment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

5 participants