-
Notifications
You must be signed in to change notification settings - Fork 68
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
Fleet managed Elastic Agent installation with Helm Chart missing topics #1531
Comments
Thanks Edu! Since you know what changes are needed (much more than me) I would certainly like to take you up on that offer! |
Hey Edu 👋 Just to echo again one of your topics; the Helm chart doesn't deploy kube-state-metrics only for the case where a user deploys a fleet-managed agent. For standalone agents that's not the case and autosharded KSM gets deployed. The first reason why we can't do something similar for fleet-managed agents as we do for standalone ones - deploy both a daemonset and KSM-sharded agents -- is that although all agents will be enrolled successfully through Fleet there isn't a way, at least as of now, to say that parts of the kubernetes integration apply to the daemonset and others to the KSM-sharded agent. Now, again about Fleet-managed agents, the configuration of the kubernetes integration (which might or might not require KSM) happens in Kibana. Thus I find it way easier and consistent to suggest to the user there in UI to run this single cli command Of course this is only my opinion and definitely we could investigate supporting this for fleet-managed agents. Let's try to get more opinions on the matter @cmacknz @swiatekm @ycombinator @nimarezainia @strawgate |
@pkoutsovasilis , thanks! Your comment makes all sense and I agree. So we deploy And in this specific case we will ask the user to ensure they deploy KSM independently (which has been always the case with Metricbeat and Elastic Agent until now). We will add something in the docs then. |
We will wait to the outcome of the following issues before deciding the exact changes to apply to the doc: Leader election issue - elastic/elastic-agent#6284 If we decide to postpone the fixes in any of them we will include some comments to align expectations in the doc. |
My feeling is that if the user has already installed the agent Helm Chart, then it's going to be easier for them to change their values file to enable KSM and upgrade, than install a whole new Chart. In the longer-term, we could provide defaults in Kibana that would work with the agent Chart KSM, and user-installed KSM would become the advanced use case requiring additional configuration. I think that, as a rule, if a fleet-managed agent installed via the Helm Chart requires some additional dependency, and the Helm Chart could ensure that dependency is present, then that's what we should do. |
not really required though right?! Since KSM will become a subchart in Elastic-agent Helm chart any configuration a user can achieve with the "standalone KSM Helm chart" is - by Helm's design - 100% applicable through the "Elastic-agent Helm chart". Thus I do not grasp 100% the point here.
With that framing, if we apply generally the same logic in other places; Redis integration has an additional dependency to Redis, should we include a Redis subchart in the Elastic-agent chart?! In other words, these are not fleet-managed agent dependencies, an agent can run just fine without KSM. These are integration dependencies and when a user chooses to install an integration the respective services should exist as is the case with both Redis and kube-state-metrics. This just for the shake of categorising dependencies properly, but I do believe that providing KSM all the time from our Helm-chart might/potentially bring some values for some users?! The tricky bit is how many users would want to rely on Elastic-agent Helm chart to install KSM for them |
Yeah, it's functionally the same thing, minus the fact that we can provide a more opinionated default config for KSM in the agent Helm Chart. But in my experience, there's often less friction involved in an organization enabling a feature of a Helm Chart their vendor recommended they use vs adopting a separate, community-maintained Helm Chart. Even if they're effectively identical.
I don't think these cases are really all that similar. The Redis integration does not have a dependency on Redis. The need a user has when installing the Redis integration is that they want to monitor a Redis instance they already have running in Kubernetes. On the other hand, the need a user can have with the Kubernetes integration, is that they want to get metrics about the state of K8s resources. The integration even installs dashboards which require these metrics to populate. The user doesn't want KSM, we tell them to install KSM to get the functionality they want. As such, I think we should make it as frictionless as possible. Does that make sense? |
ok I think that the crowd has spoken
let's go KSM sub-chart then. brb with a PR 🙂 |
Not sure if we should be moving this KSM related conversation to a different issue in In case we decide to deploy a standard KSM together with the agent resources I'd like to bring something to your attention:
About installation possibilities and related with the comments by @strawgate :
This would be the easiest to achieve and document, as only one Fleet policy / enrollment token will be needed, and technically we are almost there alredy. I would recommend to start achieving this with a simple dependency on KSM chart and deploying a basic ksm when requested by the user. As I also told @pkoutsovasilis , in my opinion the automatic installation of KSM should probably be kept The reason about preferring to keep the
That would be awesome, but between KSM sharding and the first
Maybe the previous could be accomplished with 2 installed releases, and without any special change needed at helm chart level. In summary, and including the latest proposal by @strawgate , I think we have this on the table:
Let me know your thoughts, if you believe it's not worthy to document or mention that second approach I'm totally ok with that too. (Side / silly question) - Would it make sense to suggest to Kubernetes Integration developers to split the integration into 2 different integration packages in the UI? One for Kubernetes node level stuff and another one for Kubernetes cluster Level stuff. In long term that would make much easier to understand situations where users might need to configure multiple policies. |
Arguing against myself here... I really don't see the point of offering my suggested method if the sharded KSM approach proposed by @strawgate is really better and it's better aligned with what we do in the standalone mode :) |
I would actually lean towards including it by default. We have been including it by default with kustomize have we not? Has that caused any problems? |
Description
There are 2 topics that are missing in the document https://www.elastic.co/guide/en/fleet/current/example-kubernetes-fleet-managed-agent-helm.html:
--set agent.fleet.insecure=true
will be needed in some cases.kube-state-metrics
should be installed separately (as it's not installed by the helm chart in this mode).** Insecure flag explanation **
When following the document we suggest a command like:
The previous only works when the Fleet Server HTPS certificate is signed by a publicly trusted CA.
If the Fleet Server certificate is signed by a corporate / private CA or if the fleet server was created in quick start mode (which creates a self-signed certificate), the previous won't work as the Elastic Agents won't be able to talk to the Fleet Server for enrollment.
The solution would be to add
--set agent.fleet.insecure=true
to the previous command.We should add a comment and disclaimer in the docs about it.
Also note that the recommended solution for the case of a Fleet Server using a private CA would be to provide the Elastic Agents the CA during the installation, and not the
insecure
flag. But that's still not supported by the helm chart (issue created to support this: elastic/elastic-agent#6285).** kube-state-metrics explanation **
In the doc, when we ask the user to configure and add in Kibana the
kubernetes integration
with default values we should indicate that the integration expects KSM to be installed and available in a specific endpoint. We should add that to the doc with a link to KSM.@pkoutsovasilis , let us know if you agree on this or if it would make sense to have a flag to automatically install KSM also on this "fleet managed -> perNode" installation.
I will be able to work on this and raise a PR soon if you like, @kilfoyle
Resources
N/A
Collaboration
Please choose a preferred collaboration model.
Point of contact.
Main contact: @eedugon
Stakeholders: @kilfoyle / @pkoutsovasilis
The text was updated successfully, but these errors were encountered: