-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
docs: improve Host Firewall GSG #13673
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Oct 21, 2020
pchaigno
reviewed
Oct 21, 2020
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! It's great to get 👀 on this guide 🎉
Fixes: - Fix Helm option: "--set devices=ethX,ethY" does not work (missing curly braces and quotes). - Rename one occurrence of "access=ssh" into "node-access=ssh", for consistency. - Add a missing closing parenthesis at the end of the command that sets the HOST_EP_ID variable. - Use jsonpath and kubectl's options in one command to avoid piping the output to jq. Additions: - Explain what the interfaces passed to the "--devices" option are for. This is mostly copied from the description in the Host Policies description (Layer 3 Examples). - Explain that per-endpoint routing is not compatible with the host firewall and must be disabled, in particular on managed environments like GKE. - Add node label removal to the clean-up section. - Format shell session code as shell session code. Signed-off-by: Quentin Monnet <quentin@isovalent.com>
6556843
to
7ac2bb4
Compare
Amended according to Paul's feedback. Incremental diffdiff --git a/Documentation/gettingstarted/host-firewall.rst b/Documentation/gettingstarted/host-firewall.rst
index c4b3a704659d..535069f4d172 100644
--- a/Documentation/gettingstarted/host-firewall.rst
+++ b/Documentation/gettingstarted/host-firewall.rst
@@ -22,16 +22,16 @@ Enable the Host Firewall in Cilium
Deploy Cilium release via Helm:
-.. code:: shell-session
+.. parsed-literal ::
- $ helm install cilium |CHART_RELEASE| \\
+ helm install cilium |CHART_RELEASE| \\
--namespace kube-system \\
--set hostFirewall=true \\
--set devices='{ethX,ethY}'
-The ``devices`` refer to the network devices Cilium is configured on such as
-``eth0``. Omitting this option leads Cilium to auto-detect what interfaces the
-host firewall applies to.
+The ``devices`` flag refers to the network devices Cilium is configured on such
+as ``eth0``. Omitting this option leads Cilium to auto-detect what interfaces
+the host firewall applies to.
At this point, the Cilium-managed nodes are ready to enforce network policies.
@@ -51,11 +51,6 @@ At this point, the Cilium-managed nodes are ready to enforce network policies.
Attach a Label to the Node
==========================
-.. note::
-
- This must be done *after* deploying Cilium, or the agent may not pick up
- the change.
-
In this guide, we will apply host policies only to nodes with the label
``node-access=ssh``. We thus first need to attach that label to a node in the
cluster.
@@ -87,8 +82,8 @@ recommended for production deployment*.
$ HOST_EP_ID=$(kubectl -n $CILIUM_NAMESPACE exec $CILIUM_POD_NAME -- cilium endpoint list -o jsonpath='{[?(@.status.identity.id==1)].id}')
$ kubectl -n $CILIUM_NAMESPACE exec $CILIUM_POD_NAME -- cilium endpoint config $HOST_EP_ID PolicyAuditMode=Enabled
Endpoint 3353 configuration updated successfully
- $ kubectl -n $CILIUM_NAMESPACE exec $CILIUM_POD_NAME -- cilium endpoint config $HOST_EP_ID -o jsonpath='{.realized.options.PolicyAuditMode}'
- Enabled
+ $ kubectl -n $CILIUM_NAMESPACE exec $CILIUM_POD_NAME -- cilium endpoint config $HOST_EP_ID | grep PolicyAuditMode
+ PolicyAuditMode Enabled
Apply a Host Network Policy |
pchaigno
approved these changes
Oct 22, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/documentation
Impacts the documentation, including textual changes, sphinx, or other doc generation code.
area/host-firewall
Impacts the host firewall or the host endpoint.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/misc
This PR makes changes that have no direct user impact.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As part of the validation of GSGs (#13627) for the 1.9 release, here are several improvement suggestions for the Host Firewall GSG.
Fixes:
--set devices=ethX,ethY
does not work (missing curly braces and quotes).access=ssh
intonode-access=ssh
, for consistency.HOST_EP_ID
variable.Additions:
--devices
option are for. This is mostly copied from the description in the Host Policies description (Layer 3 Examples).