Skip to content
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

[8.x](backport #6004) [helm] fix disabling cluster role and service account #6009

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Nov 13, 2024

What does this PR do?

This PR resolves two key issues:

  1. It enables disabling cluster role creation without needing to specify an existing role name.
  2. It allows falling back to the 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

  • 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

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.

* fix: allow disabling cluster role creation without needing to specify an existing one

* fix: fallback to default service account when creation is disabled and no existing one is specified

* fix: update nginx custom integration to disable all k8s agent providers

(cherry picked from commit a0111f1)

# Conflicts:
#	deploy/helm/elastic-agent/examples/nginx-custom-integration/rendered/manifest.yaml
@mergify mergify bot requested a review from a team as a code owner November 13, 2024 10:54
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Nov 13, 2024
@mergify mergify bot requested review from michalpristas and blakerouse and removed request for a team November 13, 2024 10:54
Copy link
Contributor Author

mergify bot commented Nov 13, 2024

Cherry-pick of a0111f1 has failed:

On branch mergify/bp/8.x/pr-6004
Your branch is up to date with 'origin/8.x'.

You are currently cherry-picking commit a0111f1789.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   deploy/helm/elastic-agent/examples/nginx-custom-integration/README.md
	modified:   deploy/helm/elastic-agent/examples/nginx-custom-integration/agent-nginx-values.yaml
	modified:   deploy/helm/elastic-agent/templates/agent/cluster-role-binding.yaml
	modified:   deploy/helm/elastic-agent/templates/agent/eck/_pod_template.yaml
	modified:   deploy/helm/elastic-agent/templates/agent/k8s/_pod_template.yaml
	modified:   deploy/helm/elastic-agent/values.schema.json

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   deploy/helm/elastic-agent/examples/nginx-custom-integration/rendered/manifest.yaml

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Nov 13, 2024
@elasticmachine
Copy link
Contributor

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

@pierrehilbert pierrehilbert requested review from pkoutsovasilis and removed request for michalpristas and blakerouse November 13, 2024 11:04
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

@pkoutsovasilis pkoutsovasilis merged commit 22ad8f7 into 8.x Nov 13, 2024
10 checks passed
@pkoutsovasilis pkoutsovasilis deleted the mergify/bp/8.x/pr-6004 branch November 13, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport conflicts There is a conflict in the backported pull request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants