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

Update Fleet Server quickstart documentation to use emptyDir for agent-data volumes #6563

Merged
merged 2 commits into from
Aug 3, 2023

Conversation

daverick
Copy link
Contributor

The default value is to use a host path Volume, that can be restricted by a podSecurityPolicy.
When there is such a podSecurityPolicy, the pod is not created and the cause of the error is lost in the event of the ECK created ReplicaSet. But in the fleet-server-quickstart events you can see a reconciliation error: Reconciliation error: failed to request https://kibana-quickstart-kb-http.default.svc:5601/api/fleet/setup, status is 401 which is not the real problem.

This proposed change would avoid this situation by following the workaround that we have when host path is not possible. This is not optimal for production but this is a QuickStart ;-)

the default value is to use an host path Volume, that can be restricted by a podSecurityPolicy
@daverick daverick added the >docs Documentation label Mar 22, 2023
@@ -64,6 +67,9 @@ spec:
automountServiceAccountToken: true
securityContext:
runAsUser: 0
volumes:
- name: agent-data
emptyDir: {} # may not be suited for production, the default value is to use host path volume
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would only do this for Fleet server. Which afaik does not actually need to persist state. While regular Agents running integrations do need this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, will remove the comment too as it is not that useful in the fleet server case

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would only do this for Fleet server.

IIUC last commit removed the emptyDir on the Fleet server.

Also:

  • The use of emptyDir is documented in the Storing local state in host path volume section, at the end of this document. Should we update it to mention security restrictions, and the fact that it is not required for Fleet Server (which is a TIL for me btw)?
  • Should we just not try to use an hostpath if Fleet Server is enabled? (to be done in a separate issue/pr ofc)

Copy link
Collaborator

@pebrc pebrc Apr 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and the fact that it is not required for Fleet Server (which is a TIL for me btw)?

Your question makes me doubt my conviction. Let's verify this before we merge.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not been able to get an answer from the Fleet team on this. However given that we are running Fleet server as a deployment and the chance is high that the on eviction or deletion of the Pod we end up on a different k8s node, I think we are good to merge this as is.

@pebrc pebrc merged commit 3c2c4fd into main Aug 3, 2023
@thbkrkr thbkrkr added the v2.10.0 label Aug 4, 2023
@rhr323 rhr323 changed the title Fleet server QuickStart: use emptyDir for the agent-data volumes Fleet server quick start documentation uses emptyDir for agent-data volumes Oct 25, 2023
@thbkrkr thbkrkr changed the title Fleet server quick start documentation uses emptyDir for agent-data volumes Update Fleet Server quickstart documentation to use emptyDir for agent-data volumes Oct 26, 2023
@thbkrkr thbkrkr deleted the daverick-patch-1 branch November 16, 2023 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs Documentation v2.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants