[8.x](backport #6004) [helm] fix disabling cluster role and service account #6009
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.
What does this PR do?
This PR resolves two key issues:
default
service account by disabling service account creation without specifying an existing one.Additionally, it updates the nginx custom integration example to demonstrate how to deploy an elastic agent with Kubernetes providers, leader election, cluster role, and service account creation all disabled.
Why is it important?
These changes are essential for improving the configuration flexibility of the deployment process. By allowing cluster role creation to be disabled without requiring the specification of an existing role name, users gain the ability to simplify permissions management. This is particularly useful in environments where pre-configured roles or restricted permissions are mandated.
Furthermore, the option to fall back to the default service account without creating a new one or specifying an existing account name enhances compatibility with Kubernetes setups that have stringent service account policies or rely on default configurations. This ensures smoother integration and reduces the complexity for users deploying the elastic agent in a wide variety of Kubernetes environments.
Checklist
./changelog/fragments
using the changelog toolDisruptive User Impact
N/A
How to test this PR locally
Follow the updated nginx custom integration example
Related issues
N/A
This is an automatic backport of pull request #6004 done by Mergify.