Skip to content

Commit 291b566

Browse files
authored
add crd docs in dev docs (#7992)
1 parent eafa060 commit 291b566

16 files changed

+1780
-2
lines changed

.codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ coverage:
1414
ignore:
1515
- "pkg/client"
1616
- "**/*generated*.go"
17+
- "hack"

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ update-crds: ## Update CRDs
9999
kustomize build config/crd >deploy/crds.yaml
100100
kustomize build config/crd/app-protect-dos --load-restrictor='LoadRestrictionsNone' >deploy/crds-nap-dos.yaml
101101
kustomize build config/crd/app-protect-waf --load-restrictor='LoadRestrictionsNone' >deploy/crds-nap-waf.yaml
102+
$(MAKE) update-crd-docs
102103

103104
.PHONY: telemetry-schema
104105
telemetry-schema: ## Generate the telemetry Schema
@@ -240,3 +241,9 @@ clean-cache: ## Clean go cache
240241
rebuild-test-img:
241242
cd tests && \
242243
make build
244+
245+
.PHONY: update-crd-docs
246+
update-crd-docs: ## Update CRD markdown documentation from YAML definitions
247+
@echo "Generating CRD documentation..."
248+
@go run hack/generate-crd-docs.go -crd-dir config/crd/bases -output-dir docs/crd
249+
@echo "CRD documentation updated successfully!"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# APLogConf
2+
3+
**Group:** `appprotect.f5.com`
4+
**Version:** `v1beta1`
5+
**Kind:** `APLogConf`
6+
**Scope:** `Namespaced`
7+
8+
## Description
9+
10+
The `APLogConf` resource defines the logging configuration for NGINX App Protect. It allows you to specify the format and content of security logs, as well as filters to control which requests are logged.
11+
12+
## Spec Fields
13+
14+
The `.spec` object supports the following fields:
15+
16+
| Field | Type | Description |
17+
|---|---|---|
18+
| `content` | `object` | Configuration object. |
19+
| `content.escaping_characters` | `array` | List of configuration values. |
20+
| `content.escaping_characters[].from` | `string` | String configuration value. |
21+
| `content.escaping_characters[].to` | `string` | String configuration value. |
22+
| `content.format` | `string` | Allowed values: `"splunk"`, `"arcsight"`, `"default"`, `"user-defined"`, `"grpc"`. |
23+
| `content.format_string` | `string` | String configuration value. |
24+
| `content.list_delimiter` | `string` | String configuration value. |
25+
| `content.list_prefix` | `string` | String configuration value. |
26+
| `content.list_suffix` | `string` | String configuration value. |
27+
| `content.max_message_size` | `string` | String configuration value. |
28+
| `content.max_request_size` | `string` | String configuration value. |
29+
| `filter` | `object` | Configuration object. |
30+
| `filter.request_type` | `string` | Allowed values: `"all"`, `"illegal"`, `"blocked"`. |

docs/crd/appprotect.f5.com_appolicies.md

Lines changed: 565 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# APUserSig
2+
3+
**Group:** `appprotect.f5.com`
4+
**Version:** `v1beta1`
5+
**Kind:** `APUserSig`
6+
**Scope:** `Namespaced`
7+
8+
## Description
9+
10+
The `APUserSig` resource defines a custom user-defined signature for NGINX App Protect. It allows you to create your own signatures to detect specific attack patterns or vulnerabilities.
11+
12+
## Spec Fields
13+
14+
The `.spec` object supports the following fields:
15+
16+
| Field | Type | Description |
17+
|---|---|---|
18+
| `properties` | `string` | String configuration value. |
19+
| `signatures` | `array` | List of configuration values. |
20+
| `signatures[].accuracy` | `string` | Allowed values: `"high"`, `"medium"`, `"low"`. |
21+
| `signatures[].attackType` | `object` | Configuration object. |
22+
| `signatures[].attackType.name` | `string` | String configuration value. |
23+
| `signatures[].description` | `string` | String configuration value. |
24+
| `signatures[].name` | `string` | String configuration value. |
25+
| `signatures[].references` | `object` | Configuration object. |
26+
| `signatures[].references.type` | `string` | Allowed values: `"bugtraq"`, `"cve"`, `"nessus"`, `"url"`. |
27+
| `signatures[].references.value` | `string` | String configuration value. |
28+
| `signatures[].risk` | `string` | Allowed values: `"high"`, `"medium"`, `"low"`. |
29+
| `signatures[].rule` | `string` | String configuration value. |
30+
| `signatures[].signatureType` | `string` | Allowed values: `"request"`, `"response"`. |
31+
| `signatures[].systems` | `array` | List of configuration values. |
32+
| `signatures[].systems[].name` | `string` | String configuration value. |
33+
| `softwareVersion` | `string` | String configuration value. |
34+
| `tag` | `string` | String configuration value. |
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# APDosLogConf
2+
3+
**Group:** `appprotectdos.f5.com`
4+
**Version:** `v1beta1`
5+
**Kind:** `APDosLogConf`
6+
**Scope:** `Namespaced`
7+
8+
## Description
9+
10+
The `APDosLogConf` resource defines the logging configuration for the NGINX App Protect DoS module. It allows you to specify the format and content of security logs, as well as filters to control which events are logged.
11+
12+
## Spec Fields
13+
14+
The `.spec` object supports the following fields:
15+
16+
| Field | Type | Description |
17+
|---|---|---|
18+
| `content` | `object` | Configuration object. |
19+
| `content.format` | `string` | Allowed values: `"splunk"`, `"arcsight"`, `"user-defined"`. |
20+
| `content.format_string` | `string` | String configuration value. |
21+
| `content.max_message_size` | `string` | String configuration value. |
22+
| `filter` | `object` | Configuration object. |
23+
| `filter.attack-signatures` | `string` | String configuration value. |
24+
| `filter.bad-actors` | `string` | String configuration value. |
25+
| `filter.traffic-mitigation-stats` | `string` | Allowed values: `"none"`, `"all"`. |
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# APDosPolicy
2+
3+
**Group:** `appprotectdos.f5.com`
4+
**Version:** `v1beta1`
5+
**Kind:** `APDosPolicy`
6+
**Scope:** `Namespaced`
7+
8+
## Description
9+
10+
The `APDosPolicy` resource defines a security policy for the NGINX App Protect Denial of Service (DoS) module. It allows you to configure various mitigation strategies to protect your applications from DoS attacks.
11+
12+
## Spec Fields
13+
14+
The `.spec` object supports the following fields:
15+
16+
| Field | Type | Description |
17+
|---|---|---|
18+
| `automation_tools_detection` | `string` | Allowed values: `"on"`, `"off"`. |
19+
| `bad_actors` | `string` | Allowed values: `"on"`, `"off"`. |
20+
| `mitigation_mode` | `string` | Allowed values: `"standard"`, `"conservative"`, `"none"`. |
21+
| `signatures` | `string` | Allowed values: `"on"`, `"off"`. |
22+
| `tls_fingerprint` | `string` | Allowed values: `"on"`, `"off"`. |
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# DosProtectedResource
2+
3+
**Group:** `appprotectdos.f5.com`
4+
**Version:** `v1beta1`
5+
**Kind:** `DosProtectedResource`
6+
**Scope:** `Namespaced`
7+
8+
## Description
9+
10+
The `DosProtectedResource` resource defines a resource that is protected by the NGINX App Protect DoS module. It allows you to enable and configure DoS protection for a specific service or application.
11+
12+
## Spec Fields
13+
14+
The `.spec` object supports the following fields:
15+
16+
| Field | Type | Description |
17+
|---|---|---|
18+
| `allowList` | `array` | AllowList is a list of allowed IPs and subnet masks |
19+
| `allowList[].ipWithMask` | `string` | String configuration value. |
20+
| `apDosMonitor` | `object` | ApDosMonitor is how NGINX App Protect DoS monitors the stress level of the protected object. The monitor requests are sent from localhost (127.0.0.1). Default value: URI - None, protocol - http1, timeout - NGINX App Protect DoS default. |
21+
| `apDosMonitor.protocol` | `string` | Protocol determines if the server listens on http1 / http2 / grpc / websocket. The default is http1. Allowed values: `"http1"`, `"http2"`, `"grpc"`, `"websocket"`. |
22+
| `apDosMonitor.timeout` | `integer` | Timeout determines how long (in seconds) should NGINX App Protect DoS wait for a response. Default is 10 seconds for http1/http2 and 5 seconds for grpc. |
23+
| `apDosMonitor.uri` | `string` | URI is the destination to the desired protected object in the nginx.conf: |
24+
| `apDosPolicy` | `string` | ApDosPolicy is the namespace/name of a ApDosPolicy resource |
25+
| `dosAccessLogDest` | `string` | DosAccessLogDest is the network address for the access logs |
26+
| `dosSecurityLog` | `object` | DosSecurityLog defines the security log of the DosProtectedResource. |
27+
| `dosSecurityLog.apDosLogConf` | `string` | ApDosLogConf is the namespace/name of a APDosLogConf resource |
28+
| `dosSecurityLog.dosLogDest` | `string` | DosLogDest is the network address of a logging service, can be either IP or DNS name. |
29+
| `dosSecurityLog.enable` | `boolean` | Enable enables the security logging feature if set to true |
30+
| `enable` | `boolean` | Enable enables the DOS feature if set to true |
31+
| `name` | `string` | Name is the name of protected object, max of 63 characters. |
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# DNSEndpoint
2+
3+
**Group:** `externaldns.nginx.org`
4+
**Version:** `v1`
5+
**Kind:** `DNSEndpoint`
6+
**Scope:** `Namespaced`
7+
8+
## Description
9+
10+
The `DNSEndpoint` resource is used to manage DNS records for services exposed through NGINX Ingress Controller. It is typically used in conjunction with ExternalDNS to automatically create and update DNS records.
11+
12+
## Spec Fields
13+
14+
The `.spec` object supports the following fields:
15+
16+
| Field | Type | Description |
17+
|---|---|---|
18+
| `endpoints` | `array` | List of configuration values. |
19+
| `endpoints[].dnsName` | `string` | The hostname for the DNS record |
20+
| `endpoints[].labels` | `object` | Labels stores labels defined for the Endpoint |
21+
| `endpoints[].providerSpecific` | `array` | ProviderSpecific stores provider specific config |
22+
| `endpoints[].providerSpecific[].name` | `string` | Name of the property |
23+
| `endpoints[].providerSpecific[].value` | `string` | Value of the property |
24+
| `endpoints[].recordTTL` | `integer` | TTL for the record |
25+
| `endpoints[].recordType` | `string` | RecordType type of record, e.g. CNAME, A, SRV, TXT, MX |
26+
| `endpoints[].targets` | `array[string]` | The targets the DNS service points to |
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# GlobalConfiguration
2+
3+
**Group:** `k8s.nginx.org`
4+
**Version:** `v1`
5+
**Kind:** `GlobalConfiguration`
6+
**Scope:** `Namespaced`
7+
8+
## Description
9+
10+
The `GlobalConfiguration` resource defines global settings for the NGINX Ingress Controller. It allows you to configure listeners for different protocols and ports.
11+
12+
## Spec Fields
13+
14+
The `.spec` object supports the following fields:
15+
16+
| Field | Type | Description |
17+
|---|---|---|
18+
| `listeners` | `array` | List of configuration values. |
19+
| `listeners[].ipv4` | `string` | String configuration value. |
20+
| `listeners[].ipv6` | `string` | String configuration value. |
21+
| `listeners[].name` | `string` | String configuration value. |
22+
| `listeners[].port` | `integer` | Numeric configuration value. |
23+
| `listeners[].protocol` | `string` | String configuration value. |
24+
| `listeners[].ssl` | `boolean` | Enable or disable this feature. |

0 commit comments

Comments
 (0)