-
Notifications
You must be signed in to change notification settings - Fork 154
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
[helm] add kube-state-metric subchart dependency #6495
[helm] add kube-state-metric subchart dependency #6495
Conversation
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Just a question on the dependency keeping in sync with release.
@@ -5,3 +5,8 @@ kubeVersion: ">= 1.27.0-0" | |||
type: application | |||
appVersion: 9.0.0 | |||
version: 9.0.0-beta | |||
dependencies: | |||
- name: kube-state-metrics | |||
version: "5.28.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to add any automation to keep this in-sync with released versions or is this going to be manual?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point 👌 I have to investigate how we could employ renovate to do that 🙂 do you believe this could be a follow-up PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
absolutely, in a follow up
this is already large enough ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I flagged some minor typos. I've also noticed that we're committing charts/
- that should be in .gitignore in my opinion.
deploy/helm/elastic-agent/examples/fleet-managed-ksm-sharding/README.md
Outdated
Show resolved
Hide resolved
deploy/helm/elastic-agent/examples/kubernetes-ksm-sharding/README.md
Outdated
Show resolved
Hide resolved
Hey @swiatekm 👋 so just to understand, you are against committing |
What you're proposing is vendoring the Helm Chart's dependencies. I'm not opposed to that in principle, but is there any particular reason to do it here, and not for the agent application itself? Package managers exist so dependencies can be installed in a reproducible and consistent manner. Users will install this Chart from a Helm repo, and I don't see much reason why we wouldn't require developers to do the same. Separately, it's another artifact we'd have to keep in sync with Chart.lock. |
I am not quite sure I understand why the above is an issue; in my thinking we could employ But again what is the counter-proposal here? Specifically, how should we change the Helm render examples, integration framework, etc. to accommodate for the |
c24f5f7
to
4f23d9c
Compare
4f23d9c
to
3349bb0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
* feat: add ksm subchart dependency * feat: refactor elastic-agent chart to utilise ksm subchart * feat: add new ksm examples * fix: typos * feat: remove charts directory * fix: reintroduce Chart.lock (cherry picked from commit edd342a) # Conflicts: # deploy/helm/elastic-agent/Chart.yaml # deploy/helm/elastic-agent/examples/eck/rendered/manifest.yaml # deploy/helm/elastic-agent/examples/kubernetes-default/rendered/manifest.yaml # deploy/helm/elastic-agent/examples/kubernetes-hints-autodiscover/rendered/manifest.yaml # deploy/helm/elastic-agent/examples/multiple-integrations/rendered/manifest.yaml # deploy/helm/elastic-agent/examples/user-service-account/rendered/manifest.yaml
#6534) * [helm] add kube-state-metric subchart dependency (#6495) * feat: add ksm subchart dependency * feat: refactor elastic-agent chart to utilise ksm subchart * feat: add new ksm examples * fix: typos * feat: remove charts directory * fix: reintroduce Chart.lock (cherry picked from commit edd342a) # Conflicts: # deploy/helm/elastic-agent/Chart.yaml # deploy/helm/elastic-agent/examples/eck/rendered/manifest.yaml # deploy/helm/elastic-agent/examples/kubernetes-default/rendered/manifest.yaml # deploy/helm/elastic-agent/examples/kubernetes-hints-autodiscover/rendered/manifest.yaml # deploy/helm/elastic-agent/examples/multiple-integrations/rendered/manifest.yaml # deploy/helm/elastic-agent/examples/user-service-account/rendered/manifest.yaml * fix: update chart.yaml and examples for 8.x --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
What does this PR do?
This PR refactors the Elastic Agent Helm chart to include the
kube-state-metrics
(KSM) chart as a subchart dependency. The changes enable users to seamlessly deploy KSM alongside the Elastic Agent for all different deployment options, improving the out-of-the-box experience for Kubernetes monitoring.Key changes include:
kube-state-metrics.enabled
) and deploying Elastic Agent as a sidecar container to the former (kubernetes.state.agentAsSidecar.enabled
)values.schema.json
has been updated to prevent such configurationThis PR consists of 3 commits:
since a019dbf, which is the main change of this PR, is +529 additions -1268 deletions I deem that this PR complies with the team PR policies but happy to try to split it up in smaller chunks if it doesn't 🙂
Why is it important?
This PR is important because it enhances the Elastic Agent Helm chart to simplify the deployment and management of Kubernetes monitoring. By including
kube-state-metrics
as a subchart dependency, the PR significantly reduces user friction and ensures better alignment with Kubernetes integration requirements.The refactoring also:
Checklist
./changelog/fragments
using the changelog toolDisruptive User Impact
This PR introduces a new default behavior that includes the
kube-state-metrics
chart as a dependency. By default:kube-state-metrics.enabled=false
to opt out of deployingkubernetes.state.agentAsSidecar.enabled=true
.For users upgrading existing installations,
ksmSharded
preset is gonna be uninstalled and their kube-state-metrics related flow will follow the logic aboveHow to test this PR locally
Related issues