-
Notifications
You must be signed in to change notification settings - Fork 89
improve ingress nginx documentation accuracy #878
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,10 +30,6 @@ import RemediationSupportBadges from '@site/src/components/remediation-support-b | |
|
|
||
| A lua Remediation Component for Ingress Nginx Controller. | ||
|
|
||
| :::warning | ||
| Ingress Nginx Version **1.12** or higher currently is not supported due to removal of Lua plugins support see [this issue](https://github.com/crowdsecurity/cs-openresty-bouncer/issues/60) for latest news. | ||
| ::: | ||
|
|
||
| ## How does it work ? | ||
|
|
||
| This component leverages OpenResty lua's API, used the ingress nginx controller as a [plugin](https://github.com/kubernetes/ingress-nginx/blob/main/rootfs/etc/nginx/lua/plugins/README.md). | ||
|
|
@@ -57,10 +53,23 @@ The Ingress nginx controller should be installed using the [official helm chart] | |
|
|
||
| ### Using Helm | ||
|
|
||
| First you need to create new ingress-nginx chart values file (`crowdsec-ingress-bouncer.yaml`) to upgrade the ingress controller with the crowdsec plugin. | ||
| First you need to create new ingress-nginx chart values file (`crowdsec-ingress-values.yaml`) to upgrade the ingress controller with the crowdsec plugin. | ||
|
|
||
| :::warning | ||
|
|
||
| Lua support has been removed from mainline ingress nginx in version 1.12. As | ||
| CrowdSec remediation relies on lua, you need to use our controller image as | ||
| shown in the following values.yaml. | ||
| ::: | ||
|
|
||
|
|
||
| ```yaml | ||
| controller: | ||
| image: | ||
| PullPolicy: IfNotPresent | ||
| image: crowdsecurity/controller | ||
| # Crowdsec Remediation with Ingress Nginx requires to use our controller image | ||
| tag: latest | ||
| extraVolumes: | ||
| - name: crowdsec-bouncer-plugin | ||
| emptyDir: {} | ||
|
|
@@ -115,14 +124,34 @@ controller: | |
| resolver local=on ipv6=off; | ||
| ``` | ||
|
|
||
| This values upgrade your ingress deployment to add crowdsec lua lib as a plugin and run with the ingress controller. | ||
| It used [this docker image](https://hub.docker.com/r/crowdsecurity/lua-bouncer-plugin) to copy the crowdsec lua library. | ||
| <details> | ||
| <summary>You already have a deployed ingress nginx</summary> | ||
|
|
||
| This values.yaml upgrade your ingress deployment to add crowdsec lua lib as a | ||
| plugin and run with the crowdsec maintained nginx ingress controller with lua | ||
| support. It uses [this docker | ||
| image](https://hub.docker.com/r/crowdsecurity/lua-bouncer-plugin) to copy the | ||
| crowdsec lua library. You can upgrade the ingress-nginx using this `crowdsec-ingress-values.yaml` | ||
|
|
||
| ```bash | ||
| helm -n ingress-nginx upgrade -f ingress-nginx-values.yaml -f crowdsec-ingress-values.yaml ingress-nginx/ingress-nginx | ||
| ``` | ||
|
|
||
| </details> | ||
|
|
||
| <details> | ||
| <summary>You don't have a deployed ingress nginx</summary> | ||
|
|
||
| Once you have this patch we can upgrade the ingress-nginx chart. | ||
| This values.yaml install your ingress deployment to add crowdsec lua lib as a | ||
| plugin and run with the crowdsec maintained nginx ingress controller with lua | ||
| support. It uses [this docker | ||
| image](https://hub.docker.com/r/crowdsecurity/lua-bouncer-plugin) to copy the | ||
| crowdsec lua library. You can install the ingress-nginx using this `crowdsec-ingress-values.yaml` | ||
|
|
||
| ```bash | ||
| helm -n ingress-nginx upgrade -f ingress-nginx-values.yaml -f crowdsec-ingress-bouncer.yaml ingress-nginx ingress-nginx | ||
| helm -n ingress-nginx install -f crowdsec-ingress-values.yaml ingress-nginx ingress-nginx/ingress-nginx | ||
| ``` | ||
| </details> | ||
|
|
||
| And then check if the ingress controller is running well. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we link to healthcheck ? is it relevant for that usecase ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not yet, will do when healthcheck will be ready |
||
|
|
||
|
|
||
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.
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.
add a comment above that line to highlight its importance ?
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.
done