-
Notifications
You must be signed in to change notification settings - Fork 376
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
fix(docs): update getting started instructions #2681
fix(docs): update getting started instructions #2681
Conversation
Update Kubernetes install instructions to call out single node cluster Assumption. Update execution monitoring instructions to provide commands for Using multi-node clusters. Fixes cilium#2680 Signed-off-by: Scott Lowe <scott.lowe@isovalent.com>
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Hey, thanks for opening that PR.
However, having those two different paths might overcomplicate the getting-started. I feel like we could use this command:
POD=$(kubectl get pod -l 'app.kubernetes.io/name=tetragon' -o name -n kube-system --field-selector spec.nodeName=$(kubectl get pod xwing -o=jsonpath='{.spec.nodeName}')); kubectl exec -ti -n kube-system $POD -c tetragon -- tetra getevents -o compact --pods xwing
To replace the existing:
kubectl exec -ti -n kube-system ds/tetragon -c tetragon -- tetra getevents -o compact --pods xwing
I haven't found a way to make it simpler, the better option would have been to create the xwing pod directly on the first node of the daemonset so that ds/tetragon directly selects the appropriate node but this is impossible if we continue to use the .yaml
file of cilium. We could just deploy the xwing using kubectl run
but the final getting started guide uses the deathstar thingie. So maybe it's simpler to just use a more complicated command to run on the appropriate tetragon node.
The other solution would have been to use the aggregated logs:
kubectl logs -l app.kubernetes.io/name=tetragon -c export-stdout -f -n kube-system | kubectl exec -i -n kube-system ds/tetragon -c tetragon -- tetra getevents -o compact --pods xwing
But this contains historic data which can be confusing for the user I guess!
So I would suggest to replace all the command with the one retrieving the correct tetragon POD. You can find all those references using:
$ grep -nr "kubectl exec -ti -n kube-system ds/tetragon -c tetragon -- tetra getevents -o compact --pods xwing" docs
docs/content/en/docs/getting-started/execution.md:21:kubectl exec -ti -n kube-system ds/tetragon -c tetragon -- tetra getevents -o compact --pods xwing
docs/content/en/docs/getting-started/enforcement.md:70:kubectl exec -ti -n kube-system ds/tetragon -c tetragon -- tetra getevents -o compact --pods xwing
docs/content/en/docs/getting-started/enforcement.md:134:kubectl exec -ti -n kube-system ds/tetragon -c tetragon -- tetra getevents -o compact --pods xwing
docs/content/en/docs/getting-started/network.md:46: kubectl exec -ti -n kube-system ds/tetragon -c tetragon -- tetra getevents -o compact --pods xwing --processes curl
docs/content/en/docs/getting-started/file-events.md:43:kubectl exec -ti -n kube-system ds/tetragon -c tetragon -- tetra getevents -o compact --pods xwing
@mtardy I'm not sure that one long command is any better for users than taking a bit of space to explain what needs to be done and why. IMHO, it's clearer to explain what needs to be done, provide commands for each step, and then (at/near the end) provide a single command that encapsulates everything. I'll also point out that users with single node clusters can follow the multi-node instructions without any errors (they're just taking additional steps that aren't necessary at this moment). To reduce any potential confusion, what do you think about restructuring the tabs to show:
And then providing instructions in each section? It adds some complexity to the docs themselves, but provides clear distinction/separation for users on what set of instructions to follow. |
@mtardy I'd also suggest that we focus on fixing only the "Execution Monitoring" section in this PR. Once we are happy with how it looks and works, then I can file an additional PR to model the same changes in the other sections. I think this would make reviews easier (smaller change sets to review). |
yeah that's a good idea as well. I just want to avoid the proposed changes that are confusing because we end up with 4 commands and a lot of text instead of one command. On that:
I think I don't agree, for a "getting started" quick guide, it might be more valuable to show results as fast as possible and then explain. I would say for a more in-depth part of the doc yes but maybe not here.
It's up to you, I don't mind. I find it okay to review any case. |
Update Docker installation instructions to deploy demo app. Add Docker Compose file to deploy demo app on Docker. Update execution events with better Docker instructions. Fix a few typos. Change headings to sentence case per style guidelines. Signed-off-by: Scott Lowe <scott.lowe@isovalent.com>
Consolidate commands for multi-node Kubernetes clusters Signed-off-by: Scott Lowe <scott.lowe@isovalent.com>
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.
For the record, I'm not a fan of a long command that doesn't explain what it's doing.
I'd rather get these changes into the docs than get hung up on a minor difference of opinion, so I've added the two commands as suggested above in commit bc4204e.
I agree this is debatable!
I'd even merge the Kubernetes single node and Kubernetes multiple node to simplify further but this is way better than previously thanks! :)
I forgot to ask for squashing the commits oups |
@@ -23,15 +23,39 @@ The easiest way to start experimenting with Tetragon is to run it via Docker | |||
using the released container images. | |||
|
|||
```shell | |||
docker run --name tetragon-container --rm --pull always \ | |||
docker run -d --name tetragon --rm --pull always \ |
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.
btw why did we change that? I think running interactively was fine to get the logs and everything.
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.
This made things a bit more similar between Docker and Kubernetes.
running. It might take a short amount of time for the container images to | ||
download. | ||
|
||
```shell |
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.
forgot to add to remove shell
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.
So you want no language designator here, just the backticks?
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.
Thanks for contributing! Please ensure your pull request adheres to the following guidelines:
Update Kubernetes install instructions to call out single node cluster assumption.
Update execution monitoring instructions to provide commands for using multi-node clusters.
Fixes #2680