Skip to content

[8.18](backport #8949) helm: define headless service for statefulset presets #9009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 15, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 15, 2025

What does this PR do?

This PR adds support for deploying Elastic Agent using StatefulSet by properly defining a serviceName, as required by the Kubernetes specification for StatefulSets.

Specifically, it:

  • Introduces a headless service (clusterIP: None) per preset when mode: statefulset is used.
  • Sets the serviceName field in the StatefulSet template to refer to the respective headless service.
  • Provides a working example under examples/statefulset-preset/ showcasing a NetFlow integration running as a StatefulSet.

Why is it important?

StatefulSets in Kubernetes require the serviceName field to be specified to ensure stable network identities and persistent storage for each replica.

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. This is an additive change that only affects users opting into StatefulSet mode. Existing other mode-based presets are unaffected.

How to test this PR locally

mage helm:renderExamples

Related issues


This is an automatic backport of pull request #8949 done by [Mergify](https://mergify.com).

@mergify mergify bot added the backport label Jul 15, 2025
@mergify mergify bot requested a review from a team as a code owner July 15, 2025 07:37
@mergify mergify bot added the backport label Jul 15, 2025
@mergify mergify bot requested review from rubenruizdegauna and pchila and removed request for a team July 15, 2025 07:37
@github-actions github-actions bot added bug Something isn't working skip-changelog labels Jul 15, 2025
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@elasticmachine
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

cc @pkoutsovasilis

@pkoutsovasilis pkoutsovasilis merged commit cbf5101 into 8.18 Jul 15, 2025
18 checks passed
@pkoutsovasilis pkoutsovasilis deleted the mergify/bp/8.18/pr-8949 branch July 15, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bug Something isn't working skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants