Skip to content

Commit

Permalink
Fix manifest CRD documentation (#6197)
Browse files Browse the repository at this point in the history
This commit restructures the custom resource section of the Installation
with Manifests documentation to remove redundant instructions and more
clearly delineate the NAP-specific instructions from the core
definitions.

Using includes, a potential furthur improvement for the future would be
to fully compartmentalise any NAP WAF or DOS documentation into their
"Integration" subsections, removing them from the critical user path.
  • Loading branch information
ADubhlaoich authored Aug 14, 2024
1 parent 9c68b1f commit a091018
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 56 deletions.
17 changes: 5 additions & 12 deletions docs/content/includes/installation/create-custom-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ There are two ways you can install the custom resource definitions:
1. Using a URL to apply a single CRD yaml file, which we recommend.
1. Applying your local copy of the CRD yaml files, which requires you to clone the repository.

{{<tabs name="install-crds">}}

{{%tab name="Install CRDs from single YAML"%}}

This single YAML file creates CRDs for the following resources:
The core custom CRDs are the following:

- [VirtualServer and VirtualServerRoute]({{< relref "configuration/virtualserver-and-virtualserverroute-resources.md" >}})
- [TransportServer]({{< relref "configuration/transportserver-resource.md" >}})
- [Policy]({{< relref "configuration/policy-resource.md" >}})
- [GlobalConfiguration]({{< relref "configuration/global-configuration/globalconfiguration-resource.md" >}})

{{<tabs name="install-crds">}}

{{%tab name="Install CRDs from single YAML"%}}

```shell
kubectl apply -f https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v{{< nic-version >}}/deploy/crds.yaml
```
Expand All @@ -32,13 +32,6 @@ kubectl apply -f https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v

{{< note >}} If you are installing the CRDs this way, ensure you have first cloned the repository. {{< /note >}}

These YAML files create CRDs for the following resources:

- [VirtualServer and VirtualServerRoute]({{< relref "configuration/virtualserver-and-virtualserverroute-resources.md" >}})
- [TransportServer]({{< relref "configuration/transportserver-resource.md" >}})
- [Policy]({{< relref "configuration/policy-resource.md" >}})
- [GlobalConfiguration]({{< relref "configuration/global-configuration/globalconfiguration-resource.md" >}})

```shell
kubectl apply -f config/crd/bases/k8s.nginx.org_virtualservers.yaml
kubectl apply -f config/crd/bases/k8s.nginx.org_virtualserverroutes.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toc: true
weight: 200
---

This guide explains how to use Manifests to install NGINX Ingress Controller, then create both common and custom resources and set up role-based access control.
This guide explains how to use Manifests to install F5 NGINX Ingress Controller, then create both common and custom resources and set up role-based access control.

## Before you start

Expand Down Expand Up @@ -59,72 +59,65 @@ To use App Protect DoS, install the App Protect DoS Arbitrator using the provide

---

## Create custom resources {#create-custom-resources}
## Create core custom resources {#create-custom-resources}

{{< include "installation/create-custom-resources.md" >}}

{{<tabs name="install-crds">}}
### Create optional custom resources

{{%tab name="Install CRDs from single YAML"%}}
There are optional CRDs that are necessary if you want to use NGINX App Protect WAF or NGINX App Protect DoS.

### Core custom resource definitions
**NGINX App Protect WAF**:
- `APPolicy`
- `APLogConf`
- `APUserSig`

1. Create CRDs for [VirtualServer and VirtualServerRoute]({{< relref "configuration/virtualserver-and-virtualserverroute-resources.md" >}}), [TransportServer]({{< relref "configuration/transportserver-resource.md" >}}), [Policy]({{< relref "configuration/policy-resource.md" >}}) and [GlobalConfiguration]({{< relref "configuration/global-configuration/globalconfiguration-resource.md" >}}):
**NGINX App Protect DoS**:
- `APDosPolicy`
- `APDosLogConf`
- `DosProtectedResource`

```shell
kubectl apply -f https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v{{< nic-version >}}/deploy/crds.yaml
```
{{<tabs name="install-nap-crds">}}

### Optional custom resource definitions
{{%tab name="Install CRDs from single YAML"%}}

1. For the NGINX App Protect WAF module, create CRDs for `APPolicy`, `APLogConf` and `APUserSig`:

```shell
kubectl apply -f https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v{{< nic-version >}}/deploy/crds-nap-waf.yaml
```
**NGINX App Protect WAF**

2. For the NGINX App Protect DoS module, create CRDs for `APDosPolicy`, `APDosLogConf` and `DosProtectedResource`:
{{< note >}} This step can be skipped if you are using App Protect WAF module with policy bundles. {{< /note >}}

```shell
kubectl apply -f https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v{{< nic-version >}}/deploy/crds-nap-dos.yaml
```
```shell
kubectl apply -f https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v{{< nic-version >}}/deploy/crds-nap-waf.yaml
```

{{%/tab%}}
**NGINX App Protect DoS**:

{{%tab name="Install CRDs after cloning the repo"%}}

If you are installing the CRDs this way, ensure that you have first [cloned the repository](#clone-the-repository)
```shell
kubectl apply -f https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v{{< nic-version >}}/deploy/crds-nap-dos.yaml
```

### Core custom resource definitions
{{%/tab%}}

1. Create CRDs for [VirtualServer and VirtualServerRoute]({{< relref "configuration/virtualserver-and-virtualserverroute-resources.md" >}}), [TransportServer]({{< relref "configuration/transportserver-resource.md" >}}), [Policy]({{< relref "configuration/policy-resource.md" >}}) and [GlobalConfiguration]({{< relref "configuration/global-configuration/globalconfiguration-resource.md" >}}):
{{%tab name="Install CRDs after cloning the repo"%}}

```shell
kubectl apply -f config/crd/bases/k8s.nginx.org_virtualservers.yaml
kubectl apply -f config/crd/bases/k8s.nginx.org_virtualserverroutes.yaml
kubectl apply -f config/crd/bases/k8s.nginx.org_transportservers.yaml
kubectl apply -f config/crd/bases/k8s.nginx.org_policies.yaml
kubectl apply -f config/crd/bases/k8s.nginx.org_globalconfigurations.yaml
```
### Optional custom resource definitions
**NGINX App Protect WAF**

{{< note >}} This step can be skipped if you are using App Protect WAF module with policy bundles. {{< /note >}}

1. For the NGINX App Protect WAF module, create CRDs for `APPolicy`, `APLogConf` and `APUserSig`:
```shell
kubectl apply -f config/crd/bases/appprotect.f5.com_aplogconfs.yaml
kubectl apply -f config/crd/bases/appprotect.f5.com_appolicies.yaml
kubectl apply -f config/crd/bases/appprotect.f5.com_apusersigs.yaml
```

```shell
kubectl apply -f config/crd/bases/appprotect.f5.com_aplogconfs.yaml
kubectl apply -f config/crd/bases/appprotect.f5.com_appolicies.yaml
kubectl apply -f config/crd/bases/appprotect.f5.com_apusersigs.yaml
```
**NGINX App Protect DoS**:

2. For the NGINX App Protect DoS module, create CRDs for `APDosPolicy`, `APDosLogConf` and `DosProtectedResource`:
```shell
kubectl apply -f config/crd/bases/appprotectdos.f5.com_apdoslogconfs.yaml
kubectl apply -f config/crd/bases/appprotectdos.f5.com_apdospolicy.yaml
kubectl apply -f config/crd/bases/appprotectdos.f5.com_dosprotectedresources.yaml
```

```shell
kubectl apply -f config/crd/bases/appprotectdos.f5.com_apdoslogconfs.yaml
kubectl apply -f config/crd/bases/appprotectdos.f5.com_apdospolicy.yaml
kubectl apply -f config/crd/bases/appprotectdos.f5.com_dosprotectedresources.yaml
```
{{%/tab%}}

{{</tabs>}}
Expand Down

0 comments on commit a091018

Please sign in to comment.